]> granicus.if.org Git - icu/commitdiff
ICU-8854 possible null pointer dereference.
authorAbhinav Gupta <mail@abhinavg.net>
Mon, 17 Oct 2011 20:24:17 +0000 (20:24 +0000)
committerAbhinav Gupta <mail@abhinavg.net>
Mon, 17 Oct 2011 20:24:17 +0000 (20:24 +0000)
X-SVN-Rev: 30839

icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java

index b6c25c3eac91586ecd3a27e4edd2472a0685380b..6d0850d694e1ae61eeb83113efef53848d238dc9 100644 (file)
@@ -3908,6 +3908,8 @@ public class DecimalFormat extends NumberFormat {
             text = format(number.doubleValue(), new StringBuffer(), new FieldPosition(0), true);
         } else if (obj instanceof Integer || obj instanceof Long) {
             text = format(number.longValue(), new StringBuffer(), new FieldPosition(0), true);
+        } else {
+            throw new IllegalArgumentException();
         }
 
         AttributedString as = new AttributedString(text.toString());