ICU-4707 Fix some Eclipse warnings

X-SVN-Rev: 19908
This commit is contained in:
George Rhoten 2006-07-28 00:16:13 +00:00
parent cf440d910b
commit fa8b239341
19 changed files with 80 additions and 99 deletions

View File

@ -192,9 +192,8 @@ public class TestFmwk extends AbstractTestLog {
if (cls == null) { // hack no warning for missing tests
if (params.warnings) {
continue;
} else {
newTarget = this.new Target(names[i]);
}
newTarget = this.new Target(names[i]);
} else {
TestFmwk test = getSubtest(i, groupOnly);
if (test != null) {
@ -1047,7 +1046,7 @@ public class TestFmwk extends AbstractTestLog {
* Arguments and values understood by this method will be removed from the args array
* and existing args will be shifted down, to be filled by nulls at the end.
* @param args the list of arguments
* @param errlog the error log, or null if no error log is desired
* @param log the error log, or null if no error log is desired
* @return the new TestParams object, or null if error
*/
public static TestParams create(String[] args, PrintWriter log) {
@ -1343,10 +1342,7 @@ public class TestFmwk extends AbstractTestLog {
/**
* Log access.
* @param message
* @param level
* @param incCount
* @param newln
* @param msg The string message to write
*/
public void write(String msg) {
write(msg, false);

View File

@ -72,7 +72,7 @@ public class ResourceBundlePerf extends PerfTest {
String s = javaRes.getString(key);
if (!s.equals(expected)) throw new Error("not equal");
}
};
}
class GetStringIcu extends PerfTest.Function {
String key;
@ -85,7 +85,7 @@ public class ResourceBundlePerf extends PerfTest {
String s = icuRes.getString(key);
if (!s.equals(expected)) throw new Error("not equal");
}
};
}
PerfTest.Function TestZeroTestJava(){
return new GetStringJava("zerotest", "abc\u0000def");
@ -122,7 +122,7 @@ public class ResourceBundlePerf extends PerfTest {
Integer t = (Integer) javaRes.getObject(key);
if (t.intValue() != expected) throw new Error("not equal");
}
};
}
class GetIntIcu extends PerfTest.Function {
String key;
@ -136,7 +136,7 @@ public class ResourceBundlePerf extends PerfTest {
int t = temp.getInt();
if (t != expected) throw new Error("not equal");
}
};
}
PerfTest.Function TestGet123Java(){
return new GetIntJava("onehundredtwentythree", 123);
@ -262,7 +262,7 @@ public class ResourceBundlePerf extends PerfTest {
if (i != b) throw new Error("not equal");
}
}
};
}
PerfTest.Function TestGetBinaryTestICU(){
return new GetBinaryIcu("binarytest", 15);

View File

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 1996-2005, International Business Machines Corporation and *
* Copyright (C) 1996-2006, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -8,7 +8,6 @@ package com.ibm.icu.dev.test.rbbi;
import com.ibm.icu.dev.test.*;
import com.ibm.icu.text.BreakIterator;
import com.ibm.icu.text.RuleBasedBreakIterator;
import java.text.StringCharacterIterator;
import java.util.Locale;
import java.util.Vector;

View File

@ -46,7 +46,7 @@ static class TestParams {
int[] srcLine = new int[1000];
int[] srcCol = new int[1000];
ULocale currentLocale = new ULocale("en_US");
};
}
public void TestExtended() {

View File

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2003-2005 International Business Machines Corporation and *
* Copyright (C) 2003-2006 International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -20,9 +20,6 @@ import java.util.Arrays;
import java.util.ArrayList;
import java.util.Locale;
import java.io.FileReader;
import java.io.Reader;
/**
* Monkey tests for RBBI. These tests have independent implementations of
@ -96,7 +93,7 @@ public class RBBITestMonkey extends TestFmwk {
fSets.add(fExtendSet);
fSets.add(fHangulSet);
fSets.add(fAnySet);
};
}
void setText(StringBuffer s) {
@ -1057,9 +1054,8 @@ public class RBBITestMonkey extends TestFmwk {
int cAt(int pos) {
if (pos<0 || pos>=fText.length()) {
return -1;
} else {
return UTF16.charAt(fText, pos);
}
return UTF16.charAt(fText, pos);
}
int next(int prevPos) {
@ -1198,8 +1194,8 @@ public class RBBITestMonkey extends TestFmwk {
* Similar to UTF16.moveCodePointOffset, but without the exceptions, which were
* complicating usage.
* @param s a Text string
* @param i The starting code unit index into the text string
* @param amt The amount to adjust the string by.
* @param pos The starting code unit index into the text string
* @param amt The amount to adjust the string by.
* @return The adjusted code unit index, pinned to the string's length, or
* unchanged if input index was outside of the string.
*/

View File

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2005, International Business Machines Corporation and *
* Copyright (C) 2005-2006, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
@ -12,8 +12,6 @@ package com.ibm.icu.dev.test.stringprep;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Iterator;

View File

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 1996-2004, International Business Machines Corporation and *
* Copyright (C) 1996-2006, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -337,7 +337,7 @@ final class NormalizerDataReader implements ICUBinary.Authenticate {
* @param extraData
* @param combiningTable
* @param canonStartSets
* @exception thrown when data reading fails
* @exception IOException thrown when data reading fails
* @draft 2.1
*/
protected void read(byte[] normBytes, byte[] fcdBytes, byte[] auxBytes,

View File

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 1996-2004, International Business Machines Corporation and *
* Copyright (C) 1996-2006, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -130,10 +130,8 @@ public final class StringUCharacterIterator extends UCharacterIterator
* returns that single UTF16 character at currentIndex.
* This assumes the text is stored as 16-bit code units.</p>
* @param currentIndex the currentIndex within the text.
* @exception IllegalArgumentException is thrown if an invalid currentIndex
* @exception IndexOutOfBoundsException is thrown if an invalid currentIndex
* is supplied. i.e. currentIndex is out of bounds.
* @return the character at the specified currentIndex or DONE if the
* specified currentIndex is equal to the end of the text.
*/
public void setIndex(int currentIndex) throws IndexOutOfBoundsException
{
@ -174,7 +172,7 @@ public final class StringUCharacterIterator extends UCharacterIterator
* units.
* @param offset the position within the array to start putting the data.
* @return the number of code units added to fillIn, as a convenience
* @exception IndexOutOfBounds exception if there is not enough
* @exception IndexOutOfBoundsException exception if there is not enough
* room after offset in the array, or if offset &lt; 0.
*/
///CLOVER:OFF

View File

@ -1,6 +1,6 @@
/*
******************************************************************************
* Copyright (C) 1996-2005, International Business Machines Corporation and *
* Copyright (C) 1996-2006, International Business Machines Corporation and *
* others. All Rights Reserved. *
******************************************************************************
*/
@ -456,7 +456,7 @@ public abstract class Trie
/**
* Authenticates raw data header.
* Checking the header information, signature and options.
* @param rawdata array of char data to be checked
* @param signature This contains the options and type of a Trie
* @return true if the header is authenticated valid
* @draft 2.1
*/

View File

@ -604,7 +604,7 @@ public final class UScript {
//private static final String INVALID_NAME = "Invalid";
/**
* Helper function to find the code from locale.
* @param Locale the locale.
* @param locale The locale.
*/
private static int[] findCodeFromLocale(ULocale locale) {
ICUResourceBundle rb;

View File

@ -10,7 +10,6 @@ import java.io.InputStream;
import java.io.Reader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Collections;
import java.util.Arrays;
@ -484,7 +483,7 @@ public class CharsetDetector {
recognizers.add(new CharsetRecog_Unicode.CharsetRecog_UTF_16_BE());
recognizers.add(new CharsetRecog_Unicode.CharsetRecog_UTF_16_LE());
recognizers.add(new CharsetRecog_Unicode.CharsetRecog_UTF_32_BE());
recognizers.add(new CharsetRecog_Unicode.CharsetRecog_UTF_32_LE());;
recognizers.add(new CharsetRecog_Unicode.CharsetRecog_UTF_32_LE());
recognizers.add(new CharsetRecog_mbcs.CharsetRecog_sjis());
recognizers.add(new CharsetRecog_2022.CharsetRecog_2022JP());

View File

@ -259,7 +259,7 @@ public class CharsetMatch implements Comparable {
// not if is just the head of a stream.
fRawInput = det.fRawInput;
fRawLength = det.fRawLength;
};
}
fInputStream = det.fInputStream;
}

View File

@ -1,6 +1,6 @@
/**
*******************************************************************************
* Copyright (C) 1996-2005, International Business Machines Corporation and *
* Copyright (C) 1996-2006, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -125,9 +125,9 @@ public final class CollationKey implements Comparable
* Private Constructor
*/
///CLOVER:OFF
private BoundMode(){};
private BoundMode(){}
///CLOVER:ON
};
}
// public constructor ---------------------------------------------------

View File

@ -693,7 +693,7 @@ final class CollationParsedRuleBuilder
m_ranges_[i] = new WeightRange();
}
}
};
}
private static class WeightRange implements Comparable
{
@ -762,7 +762,7 @@ final class CollationParsedRuleBuilder
m_length2_ = source.m_length2_;
m_count2_ = source.m_count2_;
}
};
}
private static class MaxJamoExpansionTable
{
@ -796,7 +796,7 @@ final class CollationParsedRuleBuilder
m_maxVSize_ = table.m_maxVSize_;
m_maxTSize_ = table.m_maxTSize_;
}
};
}
private static class MaxExpansionTable
{
@ -820,7 +820,7 @@ final class CollationParsedRuleBuilder
Vector m_endExpansionCE_;
Vector m_expansionCESize_;
};
}
private static class BasicContractionTable
{
@ -836,7 +836,7 @@ final class CollationParsedRuleBuilder
StringBuffer m_codePoints_;
Vector m_CEs_;
};
}
private static class ContractionTable
{
@ -844,7 +844,7 @@ final class CollationParsedRuleBuilder
/**
* Builds a contraction table
* @param buildtable
* @param mapping
*/
ContractionTable(IntTrieBuilder mapping)
{
@ -882,7 +882,7 @@ final class CollationParsedRuleBuilder
Vector m_CEs_;
Vector m_offsets_;
int m_currentTag_;
};
}
private static final class BuildTable implements TrieBuilder.DataManipulate
{
@ -891,7 +891,6 @@ final class CollationParsedRuleBuilder
/**
* For construction of the Trie tables.
* Has to be labeled public
* @param table build table
* @param cp
* @param offset
* @return data offset or 0
@ -927,7 +926,6 @@ final class CollationParsedRuleBuilder
/**
* Returns a table
* @return build table
*/
BuildTable(CollationRuleParser parser)
{
@ -1002,7 +1000,7 @@ final class CollationParsedRuleBuilder
byte m_unsafeCP_[];
byte m_contrEndCP_[];
Hashtable m_prefixLookup_;
};
}
private static class Elements
{
@ -1122,7 +1120,7 @@ final class CollationParsedRuleBuilder
}
return false;
}
};
}
// private data member ---------------------------------------------------
@ -1405,7 +1403,7 @@ final class CollationParsedRuleBuilder
/**
* @param g CEGenerator
* @param token rule token
* @param fstrength
* @param strength
* @return ce generator
* @exception Exception thrown when internal error occurs
*/
@ -1645,7 +1643,6 @@ final class CollationParsedRuleBuilder
* We are ready to create collation elements
* @param t build table to insert
* @param lh rule token list header
* @exception Exception thrown when internal program error occurs
*/
private void createElements(BuildTable t,
CollationRuleParser.TokenListHeader lh)
@ -2479,7 +2476,7 @@ final class CollationParsedRuleBuilder
/**
* Constructs a special ce
* @param tag special tag
* @param ce
* @param CE collation element
* @return a contraction ce
*/
private static final int constructSpecialCE(int tag, int CE)
@ -2490,7 +2487,7 @@ final class CollationParsedRuleBuilder
/**
* Sets and inserts the element that has a contraction
* @param contraction table
* @param contractions contraction table
* @param element contracting element
* @param existingCE
* @return contraction ce
@ -2994,8 +2991,8 @@ final class CollationParsedRuleBuilder
/**
* Call getWeightRanges and then determine heuristically which ranges to
* use for a given number of weights between (excluding) two limits
* @param lowerlimit
* @param upperlimit
* @param lowerLimit
* @param upperLimit
* @param n
* @param maxByte
* @param ranges
@ -3173,8 +3170,8 @@ final class CollationParsedRuleBuilder
* take two CE weights and calculate the
* possible ranges of weights between the two limits, excluding them
* for weights with up to 4 bytes there are up to 2*4-1=7 ranges
* @param lowerlimit
* @param upperlimit
* @param lowerLimit
* @param upperLimit
* @param maxByte
* @param countBytes
* @param ranges
@ -3380,7 +3377,7 @@ final class CollationParsedRuleBuilder
/**
* Gets the codepoint
* @param table contraction table
* @param tbl contraction table
* @param codePoint code point to look for
* @return the offset to the code point
*/
@ -3388,10 +3385,10 @@ final class CollationParsedRuleBuilder
{
int position = 0;
while (codePoint > tbl.m_codePoints_.charAt(position)) {
position ++;
if (position > tbl.m_codePoints_.length()) {
return -1;
}
position ++;
if (position > tbl.m_codePoints_.length()) {
return -1;
}
}
if (codePoint == tbl.m_codePoints_.charAt(position)) {
return position;
@ -3641,7 +3638,7 @@ final class CollationParsedRuleBuilder
/**
* Gets the maximum Jamo expansion
* @param table trie table
* @param mapping trie table
* @param maxexpansion maximum expansion table
* @param maxjamoexpansion maximum jamo expansion table
* @param jamospecial is jamo special?

View File

@ -1,6 +1,6 @@
/**
*******************************************************************************
* Copyright (C) 1996-2005, International Business Machines Corporation and *
* Copyright (C) 1996-2006, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -107,7 +107,7 @@ final class CollationRuleParser
* attribute for special Hiragana
*/
boolean m_isHiragana4_;
};
}
/**
* List of tokens used by the collation rules
@ -130,7 +130,7 @@ final class CollationRuleParser
int m_numStr_[] = new int[3 * (Collator.TERTIARY + 1)];
Token m_fStrToken_[] = new Token[Collator.TERTIARY + 1];
Token m_lStrToken_[] = new Token[Collator.TERTIARY + 1];
};
}
/**
* Token wrapper for collation rules
@ -232,7 +232,7 @@ final class CollationRuleParser
}
return false;
}
};
}
// package private data member -------------------------------------------
@ -317,7 +317,7 @@ final class CollationRuleParser
int m_prefixLen_;
char m_flags_;
char m_indirectIndex_;
};
}
/**
* Boundary wrappers
@ -348,7 +348,7 @@ final class CollationRuleParser
int m_startContCE_;
int m_limitCE_;
int m_limitContCE_;
};
}
/**
* Collation option rule tag
@ -372,7 +372,7 @@ final class CollationRuleParser
private int m_attribute_;
private String m_subOptions_[];
private int m_subOptionAttributeValues_[];
};
}
// private variables -----------------------------------------------------
@ -658,7 +658,7 @@ final class CollationRuleParser
RULES_OPTIONS_[18] = new TokenOption("charset",
RuleBasedCollator.Attribute.LIMIT_,
null, null);
};
}
/**
* Utility data members
@ -672,7 +672,6 @@ final class CollationRuleParser
/**
* Assembles the token list
* @param
* @exception ParseException thrown when rules syntax fails
*/
int assembleTokenList() throws ParseException
@ -1865,7 +1864,6 @@ final class CollationRuleParser
}
/**
* Reads and set collation options
* @param optionend offset to the end of the option in rules
* @return TOKEN_SUCCESS if option is set correct, 0 otherwise
* @exception ParseException thrown when options in rules are wrong
*/

