mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-14 01:11:02 +00:00
ICU-4707 Fix some Eclipse warnings
X-SVN-Rev: 19906
This commit is contained in:
parent
7ea2415352
commit
2db165b24a
12 changed files with 49 additions and 61 deletions
|
@ -13,8 +13,6 @@ import com.ibm.icu.dev.test.TestFmwk;
|
|||
import com.ibm.icu.text.ArabicShaping;
|
||||
import com.ibm.icu.text.ArabicShapingException;
|
||||
|
||||
import java.util.MissingResourceException;
|
||||
|
||||
/**
|
||||
* Regression test for Arabic shaping.
|
||||
*/
|
||||
|
|
|
@ -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. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -267,7 +267,7 @@ public class TestData {
|
|||
testLabel = testlabel;
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
public static final ErrorCase[] errorCases = {
|
||||
|
||||
|
||||
|
|
|
@ -1,17 +1,13 @@
|
|||
/*
|
||||
***********************************************************************
|
||||
* Copyright (C) 2005, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
* Copyright (C) 2005-2006, International Business Machines *
|
||||
* Corporation and others. All Rights Reserved. *
|
||||
***********************************************************************
|
||||
*
|
||||
*/
|
||||
|
||||
package com.ibm.icu.dev.tool.charsetdet.sbcs;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
/**
|
||||
* @author emader
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
***********************************************************************
|
||||
* Copyright (C) 2005, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
* Copyright (C) 2005-2006, International Business Machines *
|
||||
* Corporation and others. All Rights Reserved. *
|
||||
***********************************************************************
|
||||
*
|
||||
*/
|
||||
|
@ -11,8 +11,6 @@ package com.ibm.icu.dev.tool.charsetdet.sbcs;
|
|||
import java.util.Collection;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import com.ibm.icu.text.UnicodeSet;
|
||||
|
||||
/**
|
||||
* @author emader
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
***********************************************************************
|
||||
* Copyright (C) 2005, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
* Copyright (C) 2005-2006, International Business Machines *
|
||||
* Corporation and others. All Rights Reserved. *
|
||||
***********************************************************************
|
||||
*
|
||||
*/
|
||||
|
@ -257,7 +257,7 @@ public class StatisticsTool implements NGramParser.NGramParserClient, NGramList.
|
|||
|
||||
public NGramList collectStatistics(InputFile file)
|
||||
{
|
||||
if (!file.open()) {;
|
||||
if (!file.open()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2004-2006, International Business Machines Corporation and *
|
||||
* Copyright (C) 2004-2006, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -448,7 +448,7 @@ public class CodeMangler {
|
|||
State pop() {
|
||||
return next;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
HashMap oldMap = null;
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ package com.ibm.icu.dev.tool.docs;
|
|||
import java.io.*;
|
||||
import java.util.*;
|
||||
import java.text.*;
|
||||
import java.util.zip.*;
|
||||
|
||||
public class ReportAPI {
|
||||
APIData oldData;
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1998-2005, International Business Machines Corporation and *
|
||||
* Copyright (C) 1998-2006, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.dev.tool.layout;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.ibm.icu.text.MessageFormat;
|
||||
import com.ibm.icu.util.VersionInfo;
|
||||
|
||||
|
|
|
@ -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. *
|
||||
*******************************************************************************
|
||||
*
|
||||
|
@ -22,8 +22,6 @@ import java.lang.reflect.Field;
|
|||
import java.lang.reflect.Modifier;
|
||||
import java.net.URL;
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -281,7 +281,7 @@ public class ICUListResourceBundle extends ListResourceBundle {
|
|||
public static class Alias{
|
||||
public Alias(String path){
|
||||
pathToResource = path;
|
||||
};
|
||||
}
|
||||
|
||||
private String pathToResource;
|
||||
|
||||
|
|
|
@ -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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
@ -34,10 +34,10 @@ public class IntTrie extends Trie
|
|||
* @throws IOException thrown when data reading fails
|
||||
* @draft 2.1
|
||||
*/
|
||||
public IntTrie(InputStream inputStream, DataManipulate datamanipulate)
|
||||
public IntTrie(InputStream inputStream, DataManipulate dataManipulate)
|
||||
throws IOException
|
||||
{
|
||||
super(inputStream, datamanipulate);
|
||||
super(inputStream, dataManipulate);
|
||||
if (!isIntTrie()) {
|
||||
throw new IllegalArgumentException(
|
||||
"Data given does not belong to a int trie.");
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2004, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
******************************************************************************
|
||||
* Copyright (C) 1996-2006, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
******************************************************************************
|
||||
*
|
||||
* *****************************************************************************************
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
package com.ibm.icu.impl;
|
||||
|
@ -82,35 +82,36 @@ public class LocaleUtility {
|
|||
* variant. Our canonical form is 'lower_UPPER_UPPER'.
|
||||
*/
|
||||
public static String canonicalLocaleString(String id) {
|
||||
if (id != null) {
|
||||
int x = id.indexOf("_");
|
||||
if (x == -1) {
|
||||
id = id.toLowerCase(Locale.ENGLISH);
|
||||
} else {
|
||||
StringBuffer buf = new StringBuffer();
|
||||
buf.append(id.substring(0, x).toLowerCase(Locale.ENGLISH));
|
||||
buf.append(id.substring(x).toUpperCase(Locale.ENGLISH));
|
||||
|
||||
int len = buf.length();
|
||||
int n = len;
|
||||
while (--n >= 0 && buf.charAt(n) == '_') {};
|
||||
if (++n != len) {
|
||||
buf.delete(n, len);
|
||||
}
|
||||
id = buf.toString();
|
||||
}
|
||||
}
|
||||
return id;
|
||||
if (id != null) {
|
||||
int x = id.indexOf("_");
|
||||
if (x == -1) {
|
||||
id = id.toLowerCase(Locale.ENGLISH);
|
||||
} else {
|
||||
StringBuffer buf = new StringBuffer();
|
||||
buf.append(id.substring(0, x).toLowerCase(Locale.ENGLISH));
|
||||
buf.append(id.substring(x).toUpperCase(Locale.ENGLISH));
|
||||
|
||||
int len = buf.length();
|
||||
int n = len;
|
||||
while (--n >= 0 && buf.charAt(n) == '_') {
|
||||
}
|
||||
if (++n != len) {
|
||||
buf.delete(n, len);
|
||||
}
|
||||
id = buf.toString();
|
||||
}
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fallback from the given locale name by removing the rightmost
|
||||
* _-delimited element. If there is none, return the root locale ("",
|
||||
* "", ""). If this is the root locale, return null. NOTE: The
|
||||
* string "root" is not recognized; do not use it.
|
||||
* @return a new Locale that is a fallback from the given locale, or
|
||||
* null.
|
||||
*/
|
||||
* Fallback from the given locale name by removing the rightmost _-delimited
|
||||
* element. If there is none, return the root locale ("", "", ""). If this
|
||||
* is the root locale, return null. NOTE: The string "root" is not
|
||||
* recognized; do not use it.
|
||||
*
|
||||
* @return a new Locale that is a fallback from the given locale, or null.
|
||||
*/
|
||||
public static Locale fallback(Locale loc) {
|
||||
|
||||
// Split the locale into parts and remove the rightmost part
|
||||
|
|
Loading…
Add table
Reference in a new issue