harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r588257 - in /harmony/enhanced/classlib/trunk/modules/luni/src/main/java: java/io/ObjectInputStream.java org/apache/harmony/luni/internal/nls/messages.properties
Date Thu, 25 Oct 2007 15:39:03 GMT
Author: tellison
Date: Thu Oct 25 08:39:02 2007
New Revision: 588257

URL: http://svn.apache.org/viewvc?rev=588257&view=rev
Log:
Externalize a displayable string.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.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/io/ObjectInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java?rev=588257&r1=588256&r2=588257&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
Thu Oct 25 08:39:02 2007
@@ -31,6 +31,7 @@
 import java.util.Iterator;
 
 import org.apache.harmony.kernel.vm.VM;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.luni.util.Msg;
 import org.apache.harmony.luni.util.PriviAction;
 
@@ -985,7 +986,7 @@
             return classSig;
         }
 
-        while (classSig.startsWith("[L", start)
+        while (classSig.startsWith("[L", start) //$NON-NLS-1$
                 && classSig.charAt(end - 1) == ';') {
             start += 2;
             end--;
@@ -1774,7 +1775,8 @@
         ObjectStreamClass newClassDesc = new ObjectStreamClass();
         String name = input.readUTF();
         if (name.length() == 0) {
-            throw new IOException("The stream is corrupted.");
+            // luni.07 = The stream is corrupted
+            throw new IOException(Messages.getString("luni.07")); //$NON-NLS-1$
         }
         newClassDesc.setName(name);
         newClassDesc.setSerialVersionUID(input.readLong());

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=588257&r1=588256&r2=588257&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
Thu Oct 25 08:39:02 2007
@@ -21,3 +21,4 @@
 luni.04=this Map
 luni.05=Attempt to insert {0} element into collection with element type {1}
 luni.06=The string argument is null
+luni.07=The stream is corrupted



Mime
View raw message