harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r909771 - in /harmony/enhanced/classlib/trunk/modules/luni/src/main/java: java/util/Scanner.java org/apache/harmony/luni/internal/nls/messages.properties
Date Sat, 13 Feb 2010 08:28:46 GMT
Author: hindessm
Date: Sat Feb 13 08:28:46 2010
New Revision: 909771

URL: http://svn.apache.org/viewvc?rev=909771&view=rev
Log:
More nls refactoring.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Scanner.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Scanner.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Scanner.java?rev=909771&r1=909770&r2=909771&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Scanner.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Scanner.java Sat
Feb 13 08:28:46 2010
@@ -35,6 +35,7 @@
 import java.util.regex.MatchResult;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * A parser that parses a text string of primitive types and strings with the
@@ -179,13 +180,13 @@
      */
     public Scanner(File src, String charsetName) throws FileNotFoundException {
         if (null == src) {
-            throw new NullPointerException(org.apache.harmony.luni.util.Msg
-                    .getString("KA00a")); //$NON-NLS-1$
+            throw new NullPointerException(Messages
+                    .getString("luni.DB")); //$NON-NLS-1$
         }
         FileInputStream fis = new FileInputStream(src);
         if (null == charsetName) {
-            throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg
-                    .getString("KA009")); //$NON-NLS-1$
+            throw new IllegalArgumentException(Messages
+                    .getString("luni.DC")); //$NON-NLS-1$
         }
         try {
             input = new InputStreamReader(fis, charsetName);
@@ -235,8 +236,8 @@
      */
     public Scanner(InputStream src, String charsetName) {
         if (null == src) {
-            throw new NullPointerException(org.apache.harmony.luni.util.Msg
-                    .getString("KA00b")); //$NON-NLS-1$
+            throw new NullPointerException(Messages
+                    .getString("luni.AA")); //$NON-NLS-1$
         }
         try {
             input = new InputStreamReader(src, charsetName);
@@ -284,12 +285,12 @@
      */
     public Scanner(ReadableByteChannel src, String charsetName) {
         if (null == src) {
-            throw new NullPointerException(org.apache.harmony.luni.util.Msg
-                    .getString("KA00d")); //$NON-NLS-1$
+            throw new NullPointerException(Messages
+                    .getString("luni.DD")); //$NON-NLS-1$
         }
         if (null == charsetName) {
-            throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg
-                    .getString("KA009")); //$NON-NLS-1$
+            throw new IllegalArgumentException(Messages
+                    .getString("luni.DC")); //$NON-NLS-1$
         }
         input = Channels.newReader(src, charsetName);
         initialization();
@@ -473,8 +474,8 @@
         checkClosed();
         checkNull(pattern);
         if (horizon < 0) {
-            throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg
-                    .getString("KA00e")); //$NON-NLS-1$
+            throw new IllegalArgumentException(Messages
+                    .getString("luni.DE")); //$NON-NLS-1$
         }
         matcher.usePattern(pattern);
 
@@ -1697,8 +1698,8 @@
      */
     public Scanner useRadix(int radix) {
         if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) {
-            throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg
-                    .getString("KA008", radix)); //$NON-NLS-1$
+            throw new IllegalArgumentException(Messages
+                    .getString("luni.DF", radix)); //$NON-NLS-1$
         }
         this.integerRadix = radix;
         return this;
@@ -1774,8 +1775,8 @@
      */
     private Pattern getIntegerPattern(int radix) {
         if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) {
-            throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg
-                    .getString("KA00e", radix)); //$NON-NLS-1$
+            throw new IllegalArgumentException(Messages
+                    .getString("luni.DE", radix)); //$NON-NLS-1$
         }
         decimalFormat = (DecimalFormat) NumberFormat.getInstance(locale);
 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties?rev=909771&r1=909770&r2=909771&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties
Sat Feb 13 08:28:46 2010
@@ -233,3 +233,8 @@
 luni.D8=Third byte at {0} does not match UTF8 Specification
 luni.D9=Second or third byte at {0} does not match UTF8 Specification
 luni.DA=Input at {0} does not match UTF8 Specification
+luni.DB=File is null
+luni.DC=CharsetName is illegal
+luni.DD=ReadableByteChannel is null
+luni.DE=Radix {0} is less than Character.MIN_RADIX or greater than Character.MAX_RADIX
+luni.DF={0} is an illegal radix



Mime
View raw message