From f4c892c6c4c0106215143cf676d256098354f419 Mon Sep 17 00:00:00 2001 From: Yoshito Umaoka Date: Tue, 29 May 2018 17:06:21 +0000 Subject: [PATCH] ICU-13667 Fixing compiler warnings and API doc issues. X-SVN-Rev: 41473 --- .../ibm/icu/impl/number/LocalizedNumberFormatterAsFormat.java | 4 ++++ .../core/src/com/ibm/icu/impl/number/parse/SeriesMatcher.java | 1 - .../classes/core/src/com/ibm/icu/number/CurrencyRounder.java | 4 ++++ .../classes/core/src/com/ibm/icu/number/FormattedNumber.java | 1 - .../classes/core/src/com/ibm/icu/number/FractionRounder.java | 4 ++++ icu4j/main/classes/core/src/com/ibm/icu/number/Rounder.java | 4 ++++ icu4j/main/classes/core/src/com/ibm/icu/number/Scale.java | 1 - icu4j/main/classes/core/src/com/ibm/icu/text/Edits.java | 4 +++- 8 files changed, 19 insertions(+), 4 deletions(-) diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/number/LocalizedNumberFormatterAsFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/number/LocalizedNumberFormatterAsFormat.java index 2a034e9605..cd1ee79114 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/impl/number/LocalizedNumberFormatterAsFormat.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/number/LocalizedNumberFormatterAsFormat.java @@ -23,6 +23,8 @@ import com.ibm.icu.util.ULocale; */ public class LocalizedNumberFormatterAsFormat extends Format { + private static final long serialVersionUID = 1L; + private final transient LocalizedNumberFormatter formatter; // Even though the locale is inside the LocalizedNumberFormatter, we have to keep it here, too, because @@ -114,6 +116,8 @@ public class LocalizedNumberFormatterAsFormat extends Format { } static class Proxy implements Externalizable { + private static final long serialVersionUID = 1L; + String languageTag; String skeleton; diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/number/parse/SeriesMatcher.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/number/parse/SeriesMatcher.java index 466be0e648..6d2147f658 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/impl/number/parse/SeriesMatcher.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/number/parse/SeriesMatcher.java @@ -12,7 +12,6 @@ import com.ibm.icu.impl.StringSegment; * matchers in the series succeed. Performs greedy matches within the context of the series. * * @author sffc - * @see AnyMatcher */ public class SeriesMatcher implements NumberParseMatcher { diff --git a/icu4j/main/classes/core/src/com/ibm/icu/number/CurrencyRounder.java b/icu4j/main/classes/core/src/com/ibm/icu/number/CurrencyRounder.java index 4474051266..aef07f6434 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/number/CurrencyRounder.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/number/CurrencyRounder.java @@ -8,4 +8,8 @@ package com.ibm.icu.number; */ @Deprecated public abstract class CurrencyRounder extends CurrencyPrecision { + // package private constructor just for blocking + // java compiler to generate public no-arg constructor. + CurrencyRounder() { + } } \ No newline at end of file diff --git a/icu4j/main/classes/core/src/com/ibm/icu/number/FormattedNumber.java b/icu4j/main/classes/core/src/com/ibm/icu/number/FormattedNumber.java index 965f5629b5..34030048ce 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/number/FormattedNumber.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/number/FormattedNumber.java @@ -105,7 +105,6 @@ public class FormattedNumber { *

* If a field occurs just once, calling this method will find that occurrence and return it. If a * field occurs multiple times, this method may be called repeatedly with the following pattern: - *

* *

      * FieldPosition fpos = new FieldPosition(NumberFormat.Field.GROUPING_SEPARATOR);
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/number/FractionRounder.java b/icu4j/main/classes/core/src/com/ibm/icu/number/FractionRounder.java
index 56e9150307..5fd1a6e7b3 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/number/FractionRounder.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/number/FractionRounder.java
@@ -8,4 +8,8 @@ package com.ibm.icu.number;
  */
 @Deprecated
 public abstract class FractionRounder extends FractionPrecision {
+    // package private constructor just for blocking
+    // java compiler to generate public no-arg constructor.
+    FractionRounder() {
+    }
 }
\ No newline at end of file
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/number/Rounder.java b/icu4j/main/classes/core/src/com/ibm/icu/number/Rounder.java
index f9db169e36..fa42942825 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/number/Rounder.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/number/Rounder.java
@@ -8,4 +8,8 @@ package com.ibm.icu.number;
  */
 @Deprecated
 public abstract class Rounder extends Precision {
+    // package private constructor just for blocking
+    // java compiler to generate public no-arg constructor.
+    Rounder() {
+    }
 }
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/number/Scale.java b/icu4j/main/classes/core/src/com/ibm/icu/number/Scale.java
index 2952e885a1..ef3e3868fd 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/number/Scale.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/number/Scale.java
@@ -74,7 +74,6 @@ public class Scale {
 
     /**
      * Multiply numbers by 100 before formatting. Useful for combining with a percent unit:
-     * 

* *

      * NumberFormatter.with().unit(NoUnit.PERCENT).multiplier(Multiplier.powerOfTen(2))
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/Edits.java b/icu4j/main/classes/core/src/com/ibm/icu/text/Edits.java
index d8394321e5..1e992f7fa1 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/text/Edits.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/text/Edits.java
@@ -19,7 +19,6 @@ import java.util.Arrays;
  * {@link Edits.Iterator} can be used for queries.
  * 

* There are four flavors of Edits.Iterator: - *

*

    *
  • {@link #getFineIterator()} retains full granularity of change edits. *
  • {@link #getFineChangesIterator()} retains full granularity of change edits, and when calling @@ -822,7 +821,10 @@ public final class Edits { /** * A string representation of the current edit represented by the iterator for debugging. You * should not depend on the contents of the return string. + * @internal + * @deprecated This API is ICU internal only. */ + @Deprecated @Override public String toString() { StringBuilder sb = new StringBuilder();