ICU-6237 After upgrading to Eclipse 3.5, added back @SupressWarnings and comment out "dead code".
X-SVN-Rev: 26507
This commit is contained in:
parent
5414398199
commit
4f6acc7e64
@ -187,7 +187,7 @@ public abstract class CharsetEncoderICU extends CharsetEncoder {
|
||||
* Sets fromUContext used in callbacks.
|
||||
*
|
||||
* @param newContext Object
|
||||
* @exception IllegalArgumentException
|
||||
* @exception IllegalArgumentException The object is an illegal argument for UContext.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public final void setFromUContext(Object newContext) {
|
||||
@ -849,9 +849,9 @@ public abstract class CharsetEncoderICU extends CharsetEncoder {
|
||||
* @return <code>CoderResult.malformedForLength(1)</code> or
|
||||
* <code>CoderResult.UNDERFLOW</code> if there is a problem, or
|
||||
* <code>null</code> if there isn't.
|
||||
* @see handleSurrogates(CharBuffer, char)
|
||||
* @see handleSurrogates(CharBuffer, int, char)
|
||||
* @see handleSurrogates(char[], int, int, char)
|
||||
* @see #handleSurrogates(CharBuffer, char)
|
||||
* @see #handleSurrogates(CharBuffer, int, char)
|
||||
* @see #handleSurrogates(char[], int, int, char)
|
||||
*/
|
||||
final CoderResult handleSurrogates(CharBuffer source, char lead) {
|
||||
if (!UTF16.isLeadSurrogate(lead)) {
|
||||
@ -891,9 +891,9 @@ public abstract class CharsetEncoderICU extends CharsetEncoder {
|
||||
* @return <code>CoderResult.malformedForLength(1)</code> or
|
||||
* <code>CoderResult.UNDERFLOW</code> if there is a problem, or <code>null</code> if
|
||||
* there isn't.
|
||||
* @see handleSurrogates(CharBuffer, char)
|
||||
* @see handleSurrogates(CharBuffer, int, char)
|
||||
* @see handleSurrogates(char[], int, int, char)
|
||||
* @see #handleSurrogates(CharBuffer, char)
|
||||
* @see #handleSurrogates(CharBuffer, int, char)
|
||||
* @see #handleSurrogates(char[], int, int, char)
|
||||
*/
|
||||
final CoderResult handleSurrogates(char[] sourceArray, int sourceIndex,
|
||||
int sourceLimit, char lead) {
|
||||
|
@ -72,7 +72,7 @@ class CharsetISCII extends CharsetICU {
|
||||
static final short MALAYALAM = KANNADA + 1;
|
||||
static final short DELTA = 0x80;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static final class ISCIILang {
|
||||
static final short DEF = 0x40;
|
||||
static final short RMN = 0x41;
|
||||
@ -108,6 +108,7 @@ class CharsetISCII extends CharsetICU {
|
||||
|
||||
private final String ISCII_CNV_PREFIX = "ISCII,version=";
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private final class UConverterDataISCII {
|
||||
int option;
|
||||
int contextCharToUnicode; /* previous Unicode codepoint for contextual analysis */
|
||||
|
@ -336,6 +336,7 @@ class CharsetISO2022 extends CharsetICU {
|
||||
// private static final byte UCNV_OPTIONS_VERSION_MASK = 0xf;
|
||||
private static final byte UCNV_2022_MAX_CONVERTERS = 10;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private class UConverterDataISO2022 {
|
||||
UConverterSharedData []myConverterArray;
|
||||
CharsetEncoderMBCS currentEncoder;
|
||||
|
@ -108,7 +108,8 @@ class CharsetSCSU extends CharsetICU{
|
||||
private static final int definePairTwo=5;
|
||||
private static final int defineOne=6;
|
||||
// };
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private final class SCSUData{
|
||||
/* dynamic window offsets, intitialize to default values from initialDynamicOffsets */
|
||||
int toUDynamicOffsets[] = new int[8] ;
|
||||
|
@ -687,6 +687,7 @@ final class CollationParsedRuleBuilder {
|
||||
|
||||
// private inner classes -------------------------------------------------
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static class CEGenerator {
|
||||
// package private data members --------------------------------------
|
||||
|
||||
@ -893,6 +894,7 @@ final class CollationParsedRuleBuilder {
|
||||
* Private class for combining mark table. The table is indexed by the class
|
||||
* value(0-255).
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private static class CombinClassTable {
|
||||
/**
|
||||
* accumulated numbers of combining marks.
|
||||
|
@ -140,6 +140,7 @@ public class RbnfScannerProviderImpl implements RbnfLenientScannerProvider {
|
||||
///CLOVER:OFF
|
||||
// The following method contains the same signature as findText
|
||||
// and has never been used by anything once.
|
||||
@SuppressWarnings("unused")
|
||||
public int[] findText2(String str, String key, int startingAt) {
|
||||
|
||||
CollationElementIterator strIter = collator.getCollationElementIterator(str);
|
||||
|
@ -620,7 +620,8 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
|
||||
}
|
||||
///CLOVER:OFF
|
||||
//The following would never be called since the parameter is false
|
||||
if (false) { // ordered
|
||||
//Eclipse stated the following is "dead code"
|
||||
/*if (false) { // ordered
|
||||
DateTimePatternGenerator results = new DateTimePatternGenerator();
|
||||
PatternInfo pinfo = new PatternInfo();
|
||||
for (DateTimeMatcher cur : skeleton2pattern.keySet()) {
|
||||
@ -636,7 +637,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
|
||||
results.addPattern(pattern, false, pinfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
///CLOVER:ON
|
||||
return output;
|
||||
}
|
||||
@ -1733,6 +1734,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
void extractFrom(DateTimeMatcher source, int fieldMask) {
|
||||
for (int i = 0; i < type.length; ++i) {
|
||||
if ((fieldMask & (1<<i)) != 0) {
|
||||
|
@ -161,7 +161,8 @@ final class DigitList {
|
||||
*/
|
||||
public BigInteger getBigInteger(boolean isPositive) {
|
||||
if (isZero()) return BigInteger.valueOf(0);
|
||||
if (false) {
|
||||
//Eclipse stated the following is "dead code"
|
||||
/*if (false) {
|
||||
StringBuffer stringRep = new StringBuffer(count);
|
||||
if (!isPositive) {
|
||||
stringRep.append('-');
|
||||
@ -174,7 +175,7 @@ final class DigitList {
|
||||
stringRep.append('0');
|
||||
}
|
||||
return new BigInteger(stringRep.toString());
|
||||
} else {
|
||||
} else*/ {
|
||||
int len = decimalAt > count ? decimalAt : count;
|
||||
if (!isPositive) {
|
||||
len += 1;
|
||||
|
@ -1676,10 +1676,11 @@ public class MessageFormat extends UFormat implements BaseFormat<Object,StringBu
|
||||
continue;
|
||||
}
|
||||
// int argRecursion = ((recursionProtection >> (argumentNumber*2)) & 0x3);
|
||||
if (false) { // if (argRecursion == 3){
|
||||
//Eclipse stated the following is "dead code"
|
||||
/*if (false) { // if (argRecursion == 3){
|
||||
// prevent loop!!!
|
||||
result.append('\uFFFD');
|
||||
} else {
|
||||
} else*/ {
|
||||
Object obj = arguments.get(argumentName);
|
||||
String arg = null;
|
||||
Format subFormatter = null;
|
||||
|
@ -555,10 +555,12 @@ public class PluralRules implements Serializable {
|
||||
this.constraint = constraint;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public Rule and(Constraint c) {
|
||||
return new ConstrainedRule(keyword, new AndConstraint(constraint, c));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public Rule or(Constraint c) {
|
||||
return new ConstrainedRule(keyword, new OrConstraint(constraint, c));
|
||||
}
|
||||
|
@ -2383,6 +2383,8 @@ public class UnicodeSet extends UnicodeFilter implements Iterable<String>, Compa
|
||||
clear();
|
||||
|
||||
while (mode != 2 && !chars.atEnd()) {
|
||||
//Eclipse stated the following is "dead code"
|
||||
/*
|
||||
if (false) {
|
||||
// Debugging assertion
|
||||
if (!((lastItem == 0 && op == 0) ||
|
||||
@ -2390,7 +2392,7 @@ public class UnicodeSet extends UnicodeFilter implements Iterable<String>, Compa
|
||||
(lastItem == 2 && (op == 0 || op == '-' || op == '&')))) {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
int c = 0;
|
||||
boolean literal = false;
|
||||
|
@ -3693,13 +3693,14 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
||||
}
|
||||
}
|
||||
} else if (startMs > targetMs) {
|
||||
if (false) {
|
||||
//Eclipse stated the following is "dead code"
|
||||
/*if (false) {
|
||||
// This works, and makes the code smaller, but costs
|
||||
// an extra object creation and an extra couple cycles
|
||||
// of calendar computation.
|
||||
setTimeInMillis(targetMs);
|
||||
min = -fieldDifference(new Date(startMs), field);
|
||||
}
|
||||
}*/
|
||||
int max = -1;
|
||||
// Find a value that is too small
|
||||
for (;;) {
|
||||
|
@ -652,10 +652,12 @@ public class SimpleTimeZone extends BasicTimeZone {
|
||||
|| prevMonthLength > 31) {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
} else {
|
||||
/* This parameter checking code is better for debugging, but
|
||||
* overkill for normal operation. Only one of these two blocks
|
||||
* should actually get compiled into the class file. */
|
||||
}
|
||||
//Eclipse stated the following is "dead code"
|
||||
/*else {
|
||||
// This parameter checking code is better for debugging, but
|
||||
// overkill for normal operation. Only one of these two blocks
|
||||
// should actually get compiled into the class file.
|
||||
if (era != GregorianCalendar.AD && era != GregorianCalendar.BC) {
|
||||
throw new IllegalArgumentException("Illegal era " + era);
|
||||
}
|
||||
@ -683,7 +685,7 @@ public class SimpleTimeZone extends BasicTimeZone {
|
||||
|| prevMonthLength > 31) {
|
||||
throw new IllegalArgumentException("Illegal previous month length " + prevMonthLength);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
int result = raw;
|
||||
|
||||
|
@ -552,6 +552,7 @@ public class BagFormatter {
|
||||
doAt(c);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public String format(Object o) {
|
||||
StringWriter sw = new StringWriter();
|
||||
PrintWriter pw = new PrintWriter(sw);
|
||||
|
@ -571,20 +571,24 @@ abstract public class Pick {
|
||||
private abstract static class ListPick extends Pick {
|
||||
protected Pick[] items = new Pick[0];
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
Pick simplify() {
|
||||
if (items.length > 1) return this;
|
||||
if (items.length == 1) return items[0];
|
||||
return null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
int size() {
|
||||
return items.length;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
Pick getLast() {
|
||||
return items[items.length-1];
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
void setLast(Pick newOne) {
|
||||
items[items.length-1] = newOne;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user