From: Yoshito Umaoka Date: Thu, 21 Feb 2013 20:58:42 +0000 (+0000) Subject: ICU-9722 Fixed java compiler and javadoc warnings. X-Git-Tag: milestone-59-0-1~3071 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9478c8e14f241f17ff8b6272d09026eeaf66f5d1;p=icu ICU-9722 Fixed java compiler and javadoc warnings. X-SVN-Rev: 33293 --- diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/CompactDecimalDataCache.java b/icu4j/main/classes/core/src/com/ibm/icu/text/CompactDecimalDataCache.java index d329c67c59a..6af4eeacf26 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/CompactDecimalDataCache.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/CompactDecimalDataCache.java @@ -93,11 +93,11 @@ class CompactDecimalDataCache { INSIDE_FULL // Inside single quote along with characters } - private static enum DataLocation { // Don't change order - LOCAL, // In local numbering system - LATIN, // In latin numbering system - ROOT // In root locale - } +// private static enum DataLocation { // Don't change order +// LOCAL, // In local numbering system +// LATIN, // In latin numbering system +// ROOT // In root locale +// } private static enum UResFlags { ANY, // Any locale will do. diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/DateIntervalFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/DateIntervalFormat.java index 957e6c08bd2..445c5fdcabc 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/DateIntervalFormat.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/DateIntervalFormat.java @@ -339,7 +339,6 @@ public class DateIntervalFormat extends UFormat { * * @param skeleton the skeleton of the date formatter * @param dtItvInfo the DateIntervalInfo object to be adopted. - * @param generator will be used for matching * @param simpleDateFormat will be used for formatting * * @internal diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/IdentifierInfo.java b/icu4j/main/classes/core/src/com/ibm/icu/text/IdentifierInfo.java index 86c7bcc49a3..7666e22380f 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/IdentifierInfo.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/IdentifierInfo.java @@ -7,7 +7,6 @@ package com.ibm.icu.text; import java.util.BitSet; -import java.util.Collection; import java.util.Comparator; import java.util.HashSet; import java.util.Iterator; @@ -18,8 +17,6 @@ import com.ibm.icu.lang.UCharacter; import com.ibm.icu.lang.UCharacterCategory; import com.ibm.icu.lang.UScript; import com.ibm.icu.text.SpoofChecker.RestrictionLevel; -import com.ibm.icu.text.UnicodeSet; -import com.ibm.icu.util.Freezable; /** * This class analyzes a possible identifier for script and identifier status. Use it by calling setIdentifierProfile @@ -37,6 +34,7 @@ import com.ibm.icu.util.Freezable; * * @author markdavis * @internal + * @deprecated This API is ICU internal only. */ public class IdentifierInfo { @@ -53,6 +51,7 @@ public class IdentifierInfo { * Create an identifier info object. Subsequently, call {@link #setIdentifier(String)}, etc. * {@link #setIdentifierProfile(UnicodeSet)} * @internal + * @deprecated This API is ICU internal only. */ public IdentifierInfo() { super(); @@ -72,6 +71,7 @@ public class IdentifierInfo { * @param identifierProfile the characters that are to be allowed in the identifier * @return self * @internal + * @deprecated This API is ICU internal only. */ public IdentifierInfo setIdentifierProfile(UnicodeSet identifierProfile) { this.identifierProfile.set(identifierProfile); @@ -83,6 +83,7 @@ public class IdentifierInfo { * * @return The characters that are to be allowed in the identifier. * @internal + * @deprecated This API is ICU internal only. */ public UnicodeSet getIdentifierProfile() { return new UnicodeSet(identifierProfile); @@ -94,6 +95,7 @@ public class IdentifierInfo { * @param identifier the identifier to analyze * @return self * @internal + * @deprecated This API is ICU internal only. */ public IdentifierInfo setIdentifier(String identifier) { this.identifier = identifier; @@ -162,6 +164,7 @@ public class IdentifierInfo { * * @return the identifier that was analyzed. * @internal + * @deprecated This API is ICU internal only. */ public String getIdentifier() { return identifier; @@ -172,6 +175,7 @@ public class IdentifierInfo { * * @return the set of explicit scripts. * @internal + * @deprecated This API is ICU internal only. */ public BitSet getScripts() { return (BitSet) requiredScripts.clone(); @@ -183,6 +187,7 @@ public class IdentifierInfo { * * @return the set of explicit scripts. * @internal + * @deprecated This API is ICU internal only. */ public Set getAlternates() { Set result = new HashSet(); @@ -197,6 +202,7 @@ public class IdentifierInfo { * * @return the set of explicit scripts. * @internal + * @deprecated This API is ICU internal only. */ public UnicodeSet getNumerics() { return new UnicodeSet(numerics); @@ -207,6 +213,7 @@ public class IdentifierInfo { * * @return the set of scripts that are in common among the alternates. * @internal + * @deprecated This API is ICU internal only. */ public BitSet getCommonAmongAlternates() { return (BitSet) commonAmongAlternates.clone(); @@ -226,6 +233,7 @@ public class IdentifierInfo { * * @return the restriction level. * @internal + * @deprecated This API is ICU internal only. */ public RestrictionLevel getRestrictionLevel() { if (!identifierProfile.containsAll(identifier) || getNumerics().size() > 1) { @@ -256,18 +264,19 @@ public class IdentifierInfo { } /** - * Get the number of scripts appearing in the identifier. - * Note: Common and Inherited scripts are omitted from the count. - * Note: If the identifier contains characters with alternate scripts - * (the character is used with more than one script), minimize - * the reported number of scripts by considering the character - * to be of a script that already appears elsewhere in the identifier - * when possible. - * The alternate script computation may not be perfect. The distinction - * between 0, 1 and > 1 scripts will be valid, however. - * @return the number of scripts. - * @internal - */ + * Get the number of scripts appearing in the identifier. + * Note: Common and Inherited scripts are omitted from the count. + * Note: If the identifier contains characters with alternate scripts + * (the character is used with more than one script), minimize + * the reported number of scripts by considering the character + * to be of a script that already appears elsewhere in the identifier + * when possible. + * The alternate script computation may not be perfect. The distinction + * between 0, 1 and > 1 scripts will be valid, however. + * @return the number of scripts. + * @internal + * @deprecated This API is ICU internal only. + */ public int getScriptCount() { // Note: Common and Inherited scripts were removed by setIdentifier(), and do not appear in fRequiredScripts. int count = requiredScripts.cardinality() + @@ -279,6 +288,7 @@ public class IdentifierInfo { /** * See Object.toString() * @internal + * @deprecated This API is ICU internal only. */ @Override public String toString() { @@ -305,6 +315,7 @@ public class IdentifierInfo { * @param alternates a set of BitSets of script values. * @return display form * @internal + * @deprecated This API is ICU internal only. */ public static String displayAlternates(Set alternates) { if (alternates.size() == 0) { @@ -326,6 +337,7 @@ public class IdentifierInfo { /** * Order BitSets, first by shortest, then by items. * @internal + * @deprecated This API is ICU internal only. */ public static final Comparator BITSET_COMPARATOR = new Comparator() { @@ -347,8 +359,9 @@ public class IdentifierInfo { * Produce a readable string of a set of scripts * * @param scripts a BitSet of UScript values - * @return + * @return a readable string of a set of scripts * @internal + * @deprecated This API is ICU internal only. */ public static String displayScripts(BitSet scripts) { StringBuilder result = new StringBuilder(); @@ -367,6 +380,7 @@ public class IdentifierInfo { * @param scriptsString the string to be parsed * @return BitSet of UScript values. * @internal + * @deprecated This API is ICU internal only. */ public static BitSet parseScripts(String scriptsString) { BitSet result = new BitSet(); @@ -384,6 +398,7 @@ public class IdentifierInfo { * @param scriptsSetString a list of alternates, separated by ; * @return a set of BitSets of UScript values * @internal + * @deprecated This API is ICU internal only. */ public static Set parseAlternates(String scriptsSetString) { Set result = new HashSet(); @@ -402,6 +417,7 @@ public class IdentifierInfo { * @param containee possible containee to be tested * @return true if container contains containee * @internal + * @deprecated This API is ICU internal only. */ public static final boolean contains(BitSet container, BitSet containee) { for (int i = containee.nextSetBit(0); i >= 0; i = containee.nextSetBit(i + 1)) { @@ -419,6 +435,7 @@ public class IdentifierInfo { * @param values values to be set in the bitset * @return modified bitset. * @internal + * @deprecated This API is ICU internal only. */ public static final BitSet set(BitSet bitset, int... values) { for (int value : values) { diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/LocaleData.java b/icu4j/main/classes/core/src/com/ibm/icu/util/LocaleData.java index c7d005f3ad9..30d557bd47d 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/LocaleData.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/LocaleData.java @@ -7,15 +7,13 @@ package com.ibm.icu.util; import java.util.MissingResourceException; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import com.ibm.icu.impl.ICUResourceBundle; import com.ibm.icu.text.UnicodeSet; import com.ibm.icu.util.ULocale.Category; /** - * A class for accessing miscelleneous data in the locale bundles + * A class for accessing miscellaneous data in the locale bundles * @author ram * @stable ICU 2.8 */ diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/text/SpoofCheckerTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/text/SpoofCheckerTest.java index 32c966cf00a..a5a10bd8040 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/text/SpoofCheckerTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/text/SpoofCheckerTest.java @@ -12,11 +12,9 @@ import java.io.Reader; import java.text.ParseException; import java.util.Arrays; import java.util.BitSet; -import java.util.Collections; import java.util.Comparator; import java.util.HashSet; import java.util.LinkedHashSet; -import java.util.List; import java.util.Random; import java.util.Set; import java.util.regex.Matcher; @@ -494,7 +492,7 @@ public class SpoofCheckerTest extends TestFmwk { .setChecks(SpoofChecker.MIXED_NUMBERS) // only check this .build(); boolean actualValue = sc.failsChecks(testString, checkResult); - boolean t = assertEquals("Testing spoof mixed numbers for '" + testString + "', ", expected.size() > 1, actualValue); + assertEquals("Testing spoof mixed numbers for '" + testString + "', ", expected.size() > 1, actualValue); } }