From: Yoshito Umaoka Date: Thu, 28 Sep 2017 21:11:51 +0000 (+0000) Subject: ICU-13177 Fixed a build problem (Java 7 java.util.Objects dependencies) a couple... X-Git-Tag: release-60-rc~90 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c871737d846dc9da8db15d6efed5b45b62573dc;p=icu ICU-13177 Fixed a build problem (Java 7 java.util.Objects dependencies) a couple of classes. X-SVN-Rev: 40501 --- diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/number/MacroProps.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/number/MacroProps.java index f07b1782f39..55f5a8fdd65 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/impl/number/MacroProps.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/number/MacroProps.java @@ -2,8 +2,7 @@ // License & terms of use: http://www.unicode.org/copyright.html#License package com.ibm.icu.impl.number; -import java.util.Objects; - +import com.ibm.icu.impl.Utility; import com.ibm.icu.number.Grouper; import com.ibm.icu.number.IntegerWidth; import com.ibm.icu.number.Notation; @@ -56,7 +55,7 @@ public class MacroProps implements Cloneable { @Override public int hashCode() { - return Objects.hash( + return Utility.hash( notation, unit, rounder, @@ -76,20 +75,20 @@ public class MacroProps implements Cloneable { @Override public boolean equals(Object _other) { MacroProps other = (MacroProps) _other; - return Objects.equals(notation, other.notation) - && Objects.equals(unit, other.unit) - && Objects.equals(rounder, other.rounder) - && Objects.equals(grouper, other.grouper) - && Objects.equals(padder, other.padder) - && Objects.equals(integerWidth, other.integerWidth) - && Objects.equals(symbols, other.symbols) - && Objects.equals(unitWidth, other.unitWidth) - && Objects.equals(sign, other.sign) - && Objects.equals(decimal, other.decimal) - && Objects.equals(affixProvider, other.affixProvider) - && Objects.equals(multiplier, other.multiplier) - && Objects.equals(rules, other.rules) - && Objects.equals(loc, other.loc); + return Utility.equals(notation, other.notation) + && Utility.equals(unit, other.unit) + && Utility.equals(rounder, other.rounder) + && Utility.equals(grouper, other.grouper) + && Utility.equals(padder, other.padder) + && Utility.equals(integerWidth, other.integerWidth) + && Utility.equals(symbols, other.symbols) + && Utility.equals(unitWidth, other.unitWidth) + && Utility.equals(sign, other.sign) + && Utility.equals(decimal, other.decimal) + && Utility.equals(affixProvider, other.affixProvider) + && Utility.equals(multiplier, other.multiplier) + && Utility.equals(rules, other.rules) + && Utility.equals(loc, other.loc); } @Override diff --git a/icu4j/main/classes/core/src/com/ibm/icu/number/LocalizedNumberFormatter.java b/icu4j/main/classes/core/src/com/ibm/icu/number/LocalizedNumberFormatter.java index 4ff6d406456..3be9101fb25 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/number/LocalizedNumberFormatter.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/number/LocalizedNumberFormatter.java @@ -3,9 +3,9 @@ package com.ibm.icu.number; import java.math.BigInteger; -import java.util.Objects; import java.util.concurrent.atomic.AtomicLongFieldUpdater; +import com.ibm.icu.impl.Utility; import com.ibm.icu.impl.number.DecimalQuantity; import com.ibm.icu.impl.number.DecimalQuantity_DualStorageBCD; import com.ibm.icu.impl.number.MacroProps; @@ -101,13 +101,13 @@ public class LocalizedNumberFormatter extends NumberFormatterSettings