View File

@ -1,6 +1,6 @@
/**
*******************************************************************************
* Copyright (C) 1996-2005, International Business Machines Corporation and *
* Copyright (C) 1996-2006, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -131,8 +131,8 @@ final class RBBIDataWrapper {
public RBBIDataHeader() {
fMagic = 0;
fFormatVersion = new byte[4];
};
};
}
}
/**
@ -152,12 +152,12 @@ final class RBBIDataWrapper {
return 0;
}
}
};
}
static TrieFoldingFunc fTrieFoldingFunc = new TrieFoldingFunc();
RBBIDataWrapper() {
};
}
static RBBIDataWrapper get(String name) throws IOException {
String fullName = "data/" + name;
@ -337,7 +337,7 @@ final class RBBIDataWrapper {
if (RuleBasedBreakIterator.fDebugEnv!=null && RuleBasedBreakIterator.fDebugEnv.indexOf("data")>=0) {
This.dump();
};
}
return This;
}

View File

@ -1,6 +1,6 @@
/********************************************************************
* COPYRIGHT:
* Copyright (c) 2001-2005, International Business Machines Corporation and
* Copyright (c) 2001-2006, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
@ -113,7 +113,7 @@ class RBBINode {
else if (t==opStart) {fPrecedence = precStart;}
else if (t==opLParen) {fPrecedence = precLParen;}
else fPrecedence = precZero;
};
}
RBBINode(RBBINode other) {
@ -129,7 +129,7 @@ class RBBINode {
fFirstPosSet = new HashSet(other.fFirstPosSet);
fLastPosSet = new HashSet(other.fLastPosSet);
fFollowPos = new HashSet(other.fFollowPos);
};
}
@ -164,7 +164,7 @@ class RBBINode {
}
}
return n;
};
}
@ -202,7 +202,7 @@ class RBBINode {
fRightChild.fParent = this;
}
return this;
};
}
//-------------------------------------------------------------------------
@ -226,7 +226,7 @@ class RBBINode {
} else {
fLeftChild.flattenSets();
}
};
}
if (fRightChild != null) {
if (fRightChild.fType==setRef) {
@ -240,7 +240,7 @@ class RBBINode {
fRightChild.flattenSets();
}
}
};
}

View File

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2003-2005,
* Copyright (C) 2003-2006,
* International Business Machines Corporation and others. All Rights Reserved.
*******************************************************************************
*/
@ -75,7 +75,7 @@ class RBBIRuleParseTable
fNextChar = nc;
fStateName = sn;
}
};
}
static RBBIRuleTableElement[] gRuleParseStateTable = {
new RBBIRuleTableElement(doNOP, 0, 0,0, true, null ) // 0
@ -175,4 +175,4 @@ class RBBIRuleParseTable
, new RBBIRuleTableElement(doRuleErrorAssignExpr, 255, 95,0, false, null ) // 94
, new RBBIRuleTableElement(doExit, 255, 95,0, true, "errorDeath") // 95
};
};
}

View File

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2003-2005,
* Copyright (C) 2003-2006,
* International Business Machines Corporation and others. All Rights Reserved.
*******************************************************************************
*/
@ -31,7 +31,7 @@ class RBBIRuleScanner {
static class RBBIRuleChar {
int fChar;
boolean fEscaped;
};
}
@ -121,7 +121,7 @@ RBBIRuleScanner(RBBIRuleBuilder rb)
fRuleSets[RBBIRuleParseTable.kRuleSet_digit_char-128] = new UnicodeSet(gRuleSet_digit_char_pattern);
fSymbolTable = new RBBISymbolTable(this, rb.fRules);
};
}
@ -490,7 +490,7 @@ boolean doParseActions(int action)
break;
}
return returnVal;
};
}
@ -584,7 +584,7 @@ void fixOpStack(int p) {
static class RBBISetTableEl {
String key;
RBBINode val;
};
}
//----------------------------------------------------------------------------------------