summaryrefslogtreecommitdiffstats
path: root/icu/src/main/java
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2009-10-27 16:53:15 -0700
committerElliott Hughes <enh@google.com>2009-10-27 16:53:15 -0700
commitf54136e6f685aeafb8cee301ef7aea001cd238c3 (patch)
treea7d130672817ee68ba7319f46772ff1637a38504 /icu/src/main/java
parentd9179c4701153caeb821cf3da639b28465317508 (diff)
downloadlibcore-f54136e6f685aeafb8cee301ef7aea001cd238c3.zip
libcore-f54136e6f685aeafb8cee301ef7aea001cd238c3.tar.gz
libcore-f54136e6f685aeafb8cee301ef7aea001cd238c3.tar.bz2
Fix a few FindBugs warnings in code that isn't upstream.
Bugs: 2099642, 2099637
Diffstat (limited to 'icu/src/main/java')
-rw-r--r--icu/src/main/java/com/ibm/icu4jni/text/BreakIterator.java8
-rw-r--r--icu/src/main/java/com/ibm/icu4jni/text/CollationKey.java2
-rw-r--r--icu/src/main/java/com/ibm/icu4jni/text/DecimalFormatSymbols.java2
3 files changed, 6 insertions, 6 deletions
diff --git a/icu/src/main/java/com/ibm/icu4jni/text/BreakIterator.java b/icu/src/main/java/com/ibm/icu4jni/text/BreakIterator.java
index c8f5372..5ef1161 100644
--- a/icu/src/main/java/com/ibm/icu4jni/text/BreakIterator.java
+++ b/icu/src/main/java/com/ibm/icu4jni/text/BreakIterator.java
@@ -22,10 +22,10 @@ import java.util.Locale;
public abstract class BreakIterator implements Cloneable
{
- protected static int BI_CHAR_INSTANCE = 1;
- protected static int BI_WORD_INSTANCE = 2;
- protected static int BI_LINE_INSTANCE = 3;
- protected static int BI_SENT_INSTANCE = 4;
+ protected static final int BI_CHAR_INSTANCE = 1;
+ protected static final int BI_WORD_INSTANCE = 2;
+ protected static final int BI_LINE_INSTANCE = 3;
+ protected static final int BI_SENT_INSTANCE = 4;
protected int type = 0;
diff --git a/icu/src/main/java/com/ibm/icu4jni/text/CollationKey.java b/icu/src/main/java/com/ibm/icu4jni/text/CollationKey.java
index 7e8a000..9e9401d 100644
--- a/icu/src/main/java/com/ibm/icu4jni/text/CollationKey.java
+++ b/icu/src/main/java/com/ibm/icu4jni/text/CollationKey.java
@@ -122,7 +122,7 @@ public final class CollationKey implements Comparable
{
if (m_hash_ == 0)
{
- if (m_bytes_ != null || m_bytes_.length != 0)
+ if (m_bytes_ != null && m_bytes_.length != 0)
{
int len = m_bytes_.length;
int inc = ((len - 32) / 32) + 1;
diff --git a/icu/src/main/java/com/ibm/icu4jni/text/DecimalFormatSymbols.java b/icu/src/main/java/com/ibm/icu4jni/text/DecimalFormatSymbols.java
index 98463e4..ebda335 100644
--- a/icu/src/main/java/com/ibm/icu4jni/text/DecimalFormatSymbols.java
+++ b/icu/src/main/java/com/ibm/icu4jni/text/DecimalFormatSymbols.java
@@ -24,7 +24,7 @@ import java.util.Currency;
import java.util.Locale;
import java.util.ResourceBundle;
-public class DecimalFormatSymbols {
+public class DecimalFormatSymbols implements Cloneable {
private int addr;