ICU-7097 Enabled java compiler option -Xlint:all,-deprecation,-dep-ann for API projects. Fixed redundant cast warnings detected by javac in various files. Added @SuppressWarnings for intended usage of fallthrough in switch statements. Enabled fallthrough warning in Eclipse project files.

X-SVN-Rev: 26568
This commit is contained in:
Yoshito Umaoka 2009-08-27 23:02:38 +00:00
parent 7e0113e5e8
commit eb9b97663b
81 changed files with 403 additions and 382 deletions

View File

@ -1,4 +1,4 @@
#Mon Aug 17 15:55:15 PDT 2009
#Thu Aug 27 17:46:17 EDT 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@ -19,7 +19,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning

View File

@ -3,3 +3,4 @@
#* others. All Rights Reserved. *
#*******************************************************************************
shared.dir = ../../shared
javac.compilerarg = -Xlint:all,-deprecation,-dep-ann

View File

@ -481,7 +481,8 @@ class CharsetBOCU1 extends CharsetICU {
LoopAfterTrail = true;
return regularLoop;
}
@SuppressWarnings("fallthrough")
private int regularLoop(CharBuffer source, ByteBuffer target, IntBuffer offsets){
if(!LoopAfterTrail){
/*restore real values*/
@ -1007,9 +1008,9 @@ class CharsetBOCU1 extends CharsetICU {
}
} else {
/* output surrogate pair */
target.put((char)UTF16.getLeadSurrogate(c));
target.put(UTF16.getLeadSurrogate(c));
if(target.hasRemaining()) {
target.put((char)UTF16.getTrailSurrogate(c));
target.put(UTF16.getTrailSurrogate(c));
if(offsets!=null){
offsets.put(sourceIndex);
offsets.put(sourceIndex);

View File

@ -382,7 +382,7 @@ public class CharsetCallback {
char temp;
do {
digit = (int)(i % radix);
digit = i % radix;
buffer[sourceIndex + length++] = (char)(digit <= 9 ? (0x0030+digit) : (0x0030+digit+7));
i = i/radix;
} while (i != 0 && (sourceIndex + length) < buffer.length);

View File

@ -73,7 +73,7 @@ public abstract class CharsetDecoderICU extends CharsetDecoder{
* @param cs The CharsetICU object containing information about how to charset to decode.
*/
CharsetDecoderICU(CharsetICU cs) {
super(cs, (float) (1/(float)cs.maxCharsPerByte), cs.maxCharsPerByte);
super(cs, (1/cs.maxCharsPerByte), cs.maxCharsPerByte);
}
/*
@ -591,7 +591,7 @@ public abstract class CharsetDecoderICU extends CharsetDecoder{
if(realSource!=null) {
int length;
Assert.assrt(preToULength==0);
length=(int)(source.limit()-source.position());
length = source.limit() - source.position();
if(length>0) {
//UConverterUtility.uprv_memcpy(preToUArray, preToUBegin, pArgs.sourceArray, pArgs.sourceBegin, length);
source.get(preToUArray, preToUBegin, length);

View File

@ -437,7 +437,7 @@ public abstract class CharsetEncoderICU extends CharsetEncoder {
* need not check cnv.preFromULength==0 because a replay (<0) will cause
* s<sourceLimit before converterSawEndOfInput is checked
*/
converterSawEndOfInput = (boolean) (cr.isUnderflow() && flush
converterSawEndOfInput = (cr.isUnderflow() && flush
&& source.remaining() == 0 && fromUChar32 == 0);
/* no callback called yet for this iteration */

View File

@ -163,7 +163,7 @@ class CharsetHZ extends CharsetICU {
} else if (trailIsOk) {
/* report a single illegal byte and continue with the following DBCS starter byte */
source.position(source.position() - 1);
mySourceChar = (int)leadByte;
mySourceChar = leadByte;
} else {
/* report a pair of illegal bytes if the second byte is not a DBCS starter */
/* add another bit so that the code below writes 2 bytes in case of error */

View File

@ -159,7 +159,7 @@ public abstract class CharsetICU extends Charset{
}
/*public*/ static final Charset getCharset(String icuCanonicalName, String javaCanonicalName, String[] aliases){
String className = (String) algorithmicCharsets.get(icuCanonicalName);
String className = algorithmicCharsets.get(icuCanonicalName);
if(className==null){
//all the cnv files are loaded as MBCS
className = "com.ibm.icu.charset.CharsetMBCS";

View File

@ -137,9 +137,9 @@ class CharsetISCII extends CharsetICU {
this.defDeltaToUnicode = (short)(lookupInitialData[option & UCNV_OPTIONS_VERSION_MASK].uniLang * UniLang.DELTA); /* defDeltaToUnicode */
this.currentDeltaFromUnicode = (short)(lookupInitialData[option & UCNV_OPTIONS_VERSION_MASK].uniLang * UniLang.DELTA); /* currentDeltaFromUnicode */
this.currentDeltaToUnicode = (short)(lookupInitialData[option & UCNV_OPTIONS_VERSION_MASK].uniLang * UniLang.DELTA); /* currentDeltaToUnicode */
this.currentMaskToUnicode = (short)lookupInitialData[option & UCNV_OPTIONS_VERSION_MASK].maskEnum; /* currentMaskToUnicode */
this.currentMaskFromUnicode = (short)lookupInitialData[option & UCNV_OPTIONS_VERSION_MASK].maskEnum; /* currentMaskFromUnicode */
this.defMaskToUnicode = (short)lookupInitialData[option & UCNV_OPTIONS_VERSION_MASK].maskEnum; /* defMaskToUnicode */
this.currentMaskToUnicode = lookupInitialData[option & UCNV_OPTIONS_VERSION_MASK].maskEnum; /* currentMaskToUnicode */
this.currentMaskFromUnicode = lookupInitialData[option & UCNV_OPTIONS_VERSION_MASK].maskEnum; /* currentMaskFromUnicode */
this.defMaskToUnicode = lookupInitialData[option & UCNV_OPTIONS_VERSION_MASK].maskEnum; /* defMaskToUnicode */
this.isFirstBuffer = true; /* isFirstBuffer */
this.resetToDefaultToUnicode = false; /* resetToDefaultToUnicode */
this.prevToUnicodeStatus = 0x0000;
@ -826,7 +826,8 @@ class CharsetISCII extends CharsetICU {
this.toUnicodeStatus = 0xFFFF;
extraInfo.initialize();
}
@SuppressWarnings("fallthrough")
protected CoderResult decodeLoop(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush) {
CoderResult cr = CoderResult.UNDERFLOW;
int targetUniChar = 0x0000;
@ -1327,7 +1328,7 @@ class CharsetISCII extends CharsetICU {
*/
char temp = 0;
temp = (char)(ATR << 8);
temp += (char)((short)lookupInitialData[range].isciiLang & UConverterConstants.UNSIGNED_BYTE_MASK);
temp += (char)(lookupInitialData[range].isciiLang & UConverterConstants.UNSIGNED_BYTE_MASK);
/* reset */
deltaChanged = false;
/* now append ATR and language code */

View File

@ -181,7 +181,7 @@ class CharsetISO2022 extends CharsetICU {
* corresponding to SO, SI, and ESC.
*/
private static boolean IS_2022_CONTROL(int c) {
return (((c)<0x20) && ((((int)1<<c) & 0x0800c000) != 0));
return (c<0x20) && (((1<<c) & 0x0800c000) != 0);
}
/*
@ -257,7 +257,7 @@ class CharsetISO2022 extends CharsetICU {
int returnValue;
UConverterSharedData tempSharedData = myConverterData.currentConverter.sharedData;
myConverterData.currentConverter.sharedData = sharedData;
returnValue = ((CharsetDecoderMBCS)myConverterData.currentDecoder).simpleGetNextUChar(source, useFallback);
returnValue = myConverterData.currentDecoder.simpleGetNextUChar(source, useFallback);
myConverterData.currentConverter.sharedData = tempSharedData;
return returnValue;
@ -525,6 +525,7 @@ class CharsetISO2022 extends CharsetICU {
};
/* runs through a state machine to determine the escape sequence - codepage correspondence */
@SuppressWarnings("fallthrough")
private CoderResult changeState_2022(CharsetDecoderICU decoder, ByteBuffer source, int var) {
CoderResult err = CoderResult.UNDERFLOW;
boolean DONE = false;
@ -839,6 +840,8 @@ class CharsetISO2022 extends CharsetICU {
bytes[0] = (byte)(UConverterConstants.UNSIGNED_BYTE_MASK & c1);
bytes[1] = (byte)(UConverterConstants.UNSIGNED_BYTE_MASK & c2);
}
@SuppressWarnings("fallthrough")
protected CoderResult decodeLoop(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush) {
boolean gotoGetTrail = false;
boolean gotoEscape = false;
@ -1098,7 +1101,8 @@ class CharsetISO2022 extends CharsetICU {
super.implReset();
myConverterData.reset();
}
@SuppressWarnings("fallthrough")
protected CoderResult decodeLoop(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush) {
CoderResult err = CoderResult.UNDERFLOW;
byte[] tempBuf = new byte[3];
@ -1269,12 +1273,12 @@ class CharsetISO2022 extends CharsetICU {
targetUniChar -= 0x0010000;
target.put((char)(0xd800+(char)(targetUniChar>>10)));
if (offsets != null) {
offsets.array()[target.position()-1] = (int)(source.position() - (mySourceChar <= 0xff ? 1 : 2));
offsets.array()[target.position()-1] = source.position() - (mySourceChar <= 0xff ? 1 : 2);
}
if (target.hasRemaining()) {
target.put((char)(0xdc00+(char)(targetUniChar&0x3ff)));
if (offsets != null) {
offsets.array()[target.position()-1] = (int)(source.position() - (mySourceChar <= 0xff ? 1 : 2));
offsets.array()[target.position()-1] = source.position() - (mySourceChar <= 0xff ? 1 : 2);
}
} else {
charErrorBufferArray[charErrorBufferLength++] = (char)(0xdc00+(char)(targetUniChar&0x3ff));
@ -1469,7 +1473,7 @@ class CharsetISO2022 extends CharsetICU {
* converter, can handle truncated and illegal input etc.
*/
if (toULength > 0) {
cnv.toUBytesArray = (byte[])(toUBytesArray.clone());
cnv.toUBytesArray = toUBytesArray.clone();
}
cnv.toULength = toULength;
@ -1501,13 +1505,13 @@ class CharsetISO2022 extends CharsetICU {
/* copy input/error/overflow buffers */
if (cnv.toULength > 0) {
toUBytesArray = (byte[])(cnv.toUBytesArray.clone());
toUBytesArray = cnv.toUBytesArray.clone();
}
toULength = cnv.toULength;
if (err.isOverflow()) {
if (cnv.charErrorBufferLength > 0) {
charErrorBufferArray = (char[])(cnv.charErrorBufferArray.clone());
charErrorBufferArray = cnv.charErrorBufferArray.clone();
}
charErrorBufferLength = cnv.charErrorBufferLength;
cnv.charErrorBufferLength = 0;
@ -2607,7 +2611,7 @@ class CharsetISO2022 extends CharsetICU {
if (err.isOverflow()) {
if (myConverterData.currentEncoder.errorBufferLength > 0) {
encoder.errorBuffer = (byte[])(myConverterData.currentEncoder.errorBuffer.clone());
encoder.errorBuffer = myConverterData.currentEncoder.errorBuffer.clone();
}
encoder.errorBufferLength = myConverterData.currentEncoder.errorBufferLength;
myConverterData.currentEncoder.errorBufferLength = 0;
@ -2626,7 +2630,7 @@ class CharsetISO2022 extends CharsetICU {
if (err.isOverflow()) {
if (myConverterData.currentEncoder.errorBufferLength > 0) {
errorBuffer = (byte[])(myConverterData.currentEncoder.errorBuffer.clone());
errorBuffer = myConverterData.currentEncoder.errorBuffer.clone();
}
errorBufferLength = myConverterData.currentEncoder.errorBufferLength;
myConverterData.currentEncoder.errorBufferLength = 0;

View File

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2008, International Business Machines Corporation and *
* Copyright (C) 2008-2009, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -788,6 +788,7 @@ class CharsetLMBCS extends CharsetICU {
* one of the 12 groups. The return value is the number of bytes written
* starting at pStartLMBCS (if any).
*/
@SuppressWarnings("fallthrough")
private int LMBCSConversionWorker(short group, byte[] LMBCS, char pUniChar, short[] lastConverterIndex, boolean[] groups_tried) {
byte pLMBCS = 0;
UConverterSharedData xcnv = extraInfo.OptGrpConverter[group];

View File

@ -617,7 +617,7 @@ class CharsetMBCS extends CharsetICU {
/* reconsitute the initial part of stage 2 from the mbcsIndex */
{
int stageUTF8Length=((int)(mbcsTable.maxFastUChar+1))>>6;
int stageUTF8Length=(mbcsTable.maxFastUChar+1)>>6;
int stageUTF8Index=0;
int st1, st2, st3, i;
@ -749,7 +749,7 @@ class CharsetMBCS extends CharsetICU {
action = MBCS_ENTRY_FINAL_ACTION(entry);
if (action == MBCS_STATE_VALID_DIRECT_16) {
/* output BMP code point */
c = (char)MBCS_ENTRY_FINAL_VALUE_16(entry);
c = MBCS_ENTRY_FINAL_VALUE_16(entry);
} else if (action == MBCS_STATE_VALID_16) {
int finalOffset = offset+MBCS_ENTRY_FINAL_VALUE_16(entry);
c = unicodeCodeUnits[finalOffset];
@ -774,7 +774,7 @@ class CharsetMBCS extends CharsetICU {
}
} else if (action == MBCS_STATE_VALID_DIRECT_20) {
/* output supplementary code point */
c = (int)(MBCS_ENTRY_FINAL_VALUE(entry)+0x10000);
c = MBCS_ENTRY_FINAL_VALUE(entry)+0x10000;
} else {
c = UConverterConstants.U_SENTINEL;
}
@ -1137,7 +1137,7 @@ class CharsetMBCS extends CharsetICU {
static final int MBCS_STATE_CHANGE_ONLY = MBCS_STATE_ILLEGAL + 1;
static int MBCS_ENTRY_SET_STATE(int entry, int state) {
return (int)(((entry)&0x80ffffff)|((int)(state)<<24L));
return (entry&0x80ffffff)|(state<<24L);
}
static int MBCS_ENTRY_STATE(int entry) {
@ -1150,7 +1150,7 @@ class CharsetMBCS extends CharsetICU {
}
static int MBCS_ENTRY_FINAL(int state, int action, int value) {
return (int) (0x80000000 | ((int) (state) << 24L) | ((action) << 20L) | (value));
return 0x80000000 | (state << 24L) | (action << 20L) | value;
}
static boolean MBCS_ENTRY_IS_TRANSITION(int entry) {
@ -1992,7 +1992,7 @@ class CharsetMBCS extends CharsetICU {
unicodeCodeUnits = sharedData.mbcs.unicodeCodeUnits;
/* get the converter state from UConverter */
offset = (int)toUnicodeStatus;
offset = toUnicodeStatus;
byteIndex = toULength;
bytes = toUBytesArray;
@ -2055,7 +2055,7 @@ class CharsetMBCS extends CharsetICU {
if (MBCS_ENTRY_FINAL_IS_VALID_DIRECT_16(entry)) {
/* output BMP code point */
++sourceArrayIndex;
target.put((char)MBCS_ENTRY_FINAL_VALUE_16(entry));
target.put(MBCS_ENTRY_FINAL_VALUE_16(entry));
if (offsets != null) {
offsets.put(sourceIndex);
sourceIndex = ++nextSourceIndex;
@ -2116,7 +2116,7 @@ class CharsetMBCS extends CharsetICU {
}
byteIndex = 0;
} else if (c == 0xfffe) {
if (isFallbackUsed() && (entry = (int)getFallback(sharedData.mbcs, offset)) != 0xfffe) {
if (isFallbackUsed() && (entry = getFallback(sharedData.mbcs, offset)) != 0xfffe) {
/* output fallback BMP code point */
target.put((char)entry);
if (offsets != null) {
@ -2130,7 +2130,7 @@ class CharsetMBCS extends CharsetICU {
}
} else if (action == MBCS_STATE_VALID_DIRECT_16) {
/* output BMP code point */
target.put((char)MBCS_ENTRY_FINAL_VALUE_16(entry));
target.put(MBCS_ENTRY_FINAL_VALUE_16(entry));
if (offsets != null) {
offsets.put(sourceIndex);
}
@ -2219,7 +2219,7 @@ class CharsetMBCS extends CharsetICU {
} else if (action == MBCS_STATE_FALLBACK_DIRECT_16) {
if (isFallbackUsed()) {
/* output BMP code point */
target.put((char)MBCS_ENTRY_FINAL_VALUE_16(entry));
target.put(MBCS_ENTRY_FINAL_VALUE_16(entry));
if (offsets != null) {
offsets.put(sourceIndex);
}
@ -2276,7 +2276,7 @@ class CharsetMBCS extends CharsetICU {
source.position(sourceArrayIndex);
byteIndex = toU(byteIndex, source, target, offsets, sourceIndex, flush, cr);
sourceArrayIndex = source.position();
sourceIndex = nextSourceIndex += (int)(sourceArrayIndex - sourceBeginIndex);
sourceIndex = nextSourceIndex += (sourceArrayIndex - sourceBeginIndex);
if (cr[0].isError() || cr[0].isOverflow()) {
/* not mappable or buffer overflow */
@ -2344,7 +2344,7 @@ class CharsetMBCS extends CharsetICU {
/* test the most common case first */
if (MBCS_ENTRY_FINAL_IS_VALID_DIRECT_16(entry)) {
/* output BMP code point */
target.put((char) MBCS_ENTRY_FINAL_VALUE_16(entry));
target.put(MBCS_ENTRY_FINAL_VALUE_16(entry));
--targetCapacity;
continue;
}
@ -2357,7 +2357,7 @@ class CharsetMBCS extends CharsetICU {
if (action == MBCS_STATE_FALLBACK_DIRECT_16) {
if (isFallbackUsed()) {
/* output BMP code point */
target.put((char) MBCS_ENTRY_FINAL_VALUE_16(entry));
target.put(MBCS_ENTRY_FINAL_VALUE_16(entry));
--targetCapacity;
continue;
}
@ -2392,7 +2392,7 @@ class CharsetMBCS extends CharsetICU {
source.position(sourceArrayIndex);
toULength = toU((byte) 1, source, target, offsets, sourceIndex, flush, cr);
sourceArrayIndex = source.position();
sourceIndex += 1 + (int) (sourceArrayIndex - lastSource);
sourceIndex += 1 + (sourceArrayIndex - lastSource);
if (cr[0].isError()) {
/* not mappable or buffer overflow */
@ -2474,7 +2474,7 @@ class CharsetMBCS extends CharsetICU {
/* test the most common case first */
if (MBCS_ENTRY_FINAL_IS_VALID_DIRECT_16(entry)) {
/* output BMP code point */
target.put((char) MBCS_ENTRY_FINAL_VALUE_16(entry));
target.put(MBCS_ENTRY_FINAL_VALUE_16(entry));
if (offsets != null) {
offsets.put(sourceIndex);
}
@ -2517,7 +2517,7 @@ class CharsetMBCS extends CharsetICU {
} else if (action == MBCS_STATE_FALLBACK_DIRECT_16) {
if (isFallbackUsed()) {
/* output BMP code point */
target.put((char) MBCS_ENTRY_FINAL_VALUE_16(entry));
target.put(MBCS_ENTRY_FINAL_VALUE_16(entry));
if (offsets != null) {
offsets.put(sourceIndex);
}
@ -2546,7 +2546,7 @@ class CharsetMBCS extends CharsetICU {
source.position(sourceArrayIndex);
toULength = toU((byte) 1, source, target, offsets, sourceIndex, flush, cr);
sourceArrayIndex = source.position();
sourceIndex += 1 + (int) (sourceArrayIndex - sourceBeginIndex);
sourceIndex += 1 + (sourceArrayIndex - sourceBeginIndex);
if (cr[0].isError()) {
/* not mappable or buffer overflow */
@ -2785,6 +2785,7 @@ class CharsetMBCS extends CharsetICU {
preFromUFirstCP = UConverterConstants.U_SENTINEL;
}
@SuppressWarnings("fallthrough")
protected CoderResult encodeLoop(CharBuffer source, ByteBuffer target, IntBuffer offsets, boolean flush) {
CoderResult[] cr = { CoderResult.UNDERFLOW };
// if (!source.hasRemaining() && fromUChar32 == 0)
@ -2845,7 +2846,7 @@ class CharsetMBCS extends CharsetICU {
c = fromUChar32;
if (outputType == MBCS_OUTPUT_2_SISO) {
prevLength = (int) fromUnicodeStatus;
prevLength = fromUnicodeStatus;
if (prevLength == 0) {
/* set the real value */
prevLength = 1;
@ -3697,6 +3698,7 @@ class CharsetMBCS extends CharsetICU {
return 0;
}
@SuppressWarnings("fallthrough")
private CoderResult writeFromU(int value, ByteBuffer target, IntBuffer offsets, int srcIndex) {
ByteBuffer cx = sharedData.mbcs.extIndexes;
@ -3742,7 +3744,7 @@ class CharsetMBCS extends CharsetICU {
/* with correct data we have length>0 */
if ((prevLength = (int) fromUnicodeStatus) != 0) {
if ((prevLength = fromUnicodeStatus) != 0) {
/* handle SI/SO stateful output */
byte shiftByte;
@ -4484,7 +4486,7 @@ class CharsetMBCS extends CharsetICU {
x.c = fromU(x.c, source, target, null, x.sourceIndex, x.nextSourceIndex, flush, cr);
x.sourceArrayIndex = source.position();
x.nextSourceIndex += x.sourceArrayIndex - sourceBegin;
x.prevLength = (int) fromUnicodeStatus;
x.prevLength = fromUnicodeStatus;
if (cr[0].isError()) {
/* not mappable or buffer overflow */
@ -4663,7 +4665,8 @@ class CharsetMBCS extends CharsetICU {
public CharsetEncoder newEncoder() {
return new CharsetEncoderMBCS(this);
}
@SuppressWarnings("fallthrough")
void MBCSGetFilteredUnicodeSetForUnicode(UConverterSharedData data, UnicodeSet setFillIn, int which, int filter){
UConverterMBCSTable mbcsTable;
char[] table;
@ -4749,7 +4752,7 @@ class CharsetMBCS extends CharsetICU {
st3+=table[stage2*2 + ++st2];
if(st3!=0){
//if((st3=table[stage2+st2])!=0){
stage3 = st3Multiplier*16*(int)(st3&UConverterConstants.UNSIGNED_SHORT_MASK);
stage3 = st3Multiplier*16*(st3&UConverterConstants.UNSIGNED_SHORT_MASK);
/* get the roundtrip flags for the stage 3 block */
st3>>=16;
@ -4928,7 +4931,7 @@ class CharsetMBCS extends CharsetICU {
stage3b = (IntBuffer)ARRAY(cx, EXT_FROM_U_STAGE_3B_INDEX,int.class );
stage1Length = cx.asIntBuffer().get(EXT_FROM_U_STAGE_1_LENGTH);
useFallback =(boolean)(which==ROUNDTRIP_AND_FALLBACK_SET);
useFallback = (which==ROUNDTRIP_AND_FALLBACK_SET);
c = 0;
if(filter == UCNV_SET_FILTER_2022_CN) {
@ -4949,13 +4952,13 @@ class CharsetMBCS extends CharsetICU {
if(st3!= 0){
ps3 = st3;
do {
value = stage3b.get((int)(UConverterConstants.UNSIGNED_SHORT_MASK&stage3.get(ps3++)));
value = stage3b.get(UConverterConstants.UNSIGNED_SHORT_MASK&stage3.get(ps3++));
if(value==0){
/* no mapping do nothing */
}else if (FROM_U_IS_PARTIAL(value)){
length = 0;
length=UTF16.append(s, length, c);
extGetUnicodeSetString(cx,setFillIn,useFallback,minLength,c,s,length,(int)FROM_U_GET_PARTIAL_INDEX(value));
extGetUnicodeSetString(cx,setFillIn,useFallback,minLength,c,s,length,FROM_U_GET_PARTIAL_INDEX(value));
} else if ((useFallback ? (value&FROM_U_RESERVED_MASK)==0 :((value&(FROM_U_ROUNDTRIP_FLAG|FROM_U_RESERVED_MASK))== FROM_U_ROUNDTRIP_FLAG)) &&
FROM_U_GET_LENGTH(value)>=minLength){

View File

@ -144,7 +144,7 @@ public final class CharsetProviderICU extends CharsetProvider{
}
}
private static final Charset getCharset(String icuCanonicalName) throws IOException{
String[] aliases = (String[])getAliases(icuCanonicalName);
String[] aliases = getAliases(icuCanonicalName);
String canonicalName = getJavaCanonicalName(icuCanonicalName);
/* Concat the option string to the icuCanonicalName so that the options can be handled properly

View File

@ -694,10 +694,10 @@ class CharsetSCSU extends CharsetICU{
}
private boolean isInOffsetWindowOrDirect(int offsetValue, int a){
return (boolean)((a & UConverterConstants.UNSIGNED_INT_MASK)<=(offsetValue & UConverterConstants.UNSIGNED_INT_MASK)+0x7f &
return (a & UConverterConstants.UNSIGNED_INT_MASK)<=(offsetValue & UConverterConstants.UNSIGNED_INT_MASK)+0x7f &
((a & UConverterConstants.UNSIGNED_INT_MASK)>=(offsetValue & UConverterConstants.UNSIGNED_INT_MASK) ||
((a & UConverterConstants.UNSIGNED_INT_MASK)<=0x7f && ((a & UConverterConstants.UNSIGNED_INT_MASK)>=0x20
|| ((1L<<(a & UConverterConstants.UNSIGNED_INT_MASK))&0x2601)!=0))));
|| ((1L<<(a & UConverterConstants.UNSIGNED_INT_MASK))&0x2601)!=0)));
}
private byte getNextDynamicWindow(){
@ -751,11 +751,11 @@ class CharsetSCSU extends CharsetICU{
((c-0x1d000)&UConverterConstants.UNSIGNED_INT_MASK)<=(0x1ffff-0x1d000)){
/*This character is in the code range for a "small", i.e, reasonably windowable, script*/
offset = c&0x7fffff80;
return (int)(c>>7);
return (c>>7);
}else if(0xe000<=(c&UConverterConstants.UNSIGNED_INT_MASK) && (c&UConverterConstants.UNSIGNED_INT_MASK)!=0xfeff && (c&UConverterConstants.UNSIGNED_INT_MASK) < 0xfff0){
/*for these characters we need to take the gapOffset into account*/
offset=(c)&0x7fffff80;
return (int)((c-gapOffset)>>7);
return ((c-gapOffset)>>7);
}else{
return -1;
}
@ -844,7 +844,7 @@ class CharsetSCSU extends CharsetICU{
dynamicWindow = window;
currentOffset = data.fromUDynamicOffsets[dynamicWindow];
useDynamicWindow(dynamicWindow);
c = (((int)(SC0+dynamicWindow))<<8 | (c-currentOffset)|0x80);
c = ((SC0+dynamicWindow)<<8 | (c-currentOffset)|0x80);
length = 2;
label = OutputBytes;
return label;
@ -855,8 +855,8 @@ class CharsetSCSU extends CharsetICU{
dynamicWindow=getNextDynamicWindow();
currentOffset = data.fromUDynamicOffsets[dynamicWindow]=offset;
useDynamicWindow(dynamicWindow);
c = ((int)(SDX<<24) | (int)(dynamicWindow<<21)|
(int)(code<<8)| (c- currentOffset) |0x80 );
c = ((SDX<<24) | (dynamicWindow<<21)|
(code<<8)| (c- currentOffset) |0x80);
// c = (((SDX)<<25) | (dynamicWindow<<21)|
// (code<<8)| (c- currentOffset) |0x80 );
length = 4;
@ -870,7 +870,7 @@ class CharsetSCSU extends CharsetICU{
offsets.put(sourceIndex);
}
--targetCapacity;
c = ((int)(lead<<16))|trail;
c = (lead<<16)|trail;
length = 4;
label = OutputBytes;
return label;
@ -896,13 +896,13 @@ class CharsetSCSU extends CharsetICU{
dynamicWindow = window;
currentOffset = data.fromUDynamicOffsets[dynamicWindow];
useDynamicWindow(dynamicWindow);
c = ((int)((SC0+window)<<8)) | (c- currentOffset) | 0x80;
c = ((SC0+window)<<8) | (c- currentOffset) | 0x80;
length = 2;
label = OutputBytes;
return label;
} else {
/*quote from dynamic window*/
c = ((int)((SQ0+window)<<8)) | (c - data.fromUDynamicOffsets[window]) |
c = ((SQ0+window)<<8) | (c - data.fromUDynamicOffsets[window]) |
0x80;
length = 2;
label = OutputBytes;
@ -910,7 +910,7 @@ class CharsetSCSU extends CharsetICU{
}
} else if((window = getWindow(staticOffsets))>=0){
/*quote from static window*/
c = ((int)((SQ0+window)<<8)) | (c - staticOffsets[window]);
c = ((SQ0+window)<<8) | (c - staticOffsets[window]);
length = 2;
label = OutputBytes;
return label;
@ -919,8 +919,8 @@ class CharsetSCSU extends CharsetICU{
dynamicWindow = getNextDynamicWindow();
currentOffset = data.fromUDynamicOffsets[dynamicWindow]=offset;
useDynamicWindow(dynamicWindow);
c = ((int)((SD0+dynamicWindow)<<16)) | (int)(code<<8)|
(c- currentOffset) | 0x80;
c = ((SD0+dynamicWindow)<<16) | (code<<8)|
(c - currentOffset) | 0x80;
length = 3;
label = OutputBytes;
return label;
@ -991,7 +991,7 @@ class CharsetSCSU extends CharsetICU{
|| (((c-0x41)&UConverterConstants.UNSIGNED_INT_MASK))<26)){
/*ASCII digit or letter*/
isSingleByteMode = true;
c |=((int)((UC0+dynamicWindow)<<8))|c;
c |=((UC0+dynamicWindow)<<8)|c;
length = 2;
label = OutputBytes;
return label;
@ -1001,7 +1001,7 @@ class CharsetSCSU extends CharsetICU{
dynamicWindow = window;
currentOffset = data.fromUDynamicOffsets[dynamicWindow];
useDynamicWindow(dynamicWindow);
c = ((int)((UC0+dynamicWindow)<<8)) | (c- currentOffset) | 0x80;
c = ((UC0+dynamicWindow)<<8) | (c- currentOffset) | 0x80;
length = 2;
label = OutputBytes;
return label;
@ -1011,8 +1011,8 @@ class CharsetSCSU extends CharsetICU{
dynamicWindow = getNextDynamicWindow();
currentOffset = data.fromUDynamicOffsets[dynamicWindow]=offset;
useDynamicWindow(dynamicWindow);
c = ((int)((UD0+dynamicWindow)<<16)) | (int)(code<<8)
|(c- currentOffset) | 0x80;
c = ((UD0+dynamicWindow)<<16) | (code<<8)
|(c - currentOffset) | 0x80;
length = 3;
label = OutputBytes;
return label;
@ -1052,7 +1052,7 @@ class CharsetSCSU extends CharsetICU{
if(source.hasRemaining()){
/*test the following code unit*/
trail = source.get(source.position());
if(UTF16.isTrailSurrogate((char)trail)){
if(UTF16.isTrailSurrogate(trail)){
source.position(source.position()+1);
++nextSourceIndex;
c = UCharacter.getCodePoint((char)c, trail);
@ -1151,7 +1151,8 @@ class CharsetSCSU extends CharsetICU{
fromUChar32 = c;
LabelLoop = false;
}
@SuppressWarnings("fallthrough")
private int outputBytes(CharBuffer source, ByteBuffer target, IntBuffer offsets){
int label;
//int targetCapacity = target.limit()-target.position();

View File

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2007-2008, International Business Machines Corporation and *
* Copyright (C) 2007-2009, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -382,7 +382,7 @@ class CharsetUTF7 extends CharsetICU {
/* illegal: + immediately followed by something other than base64 minus sign */
/* include the plus sign in the reported sequence */
--sourceIndex;
toUBytesArray[0]=(byte)PLUS;
toUBytesArray[0]=PLUS;
toUBytesArray[1]=(byte)b;
byteIndex=2;
cr=CoderResult.malformedForLength(sourceArrayIndex);
@ -402,7 +402,7 @@ class CharsetUTF7 extends CharsetICU {
// illegal: & immediately followed by something other than base64 or minus sign
// include the ampersand in the reported sequence
--sourceIndex;
toUBytesArray[0]=(byte)AMPERSAND;
toUBytesArray[0]=AMPERSAND;
toUBytesArray[1]=(byte)b;
byteIndex=2;
}
@ -426,7 +426,7 @@ class CharsetUTF7 extends CharsetICU {
if (base64Counter==-1) {
/* & at the very end of the input */
/* make the ampersand the reported sequence */
toUBytesArray[0]=(byte)AMPERSAND;
toUBytesArray[0]=AMPERSAND;
byteIndex=1;
}
/* else if (base64Counter!=-1) byteIndex remains 0 because ther is no particular byte sequence */
@ -448,7 +448,7 @@ class CharsetUTF7 extends CharsetICU {
}
}
/* set the converter state */
toUnicodeStatus=((int)inDirectMode<<24 | (int)(((short)base64Counter & UConverterConstants.UNSIGNED_BYTE_MASK)<<16) | (int)bits);
toUnicodeStatus=(inDirectMode<<24 | (((short)base64Counter & UConverterConstants.UNSIGNED_BYTE_MASK)<<16) | (int)bits);
toULength=byteIndex;
return cr;
@ -509,9 +509,9 @@ class CharsetUTF7 extends CharsetICU {
} else if ((!useIMAP && c==PLUS) || (useIMAP && c==AMPERSAND)) {
/* IMAP: output &- for & */
/* UTF-7: output +- for + */
target.put(useIMAP ? (byte)AMPERSAND : (byte)PLUS);
target.put(useIMAP ? AMPERSAND : PLUS);
if (target.hasRemaining()) {
target.put((byte)MINUS);
target.put(MINUS);
if (offsets != null) {
offsets.put(sourceIndex);
offsets.put(sourceIndex++);
@ -530,7 +530,7 @@ class CharsetUTF7 extends CharsetICU {
} else {
/* un-read this character and switch to unicode mode */
source.position(source.position() - 1);
target.put(useIMAP ? (byte)AMPERSAND : (byte)PLUS);
target.put(useIMAP ? AMPERSAND : PLUS);
if (offsets != null) {
offsets.put(sourceIndex);
}
@ -568,7 +568,7 @@ class CharsetUTF7 extends CharsetICU {
if (FROM_BASE_64[c]!=-1 || useIMAP) {
/* need to terminate with a minus */
if (target.hasRemaining()) {
target.put((byte)MINUS);
target.put(MINUS);
if (offsets!=null) {
offsets.put(sourceIndex-1);
}
@ -721,7 +721,7 @@ class CharsetUTF7 extends CharsetICU {
if (useIMAP) {
/* IMAP: need to terminate with a minus */
if (target.hasRemaining()) {
target.put((byte)MINUS);
target.put(MINUS);
if (offsets!=null) {
offsets.put(sourceIndex - 1);
}
@ -735,7 +735,7 @@ class CharsetUTF7 extends CharsetICU {
fromUnicodeStatus=((status&0xf0000000) | 0x1000000); /* keep version, inDirectMode=TRUE */
} else {
/* set the converter state back */
fromUnicodeStatus=((status&0xf0000000) | ((int)inDirectMode<<24) | (int)(((short)base64Counter & UConverterConstants.UNSIGNED_BYTE_MASK)<<16) | ((int)bits));
fromUnicodeStatus=((status&0xf0000000) | (inDirectMode<<24) | (((short)base64Counter & UConverterConstants.UNSIGNED_BYTE_MASK)<<16) | ((int)bits));
}
return cr;

View File

@ -1,6 +1,6 @@
/**
*******************************************************************************
* Copyright (C) 2006-2007, International Business Machines Corporation and *
* Copyright (C) 2006-2009, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*
@ -50,11 +50,11 @@ final class UConverterAlias {
static byte[] gNormalizedStringTable = null;
static final String GET_STRING(int idx) {
return new String(gStringTable, 2 * idx, (int) strlen(gStringTable, 2 * idx));
return new String(gStringTable, 2 * idx, strlen(gStringTable, 2 * idx));
}
private static final String GET_NORMALIZED_STRING(int idx) {
return new String(gNormalizedStringTable, 2 * idx, (int) strlen(gNormalizedStringTable, 2 * idx));
return new String(gNormalizedStringTable, 2 * idx, strlen(gNormalizedStringTable, 2 * idx));
}
public static final int strlen(byte[] sArray, int sBegin)
@ -136,15 +136,15 @@ final class UConverterAlias {
if (tableStart < minTocLength) {
throw new IOException("Invalid data format.");
}
gConverterList = new int[(int)tableArray[converterListIndex]];
gTagList= new int[(int)tableArray[tagListIndex]];
gAliasList = new int[(int)tableArray[aliasListIndex]];
gUntaggedConvArray = new int[(int)tableArray[untaggedConvArrayIndex]];
gTaggedAliasArray = new int[(int)tableArray[taggedAliasArrayIndex]];
gTaggedAliasLists = new int[(int)tableArray[taggedAliasListsIndex]];
gOptionTable = new int[(int)tableArray[optionTableIndex]];
gStringTable = new byte[(int)tableArray[stringTableIndex]*2];
gNormalizedStringTable = new byte[(int)tableArray[normalizedStringTableIndex]*2];
gConverterList = new int[tableArray[converterListIndex]];
gTagList= new int[tableArray[tagListIndex]];
gAliasList = new int[tableArray[aliasListIndex]];
gUntaggedConvArray = new int[tableArray[untaggedConvArrayIndex]];
gTaggedAliasArray = new int[tableArray[taggedAliasArrayIndex]];
gTaggedAliasLists = new int[tableArray[taggedAliasListsIndex]];
gOptionTable = new int[tableArray[optionTableIndex]];
gStringTable = new byte[tableArray[stringTableIndex]*2];
gNormalizedStringTable = new byte[tableArray[normalizedStringTableIndex]*2];
reader.read(gConverterList, gTagList,
gAliasList, gUntaggedConvArray,
@ -219,7 +219,7 @@ final class UConverterAlias {
break; /* We haven't moved, and it wasn't found. */
}
lastMid = mid;
aliasToCompare = GET_NORMALIZED_STRING(gAliasList[(int) mid]);
aliasToCompare = GET_NORMALIZED_STRING(gAliasList[mid]);
result = alias.compareTo(aliasToCompare);
if (result < 0) {
@ -232,7 +232,7 @@ final class UConverterAlias {
* alias in gAliasList is unique, but different standards may
* map an alias to different converters.
*/
if ((gUntaggedConvArray[(int) mid] & AMBIGUOUS_ALIAS_MAP_BIT) != 0) {
if ((gUntaggedConvArray[mid] & AMBIGUOUS_ALIAS_MAP_BIT) != 0) {
isAmbigous[0]=true;
}
/* State whether the canonical converter name contains an option.
@ -243,7 +243,7 @@ final class UConverterAlias {
&& ((gMainTable.untaggedConvArray[mid] & UCNV_CONTAINS_OPTION_BIT) != 0))
|| !containsCnvOptionInfo);
}*/
return gUntaggedConvArray[(int) mid] & CONVERTER_INDEX_MASK;
return gUntaggedConvArray[mid] & CONVERTER_INDEX_MASK;
}
}
return Integer.MAX_VALUE;
@ -310,7 +310,7 @@ final class UConverterAlias {
afterDigit = true;
break;
default:
c1 = (char)type; /* lowercased letter */
c1 = type; /* lowercased letter */
afterDigit = false;
break;
}
@ -366,7 +366,7 @@ final class UConverterAlias {
afterDigit1 = true;
break;
default:
c1 = (char)type; /* lowercased letter */
c1 = type; /* lowercased letter */
afterDigit1 = false;
break;
}
@ -391,7 +391,7 @@ final class UConverterAlias {
afterDigit2 = true;
break;
default:
c2 = (char)type; /* lowercased letter */
c2 = type; /* lowercased letter */
afterDigit2 = false;
break;
}
@ -418,8 +418,8 @@ final class UConverterAlias {
int convNum = findConverter(alias, isAmbigous);
if (convNum < gConverterList.length) {
/* tagListNum - 1 is the ALL tag */
int listOffset = gTaggedAliasArray[(int) ((gTagList.length - 1)
* gConverterList.length + convNum)];
int listOffset = gTaggedAliasArray[(gTagList.length - 1)
* gConverterList.length + convNum];
if (listOffset != 0) {
return gTaggedAliasLists[listOffset];
@ -452,8 +452,8 @@ final class UConverterAlias {
int convNum = findConverter(alias,isAmbigous);
if (convNum < gConverterList.length) {
/* tagListNum - 1 is the ALL tag */
int listOffset = gTaggedAliasArray[(int) ((gTagList.length - 1)
* gConverterList.length + convNum)];
int listOffset = gTaggedAliasArray[(gTagList.length - 1)
* gConverterList.length + convNum];
if (listOffset != 0) {
//int listCount = gTaggedAliasListsArray[listOffset];
@ -498,7 +498,7 @@ final class UConverterAlias {
int[] currListArray = gTaggedAliasLists;
int currListArrayIndex = listOffset + 1;
if (currListArray[0] != 0) {
return GET_STRING(currListArray[(int) currListArrayIndex]);
return GET_STRING(currListArray[currListArrayIndex]);
}
}
}
@ -542,7 +542,7 @@ final class UConverterAlias {
int convNum = findTaggedConverterNum(alias, standard);
if (convNum < gConverterList.length) {
return GET_STRING(gConverterList[(int) convNum]);
return GET_STRING(gConverterList[convNum]);
}
}
@ -584,7 +584,7 @@ final class UConverterAlias {
if (gTagList != null) {
int tagNum;
for (tagNum = 0; tagNum < gTagList.length; tagNum++) {
if (tagName.equals(GET_STRING(gTagList[(int) tagNum]))) {
if (tagName.equals(GET_STRING(gTagList[tagNum]))) {
return tagNum;
}
}
@ -606,10 +606,10 @@ final class UConverterAlias {
if (tagNum < (gTagList.length - NUM_HIDDEN_TAGS)
&& convNum < gConverterList.length) {
listOffset = gTaggedAliasArray[(int) (tagNum
* gConverterList.length + convNum)];
listOffset = gTaggedAliasArray[tagNum
* gConverterList.length + convNum];
if (listOffset != 0
&& gTaggedAliasLists[(int) listOffset + 1] != 0) {
&& gTaggedAliasLists[listOffset + 1] != 0) {
return listOffset;
}
if (isAmbigous[0]==true) {
@ -620,15 +620,15 @@ final class UConverterAlias {
*/
for (idx = 0; idx < gTaggedAliasArray.length; idx++) {
listOffset = gTaggedAliasArray[(int) idx];
listOffset = gTaggedAliasArray[idx];
if (listOffset != 0 && isAliasInList(alias, listOffset)) {
int currTagNum = idx / gConverterList.length;
int currConvNum = (idx - currTagNum
* gConverterList.length);
int tempListOffset = gTaggedAliasArray[(int) (tagNum
* gConverterList.length + currConvNum)];
int tempListOffset = gTaggedAliasArray[tagNum
* gConverterList.length + currConvNum];
if (tempListOffset != 0
&& gTaggedAliasLists[(int) tempListOffset + 1] != 0) {
&& gTaggedAliasLists[tempListOffset + 1] != 0) {
return tempListOffset;
}
/*
@ -664,8 +664,8 @@ final class UConverterAlias {
if (tagNum < (gTagList.length - NUM_HIDDEN_TAGS)
&& convNum < gConverterList.length) {
listOffset = gTaggedAliasArray[(int) (tagNum
* gConverterList.length + convNum)];
listOffset = gTaggedAliasArray[tagNum
* gConverterList.length + convNum];
if (listOffset != 0 && isAliasInList(alias, listOffset)) {
return convNum;
}
@ -678,7 +678,7 @@ final class UConverterAlias {
int convStart = (tagNum) * gConverterList.length;
int convLimit = (tagNum + 1) * gConverterList.length;
for (idx = convStart; idx < convLimit; idx++) {
listOffset = gTaggedAliasArray[(int) idx];
listOffset = gTaggedAliasArray[idx];
if (listOffset != 0 && isAliasInList(alias, listOffset)) {
return idx - convStart;
}
@ -697,15 +697,15 @@ final class UConverterAlias {
private static boolean isAliasInList(String alias, int listOffset) {
if (listOffset != 0) {
int currAlias;
int listCount = gTaggedAliasLists[(int) listOffset];
int listCount = gTaggedAliasLists[listOffset];
/* +1 to skip listCount */
int[] currList = gTaggedAliasLists;
int currListArrayIndex = listOffset + 1;
for (currAlias = 0; currAlias < listCount; currAlias++) {
if (currList[(int) (currAlias + currListArrayIndex)] != 0
if (currList[currAlias + currListArrayIndex] != 0
&& compareNames(
alias,
GET_STRING(currList[(int) (currAlias + currListArrayIndex)])) == 0) {
GET_STRING(currList[currAlias + currListArrayIndex])) == 0) {
return true;
}
}
@ -736,7 +736,7 @@ final class UConverterAlias {
}
/* We can't have more than "*converterTable" converters to open */
localConverterList = new String[(int) gConverterList.length];
localConverterList = new String[gConverterList.length];
localConverterCount = 0;

View File

@ -1,4 +1,4 @@
#Mon Aug 17 15:50:57 PDT 2009
#Thu Aug 27 17:46:56 EDT 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@ -19,7 +19,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning

View File

@ -3,3 +3,4 @@
#* others. All Rights Reserved. *
#*******************************************************************************
shared.dir = ../../shared
javac.compilerarg = -Xlint:all,-deprecation,-dep-ann

View File

@ -1,6 +1,6 @@
/**
*******************************************************************************
* Copyright (C) 1996-2008, International Business Machines Corporation and *
* Copyright (C) 1996-2009, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*
@ -2088,10 +2088,10 @@ public final class CollationElementIterator
// won't be in the normalization buffer if something like this
// happens
// Move Jamos into normalization buffer
m_buffer_.append((char)L);
m_buffer_.append((char)V);
m_buffer_.append(L);
m_buffer_.append(V);
if (T != HANGUL_TBASE_) {
m_buffer_.append((char)T);
m_buffer_.append(T);
}
m_FCDLimit_ = m_source_.getIndex();
m_FCDStart_ = m_FCDLimit_ - 1;
@ -2492,7 +2492,6 @@ public final class CollationElementIterator
if (!isBackwardsStart()){
backupInternalState(m_utilSpecialBackUp_);
char32 = previousChar();
ch = (char)ch;
if (UTF16.isTrailSurrogate(ch)){
if (!isBackwardsStart()) {
char lead = (char)previousChar();

View File

@ -310,7 +310,7 @@ public final class CollationKey implements Comparable<CollationKey>
if (target == null) {
return false;
}
CollationKey other = (CollationKey)target;
CollationKey other = target;
int i = 0;
while (true) {
if (m_key_[i] != other.m_key_[i]) {

View File

@ -1729,8 +1729,7 @@ final class CollationParsedRuleBuilder {
while (currentSequenceLen > 0) {
m_utilToken_.m_source_ = (currentSequenceLen << 24)
| expOffset;
CollationRuleParser.Token expt = (CollationRuleParser.Token) m_parser_.m_hashTable_
.get(m_utilToken_);
CollationRuleParser.Token expt = m_parser_.m_hashTable_.get(m_utilToken_);
if (expt != null
&& expt.m_strength_ != CollationRuleParser.TOKEN_RESET_) {
// expansion is tailored
@ -3591,8 +3590,8 @@ final class CollationParsedRuleBuilder {
size = maxexpansion.m_endExpansionCE_.size();
collator.m_expansionEndCE_ = new int[size - 1];
for (int i = 1; i < size; i++) {
collator.m_expansionEndCE_[i - 1] = ((Integer) maxexpansion.m_endExpansionCE_
.get(i)).intValue();
collator.m_expansionEndCE_[i - 1] = maxexpansion.m_endExpansionCE_
.get(i).intValue();
}
collator.m_expansionEndCEMaxSize_ = new byte[size - 1];
for (int i = 1; i < size; i++) {
@ -3665,8 +3664,7 @@ final class CollationParsedRuleBuilder {
StringBuffer cpPointer = table.m_codePoints_;
Vector<Integer> CEPointer = table.m_CEs_;
for (int i = 0; i < tsize; i++) {
BasicContractionTable bct = (BasicContractionTable) table.m_elements_
.get(i);
BasicContractionTable bct = table.m_elements_.get(i);
int size = bct.m_CEs_.size();
char ccMax = 0;
char ccMin = 255;
@ -3687,14 +3685,12 @@ final class CollationParsedRuleBuilder {
cpPointer.insert(offset,
(char) (((ccMin == ccMax) ? 1 : 0 << 8) | ccMax));
for (int j = 0; j < size; j++) {
if (isContractionTableElement(((Integer) CEPointer.get(offset
+ j)).intValue())) {
if (isContractionTableElement(CEPointer.get(offset + j).intValue())) {
int ce = CEPointer.get(offset + j).intValue();
CEPointer.set(offset + j,
new Integer(constructSpecialCE(getCETag(ce),
((Integer) table.m_offsets_
.get(getContractionOffset(ce)))
.intValue())));
table.m_offsets_.get(getContractionOffset(ce))
.intValue())));
}
}
}
@ -4133,7 +4129,7 @@ final class CollationParsedRuleBuilder {
CombinClassTable cmLookup = t.cmLookup;
char[] combiningMarks = { cMark };
int cMarkClass = (int) (UCharacter.getCombiningClass(cMark) & 0xFF);
int cMarkClass = UCharacter.getCombiningClass(cMark) & 0xFF;
String comMark = new String(combiningMarks);
int noOfPrecomposedChs = maxComp;

View File

@ -1148,6 +1148,7 @@ final class CollationRuleParser
* @exception ParseException
* thrown when rule parsing fails
*/
@SuppressWarnings("fallthrough")
private int parseNextToken(boolean startofrules) throws ParseException
{
// parsing part
@ -1430,8 +1431,9 @@ final class CollationRuleParser
case 0x0040 : // '@'
if (newstrength == TOKEN_UNSET_) {
m_options_.m_isFrenchCollation_ = true;
break;
}
break;
}
// fall through
case 0x007C : //|
// this means we have actually been reading prefix part
// we want to store read characters to the prefix part

View File

@ -679,7 +679,7 @@ public abstract class Collator implements Comparator<Object>, Cloneable
result[0] = defcoll;
int idx = 1;
while (itr.hasNext()) {
String collKey = (String)itr.next();
String collKey = itr.next();
if (!collKey.equals(defcoll)) {
result[idx++] = collKey;
}

View File

@ -1,4 +1,4 @@
#Thu Aug 13 11:03:35 PDT 2009
#Thu Aug 27 17:47:12 EDT 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@ -11,13 +11,15 @@ org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=ignore
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
@ -35,6 +37,7 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
@ -44,6 +47,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore

View File

@ -3,3 +3,4 @@
#* others. All Rights Reserved. *
#*******************************************************************************
shared.dir = ../../shared
javac.compilerarg = -Xlint:all,-deprecation,-dep-ann

View File

@ -48,7 +48,7 @@ public final class DateNumberFormat extends NumberFormat {
*/
private void initialize(ULocale loc,char zeroDigitIn) {
char[] elems = (char[])CACHE.get(loc);
char[] elems = CACHE.get(loc);
if (elems == null) {
// Missed cache
ICUResourceBundle rb = (ICUResourceBundle)UResourceBundle.getBundleInstance(ICUResourceBundle.ICU_BASE_NAME, loc);

View File

@ -312,7 +312,7 @@ public class ICUResourceBundle extends UResourceBundle {
// ignore the err - just skip that resource
}
}
return (String[])keywords.toArray(new String[0]);
return keywords.toArray(new String[0]);
}
/**
@ -811,7 +811,7 @@ public class ICUResourceBundle extends UResourceBundle {
+ aKey, this.getClass().getName(), aKey);
}
}
((ICUResourceBundle)obj).setLoadingStatus(((ICUResourceBundle)requested).getLocaleID());
obj.setLoadingStatus(((ICUResourceBundle)requested).getLocaleID());
return obj;
}
@ -1094,7 +1094,7 @@ public class ICUResourceBundle extends UResourceBundle {
ICUResourceBundle current = bundle;
while (st.hasMoreTokens()) {
String subKey = st.nextToken();
sub = (ICUResourceBundle)((ICUResourceBundle) current).get(subKey, table, requested);
sub = (ICUResourceBundle)current.get(subKey, table, requested);
if (sub == null) {
break;
}
@ -1148,7 +1148,7 @@ public class ICUResourceBundle extends UResourceBundle {
Integer indexKey = null;
if (lookup != null) {
indexKey = Integer.valueOf(index);
res = (UResourceBundle)lookup.get(indexKey);
res = lookup.get(indexKey);
}
if (res == null) {
boolean[] alias = new boolean[1];

View File

@ -449,18 +449,18 @@ public final class ICUResourceBundleReader implements ICUBinary.Authenticate {
return chars;
}
private int getInt(int offset) {
return (int)((resourceBytes[offset] << 24) |
((resourceBytes[offset+1] & 0xff) << 16) |
((resourceBytes[offset+2] & 0xff) << 8) |
((resourceBytes[offset+3] & 0xff)));
return (resourceBytes[offset] << 24) |
((resourceBytes[offset+1] & 0xff) << 16) |
((resourceBytes[offset+2] & 0xff) << 8) |
((resourceBytes[offset+3] & 0xff));
}
private int[] getInts(int offset, int count) {
int[] ints = new int[count];
for(int i = 0; i < count; offset += 4, ++i) {
ints[i] = (int)((resourceBytes[offset] << 24) |
((resourceBytes[offset+1] & 0xff) << 16) |
((resourceBytes[offset+2] & 0xff) << 8) |
((resourceBytes[offset+3] & 0xff)));
ints[i] = (resourceBytes[offset] << 24) |
((resourceBytes[offset+1] & 0xff) << 16) |
((resourceBytes[offset+2] & 0xff) << 8) |
((resourceBytes[offset+3] & 0xff));
}
return ints;
}

View File

@ -87,11 +87,11 @@ public final class NormalizerImpl {
//private static final int EXTRA_JAMO_T=EXTRA_SURROGATE_TOP+3;
/* norm32 value constants using >16 bits */
private static final long MIN_SPECIAL = (long)(0xfc000000 & UNSIGNED_INT_MASK);
private static final long SURROGATES_TOP = (long)(0xfff00000 & UNSIGNED_INT_MASK);
private static final long MIN_HANGUL = (long)(0xfff00000 & UNSIGNED_INT_MASK);
//private static final long MIN_JAMO_V = (long)(0xfff20000 & UNSIGNED_INT_MASK);
private static final long JAMO_V_TOP = (long)(0xfff30000 & UNSIGNED_INT_MASK);
private static final long MIN_SPECIAL = 0xfc000000 & UNSIGNED_INT_MASK;
private static final long SURROGATES_TOP = 0xfff00000 & UNSIGNED_INT_MASK;
private static final long MIN_HANGUL = 0xfff00000 & UNSIGNED_INT_MASK;
//private static final long MIN_JAMO_V = 0xfff20000 & UNSIGNED_INT_MASK;
private static final long JAMO_V_TOP = 0xfff30000 & UNSIGNED_INT_MASK;
/* indexes[] value names */
@ -131,7 +131,7 @@ public final class NormalizerImpl {
private static final int AUX_COMP_EX_SHIFT = 10;
private static final int AUX_NFC_SKIPPABLE_F_SHIFT = 12;
private static final int AUX_MAX_FNC = ((int)1<<AUX_COMP_EX_SHIFT);
private static final int AUX_MAX_FNC = 1<<AUX_COMP_EX_SHIFT;
private static final int AUX_UNSAFE_MASK = (int)((1<<AUX_UNSAFE_SHIFT) & UNSIGNED_INT_MASK);
private static final int AUX_FNC_MASK = (int)((AUX_MAX_FNC-1) & UNSIGNED_INT_MASK);
private static final int AUX_COMP_EX_MASK = (int)((1<<AUX_COMP_EX_SHIFT) & UNSIGNED_INT_MASK);
@ -213,8 +213,8 @@ public final class NormalizerImpl {
* @return data offset or 0 if there is no data for the lead surrogate
*/
/* auxTrie: the folding offset is in bits 9..0 of the 16-bit trie result */
public int getFoldingOffset(int value){
return (int)(value &AUX_FNC_MASK)<<SURROGATE_BLOCK_BITS;
public int getFoldingOffset(int value) {
return (value & AUX_FNC_MASK) << SURROGATE_BLOCK_BITS;
}
}
@ -857,9 +857,9 @@ public final class NormalizerImpl {
if(i==length) {
return true;
} else if((c=src[i++])<MIN_WITH_LEAD_CC) {
prevCC=(int)-c;
prevCC = -c;
} else if((fcd16=getFCD16(c))==0) {
prevCC=0;
prevCC = 0;
} else {
break;
}
@ -892,18 +892,16 @@ public final class NormalizerImpl {
//
// check the combining order
cc=(int)(fcd16>>8);
cc = fcd16>>8;
if(cc!=0) {
if(prevCC<0) {
// the previous character was <_NORM_MIN_WITH_LEAD_CC,
// we need to get its trail cc
//
if(!nx_contains(nx, (int)-prevCC)) {
prevCC=(int)(FCDTrieImpl.fcdTrie.getBMPValue(
(char)-prevCC)&0xff
);
if(!nx_contains(nx, -prevCC)) {
prevCC = FCDTrieImpl.fcdTrie.getBMPValue((char)-prevCC) & 0xff;
} else {
prevCC=0; /* excluded: fcd16==0 */
prevCC = 0; /* excluded: fcd16==0 */
}
}
@ -912,7 +910,7 @@ public final class NormalizerImpl {
return false;
}
}
prevCC=(int)(fcd16&0xff);
prevCC = fcd16 & 0xff;
}
}
@ -1053,11 +1051,11 @@ public final class NormalizerImpl {
// initialize
if(!compat) {
minNoMaybe=(int)indexes[INDEX_MIN_NFD_NO_MAYBE];
qcMask=QC_NFD;
minNoMaybe = indexes[INDEX_MIN_NFD_NO_MAYBE];
qcMask = QC_NFD;
} else {
minNoMaybe=(int)indexes[INDEX_MIN_NFKD_NO_MAYBE];
qcMask=QC_NFKD;
minNoMaybe = indexes[INDEX_MIN_NFKD_NO_MAYBE];
qcMask = QC_NFKD;
}
if(c<minNoMaybe) {
@ -1176,7 +1174,7 @@ public final class NormalizerImpl {
/* copy these code units all at once */
if(srcIndex!=prevSrc) {
length=(int)(srcIndex-prevSrc);
length = srcIndex - prevSrc;
if((destIndex+length)<=destLimit) {
System.arraycopy(src,prevSrc,dest,destIndex,length);
}
@ -2028,7 +2026,7 @@ public final class NormalizerImpl {
/* copy these code units all at once */
if(srcIndex!=prevSrc) {
length=(int)(srcIndex-prevSrc);
length = srcIndex - prevSrc;
if((destIndex+length)<=destLimit) {
System.arraycopy(src,prevSrc,dest,destIndex,length);
}
@ -2446,9 +2444,9 @@ public final class NormalizerImpl {
if(srcStart==srcLimit) {
break;
} else if((c=src[srcStart])<MIN_WITH_LEAD_CC) {
prevCC=(int)-c;
prevCC = -c;
} else if((fcd16=getFCD16(c))==0) {
prevCC=0;
prevCC = 0;
} else {
break;
}
@ -2467,7 +2465,7 @@ public final class NormalizerImpl {
/* copy these code units all at once */
if(srcStart!=prevSrc) {
length=(int)(srcStart-prevSrc);
length = srcStart - prevSrc;
if((destIndex+length)<=destLimit) {
System.arraycopy(src,prevSrc,dest,destIndex,length);
}
@ -2479,10 +2477,10 @@ public final class NormalizerImpl {
if(prevCC<0) {
/* the previous character was <_NORM_MIN_WITH_LEAD_CC, we
* need to get its trail cc */
if(!nx_contains(nx, (int)-prevCC)) {
prevCC=(int)(getFCD16((int)-prevCC)&0xff);
if(!nx_contains(nx, -prevCC)) {
prevCC = getFCD16(-prevCC) & 0xff;
} else {
prevCC=0; /* excluded: fcd16==0 */
prevCC = 0; /* excluded: fcd16==0 */
}
/*
* set a pointer to this below-U+0300 character;
@ -2532,13 +2530,13 @@ public final class NormalizerImpl {
fcd16=0; /* excluded: fcd16==0 */
}
/* check the combining order, get the lead cc */
cc=(int)(fcd16>>8);
cc = fcd16 >> 8;
if(cc==0 || cc>=prevCC) {
/* the order is ok */
if(cc==0) {
decompStart=prevSrc;
}
prevCC=(int)(fcd16&0xff);
prevCC = fcd16 & 0xff;
/* just append (c, c2) */
length= c2==0 ? 1 : 2;
@ -2556,7 +2554,7 @@ public final class NormalizerImpl {
* is now going to be decomposed;
* prevSrc is set to after what was copied
*/
destIndex-=(int)(prevSrc-decompStart);
destIndex -= (prevSrc - decompStart);
/*
* find the part of the source that needs to be decomposed;
@ -2590,7 +2588,7 @@ public final class NormalizerImpl {
public static boolean isFullCompositionExclusion(int c) {
if(isFormatVersion_2_1) {
int aux =AuxTrieImpl.auxTrie.getCodePointValue(c);
return (boolean)((aux & AUX_COMP_EX_MASK)!=0);
return (aux & AUX_COMP_EX_MASK) != 0;
} else {
return false;
}
@ -2599,7 +2597,7 @@ public final class NormalizerImpl {
public static boolean isCanonSafeStart(int c) {
if(isFormatVersion_2_1) {
int aux = AuxTrieImpl.auxTrie.getCodePointValue(c);
return (boolean)((aux & AUX_UNSAFE_MASK)==0);
return (aux & AUX_UNSAFE_MASK) == 0;
} else {
return false;
}
@ -2710,7 +2708,7 @@ public final class NormalizerImpl {
//i|=((int)h & 0x1f00)<<8; /* add high bits from high(c) */
int temp = ((int)h & 0x1f00)<<8;
i|=temp; /* add high bits from high(c) */
fillSet.setToOne((int)i);
fillSet.setToOne(i);
return true;
}
}
@ -2997,7 +2995,7 @@ public final class NormalizerImpl {
long norm32;
int length=0;
norm32 = (long) ((UNSIGNED_INT_MASK) & NormTrieImpl.normTrie.getCodePointValue(c));
norm32 = UNSIGNED_INT_MASK & NormTrieImpl.normTrie.getCodePointValue(c);
if((norm32 & QC_NFD)!=0) {
if(isNorm32HangulOrJamo(norm32)) {
/* Hangul syllable: decompose algorithmically */
@ -3085,15 +3083,15 @@ public final class NormalizerImpl {
while ((i+offset1<=s1.length() && j+offset2<=s2.length())) {
if ((cmp!=0) || (s1.charAt(i) != s2.charAt(j))) {
if(i>0 && j>0 &&
(UTF16.isLeadSurrogate((char)s1.charAt(i-1)) ||
UTF16.isLeadSurrogate((char)s2.charAt(j-1)))) {
(UTF16.isLeadSurrogate(s1.charAt(i-1)) ||
UTF16.isLeadSurrogate(s2.charAt(j-1)))) {
// Current codepoint may be the low surrogate pair.
return cmpEquivFold(s1.toCharArray(),i-1,s1.length(),
s2.toCharArray(),j-1,s2.length(),
options);
}
else if (UTF16.isLeadSurrogate((char)s1.charAt(i))||
UTF16.isLeadSurrogate((char)s2.charAt(j))) {
else if (UTF16.isLeadSurrogate(s1.charAt(i))||
UTF16.isLeadSurrogate(s2.charAt(j))) {
return cmpEquivFold(s1.toCharArray(),i,s1.length(),
s2.toCharArray(),j,s2.length(),
options);

View File

@ -254,9 +254,9 @@ public class OlsonTimeZone extends BasicTimeZone {
finalZone.setID(getID());
other.finalZone = (SimpleTimeZone)finalZone.clone();
}
other.transitionTimes = (int[])transitionTimes.clone();
other.typeData = (byte[])typeData.clone();
other.typeOffsets = (int[])typeOffsets.clone();
other.transitionTimes = transitionTimes.clone();
other.typeData = typeData.clone();
other.typeOffsets = typeOffsets.clone();
return other;
}
@ -447,7 +447,7 @@ public class OlsonTimeZone extends BasicTimeZone {
if ((transitionTimes.length<0 || transitionTimes.length>0x7FFF) ) {
throw new IllegalArgumentException("Invalid Format");
}
transitionCount = (int) transitionTimes.length;
transitionCount = transitionTimes.length;
// Type offsets list must be of even size, with size >= 2
r = res.get( 1);
@ -455,7 +455,7 @@ public class OlsonTimeZone extends BasicTimeZone {
if ((typeOffsets.length<2 || typeOffsets.length>0x7FFE || ((typeOffsets.length&1)!=0))) {
throw new IllegalArgumentException("Invalid Format");
}
typeCount = (int) typeOffsets.length >> 1;
typeCount = typeOffsets.length >> 1;
// Type data must be of the same size as the transitions list
r = res.get(2);
@ -519,7 +519,7 @@ public class OlsonTimeZone extends BasicTimeZone {
}
public OlsonTimeZone(String id){
UResourceBundle top = (UResourceBundle) UResourceBundle.getBundleInstance(ICUResourceBundle.ICU_BASE_NAME, "zoneinfo", ICUResourceBundle.ICU_DATA_CLASS_LOADER);
UResourceBundle top = UResourceBundle.getBundleInstance(ICUResourceBundle.ICU_BASE_NAME, "zoneinfo", ICUResourceBundle.ICU_DATA_CLASS_LOADER);
UResourceBundle res = ZoneMeta.openOlsonResource(id);
construct(top, res);
if(finalZone!=null){
@ -539,7 +539,7 @@ public class OlsonTimeZone extends BasicTimeZone {
private static final int UNSIGNED_BYTE_MASK =0xFF;
private int getInt(byte val){
return (int)(UNSIGNED_BYTE_MASK & val);
return UNSIGNED_BYTE_MASK & val;
}
private void getHistoricalOffset(long date, boolean local,
@ -628,11 +628,11 @@ public class OlsonTimeZone extends BasicTimeZone {
}
private int rawOffset(int index){
return typeOffsets[(int)(index << 1)];
return typeOffsets[index << 1];
}
private int dstOffset(int index){
return typeOffsets[(int)((index << 1) + 1)];
return typeOffsets[(index << 1) + 1];
}
// temp

View File

@ -46,7 +46,7 @@ public class PluralRulesLoader {
ULocale[] locales = new ULocale[keys.size()];
int n = 0;
for (Iterator<String> iter = keys.iterator(); iter.hasNext();) {
locales[n++] = ULocale.createCanonical((String) iter.next());
locales[n++] = ULocale.createCanonical(iter.next());
}
return locales;
}
@ -66,7 +66,7 @@ public class PluralRulesLoader {
return ULocale.ROOT; // ultimate fallback
}
ULocale result = (ULocale) getRulesIdToEquivalentULocaleMap().get(
ULocale result = getRulesIdToEquivalentULocaleMap().get(
rulesId);
if (result == null) {
return ULocale.ROOT; // ultimate fallback

View File

@ -158,8 +158,8 @@ public final class Punycode {
cpBuffer[srcCPCount++]=0;
dest[destLength]=
caseFlags!=null ?
asciiCaseMap((char)c, caseFlags[j]) :
(char)c;
asciiCaseMap(c, caseFlags[j]) :
c;
}
++destLength;
} else {

View File

@ -1,7 +1,7 @@
/*
*******************************************************************************
*
* Copyright (C) 2004-2007, International Business Machines
* Copyright (C) 2004-2009, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@ -202,7 +202,7 @@ public final class UCaseProps {
value=exceptions[excOffset++];
value=(value<<16)|exceptions[excOffset];
}
return (long)value|((long)excOffset<<32);
return value |((long)excOffset<<32);
}
/* same as getSlotValueAndOffset() but does not return the slot offset */

View File

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2002-2008, International Business Machines
* Copyright (C) 2002-2009, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
*/
@ -157,7 +157,7 @@ public final class USerializedSet {
int i;
/* find c in the BMP part */
for(i=0; i<bmpLength && (char)c>=array[i]; ++i) {}
return (boolean)((i&1) != 0);
return ((i&1) != 0);
} else {
int i;
/* find c in the supplementary part */
@ -167,7 +167,7 @@ public final class USerializedSet {
i+=2) {}
/* count pairs of 16-bit units even per BMP and check if the number of pairs is odd */
return (boolean)(((i+bmpLength)&2)!=0);
return (((i+bmpLength)&2)!=0);
}
}

View File

@ -210,7 +210,7 @@ public class UnicodeRegex implements Cloneable, Freezable, StringTransform {
if (unused.size() != 1) {
throw new IllegalArgumentException("Not a single root: " + unused);
}
return (String) variables.get(unused.iterator().next());
return variables.get(unused.iterator().next());
}
public String getBnfCommentString() {

View File

@ -1170,6 +1170,7 @@ public final class Utility {
* @return the position after the last character parsed, or -1 if
* the parse failed
*/
@SuppressWarnings("fallthrough")
public static int parsePattern(String rule, int pos, int limit,
String pattern, int[] parsedInts) {
// TODO Update this to handle surrogates

View File

@ -275,7 +275,7 @@ public final class ZoneMeta {
if (alias.equals(ids[i])) {
continue;
}
tmpinfo = (String[])m.get(alias);
tmpinfo = m.get(alias);
if (tmpinfo != null) {
break;
}
@ -509,7 +509,7 @@ public final class ZoneMeta {
return -1;
}
for (;;) {
mid = (int)((start + limit) / 2);
mid = (start + limit) / 2;
if (lastMid == mid) { /* Have we moved? */
break; /* We haven't moved, and it wasn't found. */
}

View File

@ -432,7 +432,7 @@ public class ZoneStringFormat {
// metazone generic partial location names are collected
genericPartialLocationNames = new String[mzPartialLocIdx][];
for (int mzi = 0; mzi < mzPartialLocIdx; mzi++) {
genericPartialLocationNames[mzi] = (String[])mzPartialLoc[mzi].clone();
genericPartialLocationNames[mzi] = mzPartialLoc[mzi].clone();
}
}
// Finally, create ZoneStrings instance and put it into the tzidToStinrgs map
@ -1071,7 +1071,7 @@ public class ZoneStringFormat {
}
int i = 0;
for (; i < resultList.size(); i++) {
ZoneStringInfo tmp = (ZoneStringInfo)resultList.get(i);
ZoneStringInfo tmp = resultList.get(i);
if (zsitem.getType() == tmp.getType()) {
if (matchLength > tmp.getString().length()) {
resultList.set(i, zsitem);

View File

@ -134,6 +134,7 @@ public class PeriodFormatterData {
* @param sb the string builder to which to append the text
* @return true if will require skip marker
*/
@SuppressWarnings("fallthrough")
public boolean appendUnit(TimeUnit unit, int count, int cv,
int uv, boolean useCountSep,
boolean useDigitPrefix, boolean multiple,
@ -525,7 +526,7 @@ public class PeriodFormatterData {
// if half-floor is 1/2, use singular
// else if half-floor is not integral, use plural
// else do more analysis
int v = (int)(count / 500);
int v = count / 500;
if (v == 1) {
if (dr.halfNames != null && dr.halfNames[unit.ordinal()] != null) {
return FORM_HALF_SPELLED;
@ -546,7 +547,7 @@ public class PeriodFormatterData {
} break;
case EFractionHandling.FPAUCAL: {
int v = (int)(count / 500);
int v = count / 500;
if (v == 1 || v == 3) {
return FORM_PAUCAL;
}

View File

@ -150,7 +150,7 @@ public class XMLRecordReader implements RecordReader {
list.add(s);
}
if (match("/" + name + "List")) {
return (String[]) list.toArray(new String[list.size()]);
return list.toArray(new String[list.size()]);
}
}
return null;

View File

@ -5286,7 +5286,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
case UProperty.JOINING_TYPE:
return gBdp.getJoiningType(ch);
case UProperty.LINE_BREAK:
return (int)(PROPERTY_.getAdditional(ch, LB_VWORD)& LB_MASK)>>LB_SHIFT;
return (PROPERTY_.getAdditional(ch, LB_VWORD)& LB_MASK)>>LB_SHIFT;
case UProperty.NUMERIC_TYPE:
type=getNumericType(PROPERTY_.getProperty(ch));
if(type>NumericType.NUMERIC) {
@ -5336,11 +5336,11 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
case UProperty.TRAIL_CANONICAL_COMBINING_CLASS:
return NormalizerImpl.getFCD16(ch)&0xff;
case UProperty.GRAPHEME_CLUSTER_BREAK:
return (int)(PROPERTY_.getAdditional(ch, 2)& GCB_MASK)>>GCB_SHIFT;
return (PROPERTY_.getAdditional(ch, 2)& GCB_MASK)>>GCB_SHIFT;
case UProperty.SENTENCE_BREAK:
return (int)(PROPERTY_.getAdditional(ch, 2)& SB_MASK)>>SB_SHIFT;
return (PROPERTY_.getAdditional(ch, 2)& SB_MASK)>>SB_SHIFT;
case UProperty.WORD_BREAK:
return (int)(PROPERTY_.getAdditional(ch, 2)& WB_MASK)>>WB_SHIFT;
return (PROPERTY_.getAdditional(ch, 2)& WB_MASK)>>WB_SHIFT;
/* Values were tested for variable type from Integer.MIN_VALUE
* to UProperty.INT_LIMIT and none would not reach the default case.
*/

View File

@ -473,7 +473,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
this(bi.toString(10));
if (scale < 0)
throw new java.lang.NumberFormatException("Negative scale:" + " " + scale);
exp = (int) -scale; // exponent is -scale
exp = -scale; // exponent is -scale
return;
}
@ -623,7 +623,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
}
}/* j */
if (eneg)
exp = (int) -exp; // was negative
exp = -exp; // was negative
hadexp = true; // remember we had one
break i; // we are done
}
@ -793,7 +793,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
mant[0] = (byte) num;
ind = ispos;
} else { // num<-1
mant[0] = (byte) ((int) -num);
mant[0] = (byte) -num;
ind = isneg;
}
}
@ -806,7 +806,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
/* We work on negative numbers so we handle the most negative number */
if (num > 0) {
ind = ispos;
num = (int) -num;
num = -num;
} else
ind = isneg;/* negative */// [0 case already handled]
// [it is quicker, here, to pre-calculate the length with
@ -856,7 +856,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
/* We work on negative num so we handle the most negative number */
if (num > 0) {
ind = ispos;
num = (long) -num;
num = -num;
} else if (num == 0)
ind = iszero;
else
@ -1801,7 +1801,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
if (n == 0)
return res; // x**0 == 1
if (n < 0)
n = (int) -n; // [rhs.ind records the sign]
n = -n; // [rhs.ind records the sign]
seenbit = false; // set once we've seen a 1-bit
{
i = 1;
@ -2223,7 +2223,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
// calculate the current after-length
{/* select */
if (num.form == com.ibm.icu.math.MathContext.PLAIN)
thisafter = (int) -num.exp; // has decimal part
thisafter = -num.exp; // has decimal part
else if (num.form == com.ibm.icu.math.MathContext.SCIENTIFIC)
thisafter = num.mant.length - 1;
else { // engineering
@ -2454,7 +2454,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
/* Looks good */
if (ind == ispos)
return result;
return (int) -result;
return -result;
}
/**
@ -2542,7 +2542,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
/* Looks good */
if (ind == ispos)
return result;
return (long) -result;
return -result;
}
/**
@ -2604,7 +2604,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
public int scale() {
if (exp >= 0)
return 0; // scale can never be negative
return (int) -exp;
return -exp;
}
/**
@ -2674,7 +2674,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
else
padding = scale - ourscale;
res.mant = extend(res.mant, res.mant.length + padding);
res.exp = (int) -scale; // as requested
res.exp = -scale; // as requested
} else {/* ourscale>scale: shortening, probably */
if (scale < 0)
throw new java.lang.ArithmeticException("Negative scale:" + " " + scale);
@ -2683,7 +2683,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
res = res.round(newlen, round); // round to required length
// This could have shifted left if round (say) 0.9->1[.0]
// Repair if so by adding a zero and reducing exponent
if (res.exp != ((int) -scale)) {
if (res.exp != -scale) {
res.mant = extend(res.mant, res.mant.length + 1);
res.exp = res.exp - 1;
}
@ -2765,7 +2765,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
} else {
{ // exp<0; scale to be truncated
// we could use divideInteger, but we may as well be quicker
if (((int) -this.exp) >= this.mant.length)
if (-this.exp >= this.mant.length)
res = ZERO; // all blows away
else {
res = clone(this); // safe copy
@ -2929,7 +2929,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
if (scale < 0)
throw new java.lang.NumberFormatException("Negative scale:" + " " + scale);
res = clone(res); // safe copy [do not mutate]
res.exp = (int) -scale; // exponent is -scale
res.exp = -scale; // exponent is -scale
return res;
}
@ -2998,7 +2998,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
if (euse != 0) {
if (euse < 0) {
csign = '-';
euse = (int) -euse;
euse = -euse;
} else
csign = '+';
sb.append('E').append(csign).append(euse);
@ -3022,7 +3022,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
}
/* Need a '.' and/or some zeros */
needsign = (int) ((ind == isneg) ? 1 : 0); // space for sign? 0 or 1
needsign = (ind == isneg) ? 1 : 0; // space for sign? 0 or 1
/*
* MAG is the position of the point in the mantissa (index of the character it follows)
@ -3037,7 +3037,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
rec[needsign] = '0';
rec[needsign + 1] = '.';
{
int $20 = (int) -mag;
int $20 = -mag;
i = needsign + 2;
for (; $20 > 0; $20--, i++) { // maybe none
rec[i] = '0';
@ -3164,7 +3164,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
// set reqdig to be at least large enough for the computation
reqdig = lhs.mant.length; // base length
// next line handles both positive lhs.exp and also scale mismatch
if (scale != ((int) -lhs.exp))
if (scale != -lhs.exp)
reqdig = (reqdig + scale) + lhs.exp;
reqdig = (reqdig - ((rhs.mant.length - 1))) - rhs.exp; // reduce by RHS effect
if (reqdig < lhs.mant.length)
@ -3260,7 +3260,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
mult = 1;
thisdigit = thisdigit + mult;
// subtract; var1 reusable
var1 = byteaddsub(var1, var1len, var2, var2len, (int) -mult, true);
var1 = byteaddsub(var1, var1len, var2, var2len, -mult, true);
if (var1[0] != 0)
continue inner; // maybe another subtract needed
/*
@ -3294,7 +3294,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
}
/* can leave now if a scaled divide and exponent is small enough */
if (scale >= 0)
if (((int) -res.exp) > scale)
if (-res.exp > scale)
break outer;
/* can leave now if not Divide and no integer part left */
if (code != 'D')
@ -3379,11 +3379,11 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
// already padded with 0's, so just adjust exponent
res.exp = res.exp - ((res.mant.length - have));
// calculate number of digits we really want [may be 0]
actdig = res.mant.length - ((((int) -res.exp) - scale));
actdig = res.mant.length - (-res.exp - scale);
res.round(actdig, set.roundingMode); // round to desired length
// This could have shifted left if round (say) 0.9->1[.0]
// Repair if so by adding a zero and reducing exponent
if (res.exp != ((int) -scale)) {
if (res.exp != -scale) {
res.mant = extend(res.mant, res.mant.length + 1);
res.exp = res.exp - 1;
}
@ -3728,7 +3728,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
} else {
// mantissa is non-0; we can safely add or subtract 1
if (ind == isneg)
increment = (int) -increment;
increment = -increment;
newmant = byteaddsub(mant, mant.length, ONE.mant, 1, increment, reuse);
if (newmant.length > mant.length) { // had a carry
// drop rightmost digit and raise exponent

View File

@ -2388,7 +2388,7 @@ public class Bidi {
cell = impTab[oldStateSeq][_prop];
levState.state = GetState(cell); /* isolate the new state */
actionSeq = impAct[GetAction(cell)]; /* isolate the action */
addLevel = (byte)impTab[levState.state][IMPTABLEVELS_RES];
addLevel = impTab[levState.state][IMPTABLEVELS_RES];
if (actionSeq != 0) {
switch (actionSeq) {
@ -2412,7 +2412,7 @@ public class Bidi {
/* nothing, just clean up */
levState.lastStrongRTL = -1;
/* check if we have a pending conditional segment */
level = (byte)impTab[oldStateSeq][IMPTABLEVELS_RES];
level = impTab[oldStateSeq][IMPTABLEVELS_RES];
if ((level & 1) != 0 && levState.startON > 0) { /* after ON */
start = levState.startON; /* reset to basic run level */
}
@ -2515,7 +2515,7 @@ public class Bidi {
break;
case 11: /* L after L+ON+EN/AN/ON */
level = (byte)levState.runLevel;
level = levState.runLevel;
for (k = start0-1; k >= levState.startON; k--) {
if (levels[k] == level+3) {
while (levels[k] == level+3) {
@ -2582,7 +2582,7 @@ public class Bidi {
levState.runLevel = levels[start];
levState.impTab = impTabPair.imptab[levState.runLevel & 1];
levState.impAct = impTabPair.impact[levState.runLevel & 1];
processPropertySeq(levState, (short)sor, start, start);
processPropertySeq(levState, sor, start, start);
/* initialize for property state table */
if (dirProps[start] == NSM) {
stateImp = (short)(1 + sor);
@ -2658,7 +2658,7 @@ public class Bidi {
}
}
/* flush possible pending sequence, e.g. ON */
processPropertySeq(levState, (short)eor, limit, limit);
processPropertySeq(levState, eor, limit, limit);
}
/* perform (L1) and (X9) ---------------------------------------------------- */

View File

@ -177,7 +177,7 @@ class BreakCTDictionary {
CompactTrieNodes node = getCompactTrieNode(fData.root);
int mycount = 0;
char uc = (char) text.current();
char uc = text.current();
int i = 0;
boolean exitFlag = false;
@ -212,7 +212,7 @@ class BreakCTDictionary {
break;
}
text.next();
uc = (char) text.current();
uc = text.current();
i++;
}
if (exitFlag) {
@ -235,7 +235,7 @@ class BreakCTDictionary {
// We hit a match; get the next node and next character
node = getCompactTrieNode(hnode[middle].equal);
text.next();
uc = (char) text.current();
uc = text.current();
i++;
break;
} else if (uc < hnode[middle].ch) {

View File

@ -510,7 +510,7 @@ public class CharsetDetector {
int out = 0;
for (int i = 0; i < recognizers.size(); i++) {
String name = ((CharsetRecognizer)recognizers.get(i)).getName();
String name = recognizers.get(i).getName();
if (out == 0 || ! name.equals(charsetNames[out - 1])) {
charsetNames[out++] = name;

View File

@ -1180,7 +1180,7 @@ abstract class CharsetRecog_sbcs extends CharsetRecognizer {
}
protected void matchInit(CharsetDetector det)
{
prev_fInputBytes = (byte[])det.fInputBytes.clone();
prev_fInputBytes = det.fInputBytes.clone();
byte bb[] = unshape(det.fInputBytes);
det.setText(bb);
}

View File

@ -217,7 +217,7 @@ public class CurrencyPluralInfo implements Cloneable, Serializable {
//other.pluralCountToCurrencyUnitPattern = pluralCountToCurrencyUnitPattern;
other.pluralCountToCurrencyUnitPattern = new HashMap<String, String>();
for (String pluralCount : pluralCountToCurrencyUnitPattern.keySet()) {
String currencyPattern = (String)pluralCountToCurrencyUnitPattern.get(pluralCount);
String currencyPattern = pluralCountToCurrencyUnitPattern.get(pluralCount);
other.pluralCountToCurrencyUnitPattern.put(pluralCount, currencyPattern);
}
return other;

View File

@ -1329,7 +1329,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
*/
private final String[] duplicate(String[] srcArray)
{
return (String[])srcArray.clone();
return srcArray.clone();
}
private final String[][] duplicate(String[][] srcArray)

View File

@ -828,8 +828,8 @@ public class DateIntervalFormat extends UFormat {
* Initialize interval patterns locale to this formatter.
*/
private void initializePattern() {
String fullPattern = ((SimpleDateFormat)fDateFormat).toPattern();
ULocale locale = ((SimpleDateFormat)fDateFormat).getLocale();
String fullPattern = fDateFormat.toPattern();
ULocale locale = fDateFormat.getLocale();
String key;
if ( fSkeleton != null ) {
key = locale.toString() + "+" + fullPattern + "+" + fSkeleton;
@ -1501,8 +1501,8 @@ public class DateIntervalFormat extends UFormat {
// for skeleton "M+", the pattern is "...L..."
skeletonChar = 'M';
}
int fieldCount = bestMatchSkeletonFieldWidth[(int)(skeletonChar - PATTERN_CHAR_BASE)];
int inputFieldCount = inputSkeletonFieldWidth[(int)(skeletonChar - PATTERN_CHAR_BASE)];
int fieldCount = bestMatchSkeletonFieldWidth[skeletonChar - PATTERN_CHAR_BASE];
int inputFieldCount = inputSkeletonFieldWidth[skeletonChar - PATTERN_CHAR_BASE];
if ( fieldCount == count && inputFieldCount > fieldCount ) {
count = inputFieldCount - fieldCount;
for ( int j = 0; j < count; ++j ) {
@ -1537,8 +1537,8 @@ public class DateIntervalFormat extends UFormat {
// for skeleton "M+", the pattern is "...L..."
skeletonChar = 'M';
}
int fieldCount = bestMatchSkeletonFieldWidth[(int)(skeletonChar - PATTERN_CHAR_BASE)];
int inputFieldCount = inputSkeletonFieldWidth[(int)(skeletonChar - PATTERN_CHAR_BASE)];
int fieldCount = bestMatchSkeletonFieldWidth[skeletonChar - PATTERN_CHAR_BASE];
int inputFieldCount = inputSkeletonFieldWidth[skeletonChar - PATTERN_CHAR_BASE];
if ( fieldCount == count && inputFieldCount > fieldCount ) {
count = inputFieldCount - fieldCount;
for ( int j = 0; j < count; ++j ) {
@ -1568,8 +1568,7 @@ public class DateIntervalFormat extends UFormat {
{
PatternInfo timeItvPtnInfo =
(PatternInfo)intervalPatterns.get(
DateIntervalInfo.CALENDAR_FIELD_TO_PATTERN_LETTER[field]);
intervalPatterns.get(DateIntervalInfo.CALENDAR_FIELD_TO_PATTERN_LETTER[field]);
if ( timeItvPtnInfo != null ) {
String timeIntervalPattern = timeItvPtnInfo.getFirstPart() +
timeItvPtnInfo.getSecondPart();

View File

@ -453,7 +453,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
if (ch != prevCh && count > 0) {
// check the repeativeness of pattern letter
int repeated = patternRepeated[(int)(prevCh - PATTERN_CHAR_BASE)];
int repeated = patternRepeated[prevCh - PATTERN_CHAR_BASE];
if ( repeated == 0 ) {
patternRepeated[prevCh - PATTERN_CHAR_BASE] = 1;
} else {
@ -484,7 +484,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
// "d-d"(last char repeated ), and
// "d-d MM" ( repetition found )
if ( count > 0 && foundRepetition == false ) {
if ( patternRepeated[(int)(prevCh - PATTERN_CHAR_BASE)] == 0 ) {
if ( patternRepeated[prevCh - PATTERN_CHAR_BASE] == 0 ) {
count = 0;
}
}
@ -806,7 +806,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
static void parseSkeleton(String skeleton, int[] skeletonFieldWidth) {
int PATTERN_CHAR_BASE = 0x41;
for ( int i = 0; i < skeleton.length(); ++i ) {
++skeletonFieldWidth[(int)(skeleton.charAt(i) - PATTERN_CHAR_BASE)];
++skeletonFieldWidth[skeleton.charAt(i) - PATTERN_CHAR_BASE];
}
}

View File

@ -872,8 +872,8 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
DateTimePatternGenerator result = (DateTimePatternGenerator) (super.clone());
result.skeleton2pattern = (TreeMap<DateTimeMatcher, String>) skeleton2pattern.clone();
result.basePattern_pattern = (TreeMap<String, String>) basePattern_pattern.clone();
result.appendItemFormats = (String[]) appendItemFormats.clone();
result.appendItemNames = (String[]) appendItemNames.clone();
result.appendItemFormats = appendItemFormats.clone();
result.appendItemNames = appendItemNames.clone();
result.current = new DateTimeMatcher();
result.fp = new FormatParser();
result._distanceInfo = new DistanceInfo();

View File

@ -28,7 +28,7 @@ public abstract class DurationFormat extends UFormat {
* @stable ICU 3.8
*/
public static DurationFormat getInstance(ULocale locale) {
return (DurationFormat)BasicDurationFormat.getInstance(locale);
return BasicDurationFormat.getInstance(locale);
}

View File

@ -518,6 +518,7 @@ public class MessageFormat extends UFormat implements BaseFormat<Object,StringBu
* @throws IllegalArgumentException if the pattern is invalid
* @stable ICU 3.0
*/
@SuppressWarnings("fallthrough")
public void applyPattern(String pttrn) {
StringBuffer[] segments = new StringBuffer[4];
for (int i = 0; i < segments.length; ++i) {
@ -1469,14 +1470,14 @@ public class MessageFormat extends UFormat implements BaseFormat<Object,StringBu
MessageFormat other = (MessageFormat) super.clone();
// clone arrays. Can't do with utility because of bug in Cloneable
other.formats = (Format[]) formats.clone(); // shallow clone
other.formats = formats.clone(); // shallow clone
for (int i = 0; i < formats.length; ++i) {
if (formats[i] != null)
other.formats[i] = (Format) formats[i].clone();
}
// for primitives or immutables, shallow clone is enough
other.offsets = (int[]) offsets.clone();
other.argumentNames = (String[]) argumentNames.clone();
other.offsets = offsets.clone();
other.argumentNames = argumentNames.clone();
other.argumentNamesAreNumeric = argumentNamesAreNumeric;
return other;

View File

@ -474,7 +474,7 @@ final class NFRuleSet {
// and if we haven't yet returned a rule, use findNormalRule()
// to find the applicable rule
} else {
return findNormalRule((long)Math.round(number));
return findNormalRule(Math.round(number));
}
}
@ -591,7 +591,7 @@ final class NFRuleSet {
for (int i = 1; i < rules.length; i++) {
leastCommonMultiple = lcm(leastCommonMultiple, rules[i].getBaseValue());
}
long numerator = (long)(Math.round(number * leastCommonMultiple));
long numerator = Math.round(number * leastCommonMultiple);
// for each rule, do the following...
long tempDifference;

View File

@ -2387,19 +2387,18 @@ public final class Normalizer implements Cloneable {
mode, options);
if(pNeededToNormalize!=null) {
pNeededToNormalize[0]=(boolean)(destLength!=bufferLength ||
Utility.arrayRegionMatches(
buffer,0,dest,
destStart,destLimit
));
pNeededToNormalize[0]=(destLength!=bufferLength ||
Utility.arrayRegionMatches(
buffer,0,dest,
destStart,destLimit
));
}
} else {
/* just copy the source characters */
if(destCapacity>0) {
System.arraycopy(buffer,startIndex[0],dest,0,
(bufferLength<destCapacity) ?
bufferLength : destCapacity
);
bufferLength : destCapacity);
}
}
}
@ -2613,20 +2612,17 @@ public final class Normalizer implements Cloneable {
dest,destStart,destLimit, options);
if(pNeededToNormalize!=null) {
pNeededToNormalize[0]=(boolean)(destLength!=bufferLength ||
Utility.arrayRegionMatches(buffer,startIndex[0],
dest,destStart,
destLength));
pNeededToNormalize[0]=(destLength!=bufferLength ||
Utility.arrayRegionMatches(buffer,startIndex[0],
dest,destStart,
destLength));
}
} else {
/* just copy the source characters */
if(destCapacity>0) {
System.arraycopy(buffer,0,dest,destStart,
Math.min(bufferLength,destCapacity)
);
Math.min(bufferLength,destCapacity));
}
}
}
return destLength;
@ -2711,7 +2707,7 @@ public final class Normalizer implements Cloneable {
throw new IllegalArgumentException();
}
UnicodeSet nx=NormalizerImpl.getNX((int)(options>>Normalizer.COMPARE_NORM_OPTIONS_SHIFT));
UnicodeSet nx=NormalizerImpl.getNX(options>>Normalizer.COMPARE_NORM_OPTIONS_SHIFT);
options|= NormalizerImpl.COMPARE_EQUIV;
result=0;

View File

@ -773,7 +773,7 @@ class RBBIRuleScanner {
// the middle (a variable name, for example.)
for (;;) {
c.fChar = nextCharLL();
if (c.fChar == (int) -1 || // EOF
if (c.fChar == -1 || // EOF
c.fChar == '\r' ||
c.fChar == '\n' ||
c.fChar == chNEL ||
@ -783,7 +783,7 @@ class RBBIRuleScanner {
}
}
}
if (c.fChar == (int) -1) {
if (c.fChar == -1) {
return;
}
@ -874,14 +874,14 @@ class RBBIRuleScanner {
// Table row specified "escaped P" and the char is either 'p' or 'P'.
break;
}
if (tableEl.fCharClass == 252 && fC.fChar == (int) -1) {
if (tableEl.fCharClass == 252 && fC.fChar == -1) {
// Table row specified eof and we hit eof on the input.
break;
}
if (tableEl.fCharClass >= 128 && tableEl.fCharClass < 240 && // Table specs a char class &&
fC.fEscaped == false && // char is not escaped &&
fC.fChar != (int) -1) { // char is not EOF
fC.fChar != -1) { // char is not EOF
UnicodeSet uniset = fRuleSets[tableEl.fCharClass - 128];
if (uniset.contains(fC.fChar)) {
// Table row specified a character class, or set of characters,

View File

@ -444,7 +444,7 @@ class RBBISetBuilder {
System.out.print("\n\n Nonoverlapping Ranges ...\n");
for (rlRange = fRangeList; rlRange!=null; rlRange=rlRange.fNext) {
System.out.print(" " + rlRange.fNum + " " + (int)rlRange.fStartChar + "-" + (int)rlRange.fEndChar);
System.out.print(" " + rlRange.fNum + " " + rlRange.fStartChar + "-" + rlRange.fEndChar);
for (i=0; i<rlRange.fIncludesSets.size(); i++) {
RBBINode usetNode = rlRange.fIncludesSets.get(i);
@ -506,9 +506,9 @@ class RBBISetBuilder {
if (i++ % 5 == 0) {
System.out.print("\n ");
}
RBBINode.printHex((int)tRange.fStartChar, -1);
RBBINode.printHex(tRange.fStartChar, -1);
System.out.print("-");
RBBINode.printHex((int)tRange.fEndChar, 0);
RBBINode.printHex(tRange.fEndChar, 0);
}
}
System.out.print("\n");
@ -535,7 +535,7 @@ class RBBISetBuilder {
RBBINode varRef;
String setName;
usetNode = (RBBINode )fRB.fUSetNodes.get(i);
usetNode = fRB.fUSetNodes.get(i);
//System.out.print(" " + i + " ");
RBBINode.printInt(2, i);

View File

@ -951,7 +951,7 @@ class RBBITableBuilder {
System.out.print("state | i n p u t s y m b o l s \n");
System.out.print(" | Acc LA Tag");
for (c=0; c<fRB.fSetBuilder.getNumCharCategories(); c++) {
RBBINode.printInt((int)c, 3);
RBBINode.printInt(c, 3);
}
System.out.print("\n");
System.out.print(" |---------------");
@ -997,10 +997,10 @@ class RBBITableBuilder {
while (nextRecord < tbl.size()) {
thisRecord = nextRecord;
nextRecord = thisRecord + ((Integer)tbl.get(thisRecord)).intValue() + 1;
nextRecord = thisRecord + tbl.get(thisRecord).intValue() + 1;
RBBINode.printInt(thisRecord, 7);
for (i=thisRecord+1; i<nextRecord; i++) {
int val = ((Integer)tbl.get(i)).intValue();
int val = tbl.get(i).intValue();
RBBINode.printInt(val, 7);
}
System.out.print("\n");

View File

@ -939,7 +939,7 @@ public class RuleBasedNumberFormat extends NumberFormat {
* @stable ICU 2.0
*/
public String[] getRuleSetNames() {
return (String[])publicRuleSetNames.clone();
return publicRuleSetNames.clone();
}
/**
@ -992,7 +992,7 @@ public class RuleBasedNumberFormat extends NumberFormat {
public String[] getRuleSetDisplayNames(ULocale loc) {
String[] names = getNameListForLocale(loc);
if (names != null) {
return (String[])names.clone();
return names.clone();
}
names = getRuleSetNames();
for (int i = 0; i < names.length; ++i) {
@ -1609,7 +1609,7 @@ public class RuleBasedNumberFormat extends NumberFormat {
*/
private void initLocalizations(String[][] localizations) {
if (localizations != null) {
publicRuleSetNames = (String[])localizations[0].clone();
publicRuleSetNames = localizations[0].clone();
Map<String, String[]> m = new HashMap<String, String[]>();
for (int i = 1; i < localizations.length; ++i) {

View File

@ -818,6 +818,7 @@ public class SimpleDateFormat extends DateFormat {
* @internal
* @deprecated This API is ICU internal only.
*/
@SuppressWarnings("fallthrough")
protected void subFormat(StringBuffer buf,
char ch, int count, int beginOffset,
FieldPosition pos,
@ -1446,7 +1447,7 @@ public class SimpleDateFormat extends DateFormat {
}
int cacheIdx = sign*2 + width;
if (gmtfmtCache[cacheIdx] != null) {
fmt = (MessageFormat)gmtfmtCache[cacheIdx].get();
fmt = gmtfmtCache[cacheIdx].get();
}
if (fmt == null) {
fmt = new MessageFormat(formatData.gmtFormat);

View File

@ -345,7 +345,7 @@ public final class StringPrep {
synchronized (CACHE) {
WeakReference<StringPrep> ref = CACHE[profile];
if (ref != null) {
instance = (StringPrep)ref.get();
instance = ref.get();
}
if (instance == null) {
@ -402,7 +402,7 @@ public final class StringPrep {
}else{
values.isIndex = false;
values.value = ((int)(trieWord<<16))>>16;
values.value = (trieWord<<16)>>16;
values.value = (values.value >> 2);
}

View File

@ -254,7 +254,7 @@ public class TimeUnitFormat extends MeasureFormat {
Map<String, Object[]> countToPattern = timeUnitToCountToPatterns.get(timeUnit);
for (String count : countToPattern.keySet()) {
for (int styl = FULL_NAME; styl < TOTAL_STYLES; ++styl) {
MessageFormat pattern = (MessageFormat)((Object[])countToPattern.get(count))[styl];
MessageFormat pattern = (MessageFormat)(countToPattern.get(count))[styl];
pos.setErrorIndex(-1);
pos.setIndex(oldPos);
// see if we can parse

View File

@ -498,7 +498,7 @@ public class UnicodeSet extends UnicodeFilter implements Iterable<String>, Compa
*/
public UnicodeSet set(UnicodeSet other) {
checkFrozen();
list = (int[]) other.list.clone();
list = other.list.clone();
len = other.len;
pat = other.pat;
strings = new TreeSet<String>(other.strings);
@ -967,7 +967,7 @@ public class UnicodeSet extends UnicodeFilter implements Iterable<String>, Compa
if (lastLen > tempLen) break strings;
lastLen = tempLen;
if (!it.hasNext()) break;
trial = (String) it.next();
trial = it.next();
}
}
@ -2355,6 +2355,7 @@ public class UnicodeSet extends UnicodeFilter implements Iterable<String>, Compa
* @param options a bit mask of zero or more of the following:
* IGNORE_SPACE, CASE.
*/
@SuppressWarnings("fallthrough")
void applyPattern(RuleCharacterIterator chars, SymbolTable symbols,
StringBuffer rebuiltPat, int options) {

View File

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 1996-2007, International Business Machines Corporation and *
* Copyright (C) 1996-2009, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -296,9 +296,9 @@ public final class CompactByteArray implements Cloneable {
{
try {
CompactByteArray other = (CompactByteArray) super.clone();
other.values = (byte[])values.clone();
other.indices = (char[])indices.clone();
if (hashes != null) other.hashes = (int[])hashes.clone();
other.values = values.clone();
other.indices = indices.clone();
if (hashes != null) other.hashes = hashes.clone();
return other;
} catch (CloneNotSupportedException e) {
throw new IllegalStateException();

View File

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 1996-2007, International Business Machines Corporation and *
* Copyright (C) 1996-2009, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -320,9 +320,9 @@ public final class CompactCharArray implements Cloneable {
{
try {
CompactCharArray other = (CompactCharArray) super.clone();
other.values = (char[])values.clone();
other.indices = (char[])indices.clone();
if (hashes != null) other.hashes = (int[])hashes.clone();
other.values = values.clone();
other.indices = indices.clone();
if (hashes != null) other.hashes = hashes.clone();
return other;
} catch (CloneNotSupportedException e) {
throw new IllegalStateException();

View File

@ -603,6 +603,7 @@ public class JapaneseCalendar extends GregorianCalendar {
* not critical.
* @stable ICU 2.8
*/
@SuppressWarnings("fallthrough")
protected int handleGetLimit(int field, int limitType) {
switch (field) {
case ERA:
@ -621,6 +622,7 @@ public class JapaneseCalendar extends GregorianCalendar {
case MAXIMUM:
return super.handleGetLimit(field, MAXIMUM) - ERAS[CURRENT_ERA*3];
}
//Fall through to the default if not handled above
}
default:
return super.handleGetLimit(field, limitType);

View File

@ -422,7 +422,7 @@ public class RuleBasedTimeZone extends BasicTimeZone {
other.historicRules = new ArrayList<TimeZoneRule>(historicRules); // rules are immutable
}
if (finalRules != null) {
other.finalRules = (AnnualTimeZoneRule[])finalRules.clone();
other.finalRules = finalRules.clone();
}
return other;
}

View File

@ -982,8 +982,7 @@ public class SimpleTimeZone extends BasicTimeZone {
* the start and end ranges the same for consistency.
*/
private void decodeStartRule() {
useDaylight = (boolean)((startDay != 0) && (endDay != 0) ? true : false );
useDaylight = (startDay != 0) && (endDay != 0);
if (useDaylight && dst == 0) {
dst = Grego.MILLIS_PER_DAY;
}
@ -1001,11 +1000,11 @@ public class SimpleTimeZone extends BasicTimeZone {
if (startDayOfWeek > 0) {
startMode = DOW_IN_MONTH_MODE;
} else {
startDayOfWeek = (int)-startDayOfWeek;
startDayOfWeek = -startDayOfWeek;
if (startDay > 0) {
startMode = DOW_GE_DOM_MODE;
} else {
startDay = (int)-startDay;
startDay = -startDay;
startMode = DOW_LE_DOM_MODE;
}
}
@ -1029,7 +1028,7 @@ public class SimpleTimeZone extends BasicTimeZone {
* @see #decodeStartRule
*/
private void decodeEndRule() {
useDaylight = (boolean)((startDay != 0) && (endDay != 0) ? true : false);
useDaylight = (startDay != 0) && (endDay != 0);
if (useDaylight && dst == 0) {
dst = Grego.MILLIS_PER_DAY;
}
@ -1047,11 +1046,11 @@ public class SimpleTimeZone extends BasicTimeZone {
if (endDayOfWeek > 0) {
endMode = DOW_IN_MONTH_MODE;
} else {
endDayOfWeek = (int)-endDayOfWeek;
endDayOfWeek = -endDayOfWeek;
if (endDay > 0) {
endMode = DOW_GE_DOM_MODE;
} else {
endDay = (int)-endDay;
endDay = -endDay;
endMode = DOW_LE_DOM_MODE;
}
}
@ -1115,24 +1114,24 @@ public class SimpleTimeZone extends BasicTimeZone {
* @stable ICU 3.6
*/
public int hashCode(){
int ret = (int)( super.hashCode() +
raw ^ (raw>>>8) +
(useDaylight?0:1));
int ret = super.hashCode()
+ raw ^ (raw >>> 8)
+ (useDaylight ? 0 : 1);
if(!useDaylight){
ret += (int)(dst ^ (dst>>>10) +
startMode ^ (startMode>>>11) +
startMonth ^ (startMonth>>>12) +
startDay ^ (startDay>>>13) +
startDayOfWeek ^ (startDayOfWeek>>>14) +
startTime ^ (startTime>>>15) +
startTimeMode ^ (startTimeMode>>>16) +
endMode ^ (endMode>>>17) +
endMonth ^ (endMonth>>>18) +
endDay ^ (endDay>>>19) +
endDayOfWeek ^ (endDayOfWeek>>>20) +
endTime ^ (endTime>>>21) +
endTimeMode ^ (endTimeMode>>>22) +
startYear ^ (startYear>>>23));
ret += dst ^ (dst >>> 10) +
startMode ^ (startMode>>>11) +
startMonth ^ (startMonth>>>12) +
startDay ^ (startDay>>>13) +
startDayOfWeek ^ (startDayOfWeek>>>14) +
startTime ^ (startTime>>>15) +
startTimeMode ^ (startTimeMode>>>16) +
endMode ^ (endMode>>>17) +
endMonth ^ (endMonth>>>18) +
endDay ^ (endDay>>>19) +
endDayOfWeek ^ (endDayOfWeek>>>20) +
endTime ^ (endTime>>>21) +
endTimeMode ^ (endTimeMode>>>22) +
startYear ^ (startYear>>>23);
}
return ret;
}

View File

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2007-2008, International Business Machines Corporation and *
* Copyright (C) 2007-2009, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -44,7 +44,7 @@ public class TimeArrayTimeZoneRule extends TimeZoneRule {
if (startTimes == null || startTimes.length == 0) {
throw new IllegalArgumentException("No start times are specified.");
} else {
this.startTimes = (long[])startTimes.clone();
this.startTimes = startTimes.clone();
Arrays.sort(this.startTimes);
}
this.timeType = timeType;
@ -58,7 +58,7 @@ public class TimeArrayTimeZoneRule extends TimeZoneRule {
* @stable ICU 3.8
*/
public long[] getStartTimes() {
return (long[])startTimes.clone();
return startTimes.clone();
}
/**

View File

@ -45,7 +45,7 @@ public class TimeUnit extends MeasureUnit {
* @stable ICU 4.0
*/
public static TimeUnit[] values() {
return (TimeUnit[])values.clone();
return values.clone();
}
/**

View File

@ -1008,7 +1008,7 @@ public final class ULocale implements Serializable {
*/
public static String[] getISOCountries() {
initCountryTables();
return (String[])_countries.clone();
return _countries.clone();
}
/**
@ -1021,7 +1021,7 @@ public final class ULocale implements Serializable {
*/
public static String[] getISOLanguages() {
initLanguageTables();
return (String[])_languages.clone();
return _languages.clone();
}
/**
@ -1891,9 +1891,9 @@ public final class ULocale implements Serializable {
for (Map.Entry<String, String> e : m.entrySet()) {
append(first ? KEYWORD_SEPARATOR : ITEM_SEPARATOR);
first = false;
append((String)e.getKey());
append(e.getKey());
append(KEYWORD_ASSIGN);
append((String)e.getValue());
append(e.getValue());
}
if (blen != oldBlen) {
++oldBlen;
@ -3174,9 +3174,9 @@ public final class ULocale implements Serializable {
String newLocaleID =
createLikelySubtagsString(
(String)tags[0],
(String)tags[1],
(String)tags[2],
tags[0],
tags[1],
tags[2],
trailing);
return newLocaleID == null ? loc : new ULocale(newLocaleID);
@ -3217,9 +3217,9 @@ public final class ULocale implements Serializable {
loc.localeID,
tags);
String originalLang = (String)tags[0];
String originalScript = (String)tags[1];
String originalRegion = (String)tags[2];
String originalLang = tags[0];
String originalScript = tags[1];
String originalRegion = tags[2];
String originalTrailing = null;
if (trailingIndex < loc.localeID.length()) {
@ -4309,7 +4309,7 @@ public final class ULocale implements Serializable {
TreeMap<String, String> ldmlKwMap = null;
while (kwitr.hasNext()) {
String key = (String)kwitr.next();
String key = kwitr.next();
String value = getKeywordValue(key);
if (key.length() == 1) {
// non LDML extension or private use

View File

@ -1,4 +1,4 @@
#Tue Jun 09 16:57:26 EDT 2009
#Thu Aug 27 17:47:29 EDT 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
@ -10,13 +10,15 @@ org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
@ -29,8 +31,10 @@ org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore

View File

@ -6,3 +6,4 @@ shared.dir = ../../shared
javac.source = 1.6
javac.target = 1.6
javac.compilerarg = -Xlint:all,-deprecation,-dep-ann

View File

@ -1,4 +1,4 @@
#Mon Aug 17 15:55:58 PDT 2009
#Thu Aug 27 17:47:44 EDT 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@ -19,7 +19,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning

View File

@ -3,3 +3,4 @@
#* others. All Rights Reserved. *
#*******************************************************************************
shared.dir = ../../shared
javac.compilerarg = -Xlint:all,-deprecation,-dep-ann

View File

@ -125,7 +125,7 @@ class TransliterationRuleSet {
// a set, and we must use the more time-consuming
// matchesIndexValue check. In practice this happens
// rarely, so we seldom tread this code path.
TransliterationRule r = (TransliterationRule) ruleVector.elementAt(j);
TransliterationRule r = ruleVector.elementAt(j);
if (r.matchesIndexValue(x)) {
v.addElement(r);
}

View File

@ -383,7 +383,7 @@ class TransliteratorIDParser {
// Construct canonical ID
for (int i=0; i<list.size(); ++i) {
SingleID single = (SingleID) list.elementAt(i);
SingleID single = list.elementAt(i);
canonID.append(single.canonID);
if (i != (list.size()-1)) {
canonID.append(ID_DELIM);

View File

@ -1094,7 +1094,7 @@ class TransliteratorParser {
data.ruleSet.freeze();
}
if (idBlockVector.size() == 1 && ((String)idBlockVector.get(0)).length() == 0)
if (idBlockVector.size() == 1 && (idBlockVector.get(0)).length() == 0)
idBlockVector.remove(0);
} catch (IllegalArgumentException e) {
@ -1544,7 +1544,7 @@ class TransliteratorParser {
if (variableNext >= variableLimit) {
throw new RuntimeException("Private use variables exhausted");
}
buf.append((char) --variableLimit);
buf.append(--variableLimit);
} else {
throw new IllegalIcuArgumentException("Undefined variable $"
+ name);

View File

@ -603,7 +603,7 @@ class TransliteratorRegistry {
ID);
}
///CLOVER:ON
return (Object[]) registry.get(new CaseInsensitiveString(ID));
return registry.get(new CaseInsensitiveString(ID));
}
/**
@ -903,7 +903,7 @@ class TransliteratorRegistry {
entryWrapper[0] = new AliasEntry(parser.compoundFilter.toPattern(false) + ";"
+ parser.idBlockVector.get(0));
} else {
entryWrapper[0] = new AliasEntry((String)parser.idBlockVector.get(0));
entryWrapper[0] = new AliasEntry(parser.idBlockVector.get(0));
}
}
else {

View File

@ -23,8 +23,8 @@
<echo message="source: ${javac.source}"/>
<echo message="target: ${javac.target}"/>
<echo message="debug: ${javac.debug}"/>
<echo message="deprecation: ${javac.deprecation}"/>
<echo message="encoding: ${javac.encoding}"/>
<echo message="compiler arg: ${javac.compilerarg}"/>
<echo message="----------------------------------------------------"/>
<mkdir dir="${bin.dir}"/>
@ -34,8 +34,9 @@
classpathref="javac.classpathref"
source="${javac.source}"
target="${javac.target}"
debug="${javac.debug}"
deprecation="${javac.deprecation}"/>
debug="${javac.debug}">
<compilerarg value="${javac.compilerarg}"/>
</javac>
</target>
<target name="@copy">

View File

@ -21,8 +21,8 @@ jar.dir = ${out.dir}/lib
javac.source = 1.5
javac.target = 1.5
javac.debug = on
javac.deprecation = off
javac.encoding = ascii
javac.compilerarg = -Xlint:none
# Manifest attributes
jar.spec.version = ${icu4j.spec.version}