harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r909986 [3/6] - in /harmony/enhanced/classlib/branches/java6: ./ depends/jars/ depends/libs/ make/ modules/auth/src/main/java/common/org/apache/harmony/auth/ modules/auth/src/main/java/windows/org/apache/harmony/auth/ modules/awt/src/main/j...
Date Sun, 14 Feb 2010 08:40:48 GMT
Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/XMLEncoderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/XMLEncoderTest.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/XMLEncoderTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/XMLEncoderTest.java Sun Feb 14 08:40:42 2010
@@ -33,6 +33,7 @@
 import java.io.OutputStream;
 import java.io.PrintWriter;
 import java.io.StringReader;
+import java.util.Date;
 import java.util.Map;
 import java.util.TreeMap;
 
@@ -696,7 +697,7 @@
     /**
      * The test checks that complex scenario store is correct
      */
-    public void testEncodingScenario() {
+    public void testEncodingScenario1() {
         XMLEncoder e = new XMLEncoder(System.out);
         e.setExceptionListener(new ExceptionListener() {
             public void exceptionThrown(Exception e) {
@@ -721,6 +722,47 @@
         }
     }
 
+    public static class MockClass {
+
+        private Date date = null;
+
+        public MockClass() {
+
+        }
+
+        public MockClass(Date date) {
+            this.date = date;
+        }
+
+        public boolean equals(Object obj) {
+            MockClass mockObj = (MockClass) obj;
+            if (date != null && mockObj.date != null) {
+                return date.equals(mockObj.date);
+            }
+            return false;
+        }
+
+        public Date getDate() {
+            return date;
+        }
+
+        public void setDate(Date date) {
+            this.date = date;
+        }
+    }
+
+    public void testEncodingScenario2() {
+        XMLEncoder xmlEncoder = new XMLEncoder(System.out);
+        xmlEncoder.setExceptionListener(new ExceptionListener() {
+            public void exceptionThrown(Exception e) {
+                fail("Exception " + e.getClass() + " is thrown: "
+                        + e.getMessage());
+            }
+        });
+
+        xmlEncoder.writeObject(new MockClass(new Date()));
+    }
+
     /**
      * The test checks that encoder can handle writeExpression in initialize
      */

Propchange: harmony/enhanced/classlib/branches/java6/modules/concurrent/src/main/java/java/util/concurrent/atomic/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 14 08:40:42 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/concurrent/src/main/java/java/util/concurrent/atomic:765923-901560
+/harmony/enhanced/classlib/trunk/modules/concurrent/src/main/java/java/util/concurrent/atomic:765923-909814

Propchange: harmony/enhanced/classlib/branches/java6/modules/concurrent/src/main/java/java/util/concurrent/locks/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 14 08:40:42 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/concurrent/src/main/java/java/util/concurrent/locks:765923-901560
+/harmony/enhanced/classlib/trunk/modules/concurrent/src/main/java/java/util/concurrent/locks:765923-909814

Propchange: harmony/enhanced/classlib/branches/java6/modules/jmx/META-INF/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 14 08:40:42 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/jmx/META-INF:768152-901560
+/harmony/enhanced/classlib/trunk/modules/jmx/META-INF:768152-909814

Propchange: harmony/enhanced/classlib/branches/java6/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/util/logging/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 14 08:40:42 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/util/logging:768152-901560
+/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/util/logging:768152-909814

Modified: harmony/enhanced/classlib/branches/java6/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java Sun Feb 14 08:40:42 2010
@@ -814,11 +814,9 @@
     }
 
     public void testValidConfigClass() throws Exception {
-        String oldPropertyValue = System
-                .getProperty("java.util.logging.config.class");
+        String oldPropertyValue = System.getProperty(CONFIG_CLASS);
         try {
-            System.setProperty("java.util.logging.config.class", this
-                    .getClass().getName()
+            System.setProperty(CONFIG_CLASS, this.getClass().getName()
                     + "$ConfigClass");
             assertNull(manager.getLogger("testConfigClass.foo"));
 

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.common
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.common?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.common (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.common Sun Feb 14 08:40:42 2010
@@ -1 +1,2 @@
 org/apache/harmony/luni/tests/java/net/ExcludedProxyTest.java
+org/apache/harmony/luni/tests/internal/net/www/protocol/http/PersistenceTest.java

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedInputStream.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedInputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedInputStream.java Sun Feb 14 08:40:42 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * Wraps an existing {@link InputStream} and <em>buffers</em> the input.
@@ -90,8 +90,8 @@
     public BufferedInputStream(InputStream in, int size) {
         super(in);
         if (size <= 0) {
-            // K0058=size must be > 0
-            throw new IllegalArgumentException(Msg.getString("K0058")); //$NON-NLS-1$
+            // luni.A3=size must be > 0
+            throw new IllegalArgumentException(Messages.getString("luni.A3")); //$NON-NLS-1$
         }
         buf = new byte[size];
     }
@@ -109,8 +109,8 @@
     public synchronized int available() throws IOException {
         InputStream localIn = in; // 'in' could be invalidated by close()
         if (buf == null || localIn == null) {
-            // K0059=Stream is closed
-            throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+            // luni.24=Stream is closed
+            throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
         }
         return count - pos + localIn.available();
     }
@@ -217,8 +217,8 @@
         byte[] localBuf = buf;
         InputStream localIn = in;
         if (localBuf == null || localIn == null) {
-            // K0059=Stream is closed
-            throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+            // luni.24=Stream is closed
+            throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
         }
 
         /* Are there buffered bytes available? */
@@ -229,8 +229,8 @@
         if (localBuf != buf) {
             localBuf = buf;
             if (localBuf == null) {
-                // K0059=Stream is closed
-                throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+                // luni.24=Stream is closed
+                throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
             }
         }
 
@@ -273,8 +273,8 @@
         // close()
         byte[] localBuf = buf;
         if (localBuf == null) {
-            // K0059=Stream is closed
-            throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+            // luni.24=Stream is closed
+            throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
         }
         // avoid int overflow
         if (offset > buffer.length - length || offset < 0 || length < 0) {
@@ -285,8 +285,8 @@
         }
         InputStream localIn = in;
         if (localIn == null) {
-            // K0059=Stream is closed
-            throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+            // luni.24=Stream is closed
+            throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
         }
 
         int required;
@@ -323,8 +323,8 @@
                 if (localBuf != buf) {
                     localBuf = buf;
                     if (localBuf == null) {
-                        // K0059=Stream is closed
-                        throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+                        // luni.24=Stream is closed
+                        throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
                     }
                 }
 
@@ -355,12 +355,12 @@
     @Override
     public synchronized void reset() throws IOException {
         if (buf == null) {
-            // K0059=Stream is closed
-            throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$	
+            // luni.24=Stream is closed
+            throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$	
         }
         if (-1 == markpos) {
-            // K005a=Mark has been invalidated.
-            throw new IOException(Msg.getString("K005a")); //$NON-NLS-1$
+            // luni.A4=Mark has been invalidated.
+            throw new IOException(Messages.getString("luni.A4")); //$NON-NLS-1$
         }
         pos = markpos;
     }
@@ -384,15 +384,15 @@
         byte[] localBuf = buf;
         InputStream localIn = in;
         if (localBuf == null) {
-            // K0059=Stream is closed
-            throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+            // luni.24=Stream is closed
+            throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
         }
         if (amount < 1) {
             return 0;
         }
         if (localIn == null) {
-            // K0059=Stream is closed
-            throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+            // luni.24=Stream is closed
+            throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
         }
 
         if (count - pos >= amount) {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedOutputStream.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedOutputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedOutputStream.java Sun Feb 14 08:40:42 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * Wraps an existing {@link OutputStream} and <em>buffers</em> the output.
@@ -73,8 +73,8 @@
     public BufferedOutputStream(OutputStream out, int size) {
         super(out);
         if (size <= 0) {
-            // K0058=size must be > 0
-            throw new IllegalArgumentException(Msg.getString("K0058")); //$NON-NLS-1$
+            // luni.A3=size must be > 0
+            throw new IllegalArgumentException(Messages.getString("luni.A3")); //$NON-NLS-1$
         }
         buf = new byte[size];
     }
@@ -89,7 +89,7 @@
     @Override
     public synchronized void flush() throws IOException {
         if (buf == null) {
-            throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
         }
 
         flushInternal();
@@ -126,12 +126,12 @@
             throws IOException {
         byte[] internalBuffer = buf;
         if (internalBuffer == null) {
-            throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
         }
 
         if (buffer == null) {
-            // K0047=buffer is null
-            throw new NullPointerException(Msg.getString("K0047")); //$NON-NLS-1$
+            // luni.11=buffer is null
+            throw new NullPointerException(Messages.getString("luni.11")); //$NON-NLS-1$
         }
         
         if (length >= internalBuffer.length) {
@@ -141,13 +141,13 @@
         }
         
         if (offset < 0 || offset > buffer.length - length) {
-            // K002e=Offset out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset)); //$NON-NLS-1$
+            // luni.12=Offset out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.12", offset)); //$NON-NLS-1$
         
         }
         if (length < 0) {
-            // K0031=Length out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length)); //$NON-NLS-1$
+            // luni.18=Length out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.18", length)); //$NON-NLS-1$
         }
 
         // flush the internal buffer first if we have not enough space left
@@ -188,7 +188,7 @@
     public synchronized void write(int oneByte) throws IOException {
         byte[] internalBuffer = buf;
         if (internalBuffer == null) {
-            throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
         }
 
         if (count == internalBuffer.length) {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedReader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedReader.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedReader.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedReader.java Sun Feb 14 08:40:42 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * Wraps an existing {@link Reader} and <em>buffers</em> the input. Expensive
@@ -97,7 +97,7 @@
     public BufferedReader(Reader in, int size) {
         super(in);
         if (size <= 0) {
-            throw new IllegalArgumentException(Msg.getString("K0058")); //$NON-NLS-1$
+            throw new IllegalArgumentException(Messages.getString("luni.A3")); //$NON-NLS-1$
         }
         this.in = in;
         buf = new char[size];
@@ -200,7 +200,7 @@
         }
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K005b")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.A5")); //$NON-NLS-1$
             }
             this.markLimit = markLimit;
             mark = pos;
@@ -236,7 +236,7 @@
     public int read() throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K005b")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.A5")); //$NON-NLS-1$
             }
             /* Are there buffered characters available? */
             if (pos < end || fillBuf() != -1) {
@@ -276,7 +276,7 @@
     public int read(char[] buffer, int offset, int length) throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K005b")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.A5")); //$NON-NLS-1$
             }
             if (offset < 0 || offset > buffer.length - length || length < 0) {
                 throw new IndexOutOfBoundsException();
@@ -361,7 +361,7 @@
     public String readLine() throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K005b")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.A5")); //$NON-NLS-1$
             }
             /* has the underlying stream been exhausted? */
             if (pos == end && fillBuf() == -1) {
@@ -451,7 +451,7 @@
     public boolean ready() throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K005b")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.A5")); //$NON-NLS-1$
             }
             return ((end - pos) > 0) || in.ready();
         }
@@ -471,10 +471,10 @@
     public void reset() throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K005b")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.A5")); //$NON-NLS-1$
             }
             if (mark == -1) {
-                throw new IOException(Msg.getString("K005c")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.A6")); //$NON-NLS-1$
             }
             pos = mark;
         }
@@ -504,7 +504,7 @@
         }
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K005b")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.A5")); //$NON-NLS-1$
             }
             if (amount < 1) {
                 return 0;

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedWriter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedWriter.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedWriter.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedWriter.java Sun Feb 14 08:40:42 2010
@@ -19,7 +19,7 @@
 
 import java.security.AccessController;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.luni.util.PriviAction;
 import org.apache.harmony.luni.util.SneakyThrow;
 
@@ -79,7 +79,7 @@
     public BufferedWriter(Writer out, int size) {
         super(out);
         if (size <= 0) {
-            throw new IllegalArgumentException(Msg.getString("K0058")); //$NON-NLS-1$
+            throw new IllegalArgumentException(Messages.getString("luni.A3")); //$NON-NLS-1$
         }
         this.out = out;
         this.buf = new char[size];
@@ -134,7 +134,7 @@
     public void flush() throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K005d")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.A7")); //$NON-NLS-1$
             }
             flushInternal();
             out.flush();
@@ -195,7 +195,7 @@
     public void write(char[] cbuf, int offset, int count) throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K005d")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.A7")); //$NON-NLS-1$
             }
             if (offset < 0 || offset > cbuf.length - count || count < 0) {
                 throw new IndexOutOfBoundsException();
@@ -244,7 +244,7 @@
     public void write(int oneChar) throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K005d")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.A7")); //$NON-NLS-1$
             }
             if (pos >= buf.length) {
                 out.write(buf, 0, buf.length);
@@ -278,7 +278,7 @@
     public void write(String str, int offset, int count) throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K005d")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.A7")); //$NON-NLS-1$
             }
             if (count <= 0) {
                 return;

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ByteArrayOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ByteArrayOutputStream.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ByteArrayOutputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ByteArrayOutputStream.java Sun Feb 14 08:40:42 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * A specialized {@link OutputStream} for class for writing content to an
@@ -64,7 +64,7 @@
         if (size >= 0) {
             buf = new byte[size];
         } else {
-            throw new IllegalArgumentException(Msg.getString("K005e")); //$NON-NLS-1$
+            throw new IllegalArgumentException(Messages.getString("luni.A8")); //$NON-NLS-1$
         }
     }
 
@@ -199,7 +199,7 @@
         // avoid int overflow
         if (offset < 0 || offset > buffer.length || len < 0
                 || len > buffer.length - offset) {
-            throw new IndexOutOfBoundsException(Msg.getString("K002f")); //$NON-NLS-1$
+            throw new IndexOutOfBoundsException(Messages.getString("luni.13")); //$NON-NLS-1$
         }
         if (len == 0) {
             return;

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/CharArrayReader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/CharArrayReader.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/CharArrayReader.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/CharArrayReader.java Sun Feb 14 08:40:42 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * A specialized {@link Reader} for reading the contents of a char array.
@@ -139,7 +139,7 @@
     public void mark(int readLimit) throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K0060")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.A9")); //$NON-NLS-1$
             }
             markedPos = pos;
         }
@@ -172,7 +172,7 @@
     public int read() throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K0060")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.A9")); //$NON-NLS-1$
             }
             if (pos == count) {
                 return -1;
@@ -206,18 +206,18 @@
     @Override
     public int read(char buffer[], int offset, int len) throws IOException {
         if (offset < 0 || offset > buffer.length) {
-            // K002e=Offset out of bounds \: {0}
+            // luni.12=Offset out of bounds \: {0}
             throw new ArrayIndexOutOfBoundsException(
-                    Msg.getString("K002e", offset)); //$NON-NLS-1$
+                    Messages.getString("luni.12", offset)); //$NON-NLS-1$
         }
         if (len < 0 || len > buffer.length - offset) {
-            // K0031=Length out of bounds \: {0}
+            // luni.18=Length out of bounds \: {0}
             throw new ArrayIndexOutOfBoundsException(
-                    Msg.getString("K0031", len)); //$NON-NLS-1$
+                    Messages.getString("luni.18", len)); //$NON-NLS-1$
         }
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K0060")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.A9")); //$NON-NLS-1$
             }
             if (pos < this.count) {
                 int bytesRead = pos + len > this.count ? this.count - pos : len;
@@ -245,7 +245,7 @@
     public boolean ready() throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K0060")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.A9")); //$NON-NLS-1$
             }
             return pos != count;
         }
@@ -264,7 +264,7 @@
     public void reset() throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K0060")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.A9")); //$NON-NLS-1$
             }
             pos = markedPos != -1 ? markedPos : 0;
         }
@@ -285,7 +285,7 @@
     public long skip(long n) throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K0060")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.A9")); //$NON-NLS-1$
             }
             if (n <= 0) {
                 return 0;

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/CharArrayWriter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/CharArrayWriter.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/CharArrayWriter.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/CharArrayWriter.java Sun Feb 14 08:40:42 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * A specialized {@link Writer} for class for writing content to an (internal)
@@ -63,7 +63,7 @@
     public CharArrayWriter(int initialSize) {
         super();
         if (initialSize < 0) {
-            throw new IllegalArgumentException(Msg.getString("K005e")); //$NON-NLS-1$
+            throw new IllegalArgumentException(Messages.getString("luni.A8")); //$NON-NLS-1$
         }
         buf = new char[initialSize];
         lock = buf;
@@ -214,7 +214,7 @@
     @Override
     public void write(String str, int offset, int len) {
         if (str == null) {
-            throw new NullPointerException(Msg.getString("K0047")); //$NON-NLS-1$
+            throw new NullPointerException(Messages.getString("luni.11")); //$NON-NLS-1$
         }
         // avoid int overflow
         if (offset < 0 || offset > str.length() || len < 0

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/DataInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/DataInputStream.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/DataInputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/DataInputStream.java Sun Feb 14 08:40:42 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.luni.util.Util;
 
 /**
@@ -244,10 +244,10 @@
             return;
         }
         if (in == null) {
-            throw new NullPointerException(Msg.getString("KA00b")); //$NON-NLS-1$
+            throw new NullPointerException(Messages.getString("luni.AA")); //$NON-NLS-1$
         }
         if (buffer == null) {
-            throw new NullPointerException(Msg.getString("K0047")); //$NON-NLS-1$
+            throw new NullPointerException(Messages.getString("luni.11")); //$NON-NLS-1$
         }
         if (offset < 0 || offset > buffer.length - length) {
             throw new IndexOutOfBoundsException();

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/DataOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/DataOutputStream.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/DataOutputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/DataOutputStream.java Sun Feb 14 08:40:42 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * Wraps an existing {@link OutputStream} and writes typed data to it.
@@ -93,7 +93,7 @@
     @Override
     public void write(byte buffer[], int offset, int count) throws IOException {
         if (buffer == null) {
-            throw new NullPointerException(Msg.getString("K0047")); //$NON-NLS-1$
+            throw new NullPointerException(Messages.getString("luni.11")); //$NON-NLS-1$
         }
         out.write(buffer, offset, count);
         written += count;
@@ -332,7 +332,7 @@
     public final void writeUTF(String str) throws IOException {
         long utfCount = countUTFBytes(str);
         if (utfCount > 65535) {
-            throw new UTFDataFormatException(Msg.getString("K0068")); //$NON-NLS-1$
+            throw new UTFDataFormatException(Messages.getString("luni.AB")); //$NON-NLS-1$
         }
         byte[] buffer = new byte[(int)utfCount + 2];
         int offset = 0;

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/File.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/File.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/File.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/File.java Sun Feb 14 08:40:42 2010
@@ -27,7 +27,7 @@
 
 import org.apache.harmony.luni.internal.io.FileCanonPathCache;
 import org.apache.harmony.luni.util.DeleteOnExit;
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.luni.util.PriviAction;
 import org.apache.harmony.luni.util.Util;
 
@@ -199,33 +199,33 @@
     @SuppressWarnings("nls")
     private void checkURI(URI uri) {
         if (!uri.isAbsolute()) {
-            throw new IllegalArgumentException(Msg.getString("K031a", uri));
+            throw new IllegalArgumentException(Messages.getString("luni.AD", uri));
         } else if (!uri.getRawSchemeSpecificPart().startsWith("/")) {
-            throw new IllegalArgumentException(Msg.getString("K031b", uri));
+            throw new IllegalArgumentException(Messages.getString("luni.AE", uri));
         }
 
         String temp = uri.getScheme();
         if (temp == null || !temp.equals("file")) {
-            throw new IllegalArgumentException(Msg.getString("K031c", uri));
+            throw new IllegalArgumentException(Messages.getString("luni.AF", uri));
         }
 
         temp = uri.getRawPath();
         if (temp == null || temp.length() == 0) {
-            throw new IllegalArgumentException(Msg.getString("K031d", uri));
+            throw new IllegalArgumentException(Messages.getString("luni.B0", uri));
         }
 
         if (uri.getRawAuthority() != null) {
-            throw new IllegalArgumentException(Msg.getString("K031e",
+            throw new IllegalArgumentException(Messages.getString("luni.B1",
                     new String[] { "authority", uri.toString() }));
         }
 
         if (uri.getRawQuery() != null) {
-            throw new IllegalArgumentException(Msg.getString("K031e",
+            throw new IllegalArgumentException(Messages.getString("luni.B1",
                     new String[] { "query", uri.toString() }));
         }
 
         if (uri.getRawFragment() != null) {
-            throw new IllegalArgumentException(Msg.getString("K031e",
+            throw new IllegalArgumentException(Messages.getString("luni.B1",
                     new String[] { "fragment", uri.toString() }));
         }
     }
@@ -950,7 +950,7 @@
      */
     public boolean setLastModified(long time) {
         if (time < 0) {
-            throw new IllegalArgumentException(Msg.getString("K006a")); //$NON-NLS-1$
+            throw new IllegalArgumentException(Messages.getString("luni.B2")); //$NON-NLS-1$
         }
         SecurityManager security = System.getSecurityManager();
         if (security != null) {
@@ -1374,7 +1374,7 @@
             security.checkWrite(path);
         }
         if (0 == path.length()) {
-            throw new IOException(Msg.getString("KA012")); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.B3")); //$NON-NLS-1$
         }
         int result = newFileImpl(properPath(true));
         switch (result) {
@@ -1383,7 +1383,7 @@
             case 1:
                 return false;
             default:
-                throw new IOException(Msg.getString("K01c2", path)); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.B4", path)); //$NON-NLS-1$
         }
     }
 
@@ -1434,7 +1434,7 @@
             File directory) throws IOException {
         // Force a prefix null check first
         if (prefix.length() < 3) {
-            throw new IllegalArgumentException(Msg.getString("K006b"));
+            throw new IllegalArgumentException(Messages.getString("luni.B5"));
         }
         String newSuffix = suffix == null ? ".tmp" : suffix;
         File tmpDirFile;

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/FileInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/FileInputStream.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/FileInputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/FileInputStream.java Sun Feb 14 08:40:42 2010
@@ -21,7 +21,7 @@
 
 import org.apache.harmony.luni.platform.IFileSystem;
 import org.apache.harmony.luni.platform.Platform;
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.nio.FileChannelFactory;
 
 /**
@@ -74,8 +74,8 @@
             security.checkRead(filePath);
         }
         if (file == null) {
-            // KA001=Argument must not be null
-            throw new NullPointerException(Msg.getString("KA001")); //$NON-NLS-1$
+            // luni.4D=Argument must not be null
+            throw new NullPointerException(Messages.getString("luni.4D")); //$NON-NLS-1$
         }
         fd = new FileDescriptor();
         fd.readOnly = true;
@@ -316,8 +316,8 @@
             return 0;
         }
         if (count < 0) {
-            // KA013=Number of bytes to skip cannot be negative
-            throw new IOException(Msg.getString("KA013")); //$NON-NLS-1$
+            // luni.AC=Number of bytes to skip cannot be negative
+            throw new IOException(Messages.getString("luni.AC")); //$NON-NLS-1$
         }
 
         // stdin requires special handling

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/FileOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/FileOutputStream.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/FileOutputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/FileOutputStream.java Sun Feb 14 08:40:42 2010
@@ -21,7 +21,7 @@
 
 import org.apache.harmony.luni.platform.IFileSystem;
 import org.apache.harmony.luni.platform.Platform;
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.nio.FileChannelFactory;
 
 /**
@@ -116,7 +116,7 @@
     public FileOutputStream(FileDescriptor fd) {
         super();
         if (fd == null) {
-            throw new NullPointerException(Msg.getString("K006c")); //$NON-NLS-1$
+            throw new NullPointerException(Messages.getString("luni.B6")); //$NON-NLS-1$
         }
         SecurityManager security = System.getSecurityManager();
         if (security != null) {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/FilePermission.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/FilePermission.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/FilePermission.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/FilePermission.java Sun Feb 14 08:40:42 2010
@@ -22,7 +22,7 @@
 import java.security.PermissionCollection;
 import java.security.PrivilegedAction;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * A permission for accessing a file or directory. The FilePermission is made up
@@ -93,12 +93,12 @@
 
     private void init(final String path, String pathActions) {
         if (pathActions == null || pathActions.equals("")) { //$NON-NLS-1$
-            throw new IllegalArgumentException(Msg.getString("K006d")); //$NON-NLS-1$
+            throw new IllegalArgumentException(Messages.getString("luni.B7")); //$NON-NLS-1$
         }
         this.actions = toCanonicalActionString(pathActions);
 
         if (path == null) {
-            throw new NullPointerException(Msg.getString("K006e")); //$NON-NLS-1$
+            throw new NullPointerException(Messages.getString("luni.B8")); //$NON-NLS-1$
         }
         if (path.equals("<<ALL FILES>>")) { //$NON-NLS-1$
             includeAll = true;
@@ -181,8 +181,8 @@
             } else if (action.equals("delete")) { //$NON-NLS-1$
                 actionInt |= 1;
             } else {
-                throw new IllegalArgumentException(Msg.getString(
-                        "K006f", action)); //$NON-NLS-1$
+                throw new IllegalArgumentException(Messages.getString(
+                        "luni.B9", action)); //$NON-NLS-1$
             }
             head = tail + 1;
         } while (tail > 0);

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/FilterOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/FilterOutputStream.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/FilterOutputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/FilterOutputStream.java Sun Feb 14 08:40:42 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.luni.util.SneakyThrow;
 
 /**
@@ -124,12 +124,12 @@
     public void write(byte buffer[], int offset, int length) throws IOException {
         // Force null buffer check first!
         if (offset > buffer.length || offset < 0) {
-            // K002e=Offset out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset)); //$NON-NLS-1$
+            // luni.12=Offset out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.12", offset)); //$NON-NLS-1$
         }
         if (length < 0 || length > buffer.length - offset) {
-            // K0031=Length out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length)); //$NON-NLS-1$
+            // luni.18=Length out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.18", length)); //$NON-NLS-1$
         }
         for (int i = 0; i < length; i++) {
             // Call write() instead of out.write() since subclasses could

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/InputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/InputStream.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/InputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/InputStream.java Sun Feb 14 08:40:42 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * The base class for all input streams. An input stream is a means of reading
@@ -151,12 +151,12 @@
     public int read(byte b[], int offset, int length) throws IOException {
         // Force null check for b first!
         if (offset > b.length || offset < 0) {
-            // K002e=Offset out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset)); //$NON-NLS-1$
+            // luni.12=Offset out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.12", offset)); //$NON-NLS-1$
         } 
         if (length < 0 || length > b.length - offset) {
-            // K0031=Length out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length)); //$NON-NLS-1$
+            // luni.18=Length out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.18", length)); //$NON-NLS-1$
         }
         for (int i = 0; i < length; i++) {
             int c;

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/InputStreamReader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/InputStreamReader.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/InputStreamReader.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/InputStreamReader.java Sun Feb 14 08:40:42 2010
@@ -28,7 +28,7 @@
 import java.security.AccessController;
 
 import org.apache.harmony.luni.util.HistoricalNamesUtil;
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.luni.util.PriviAction;
 
 /**
@@ -189,8 +189,8 @@
     public int read() throws IOException {
         synchronized (lock) {
             if (!isOpen()) {
-                // K0070=InputStreamReader is closed.
-                throw new IOException(Msg.getString("K0070")); //$NON-NLS-1$
+                // luni.BA=InputStreamReader is closed.
+                throw new IOException(Messages.getString("luni.BA")); //$NON-NLS-1$
             }
 
             char buf[] = new char[1];
@@ -226,8 +226,8 @@
     public int read(char[] buf, int offset, int length) throws IOException {
         synchronized (lock) {
             if (!isOpen()) {
-                // K0070=InputStreamReader is closed.
-                throw new IOException(Msg.getString("K0070")); //$NON-NLS-1$
+                // luni.BA=InputStreamReader is closed.
+                throw new IOException(Messages.getString("luni.BA")); //$NON-NLS-1$
             }
             if (offset < 0 || offset > buf.length - length || length < 0) {
                 throw new IndexOutOfBoundsException();
@@ -326,8 +326,8 @@
     public boolean ready() throws IOException {
         synchronized (lock) {
             if (in == null) {
-                // K0070=InputStreamReader is closed.
-                throw new IOException(Msg.getString("K0070")); //$NON-NLS-1$
+                // luni.BA=InputStreamReader is closed.
+                throw new IOException(Messages.getString("luni.BA")); //$NON-NLS-1$
             }
             try {
                 return bytes.hasRemaining() || in.available() > 0;

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/LineNumberInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/LineNumberInputStream.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/LineNumberInputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/LineNumberInputStream.java Sun Feb 14 08:40:42 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * Wraps an existing {@link InputStream} and counts the line terminators
@@ -171,12 +171,12 @@
     public int read(byte[] buffer, int offset, int length) throws IOException {
         // Force buffer null check first!
         if (offset > buffer.length || offset < 0) {
-            // K002e=Offset out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset)); //$NON-NLS-1$
+            // luni.12=Offset out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.12", offset)); //$NON-NLS-1$
         } 
         if (length < 0 || length > buffer.length - offset) {
-            // K0031=Length out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length)); //$NON-NLS-1$
+            // luni.18=Length out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.18", length)); //$NON-NLS-1$
         }
 
         for (int i = 0; i < length; i++) {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ObjectInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ObjectInputStream.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ObjectInputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ObjectInputStream.java Sun Feb 14 08:40:42 2010
@@ -35,7 +35,7 @@
 
 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.internal.nls.Messages;
 import org.apache.harmony.luni.util.PriviAction;
 
 /**
@@ -666,12 +666,12 @@
     public int read(byte[] buffer, int offset, int length) throws IOException {
         // Force buffer null check first!
         if (offset > buffer.length || offset < 0) {
-            // K002e=Offset out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset)); //$NON-NLS-1$
+            // luni.12=Offset out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.12", offset)); //$NON-NLS-1$
         }
         if (length < 0 || length > buffer.length - offset) {
-            // K0031=Length out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length)); //$NON-NLS-1$
+            // luni.18=Length out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.18", length)); //$NON-NLS-1$
         }
         if (length == 0) {
             return 0;
@@ -810,8 +810,8 @@
             case TC_NULL:
                 return null;
             default:
-                throw new StreamCorruptedException(Msg.getString(
-                        "K00d2", Integer.toHexString(tc & 0xff))); //$NON-NLS-1$
+                throw new StreamCorruptedException(Messages.getString(
+                        "luni.BC", Integer.toHexString(tc & 0xff))); //$NON-NLS-1$
         }
     }
 
@@ -855,13 +855,13 @@
                 return null;
             case TC_EXCEPTION:
                 Exception exc = readException();
-                throw new WriteAbortedException(Msg.getString("K00d3"), exc); //$NON-NLS-1$
+                throw new WriteAbortedException(Messages.getString("luni.BD"), exc); //$NON-NLS-1$
             case TC_RESET:
                 resetState();
                 return null;
             default:
-                throw new StreamCorruptedException(Msg.getString(
-                        "K00d2", Integer.toHexString(tc & 0xff))); //$NON-NLS-1$
+                throw new StreamCorruptedException(Messages.getString(
+                        "luni.BC", Integer.toHexString(tc & 0xff))); //$NON-NLS-1$
         }
     }
 
@@ -909,14 +909,14 @@
                 case TC_REFERENCE:
                     if (unshared) {
                         readNewHandle();
-                        throw new InvalidObjectException(Msg.getString("KA002")); //$NON-NLS-1$
+                        throw new InvalidObjectException(Messages.getString("luni.BE")); //$NON-NLS-1$
                     }
                     return readCyclicReference();
                 case TC_NULL:
                     return null;
                 case TC_EXCEPTION:
                     Exception exc = readException();
-                    throw new WriteAbortedException(Msg.getString("K00d3"), exc); //$NON-NLS-1$
+                    throw new WriteAbortedException(Messages.getString("luni.BD"), exc); //$NON-NLS-1$
                 case TC_RESET:
                     resetState();
                     break;
@@ -926,8 +926,8 @@
                     e.eof = true;
                     throw e;
                 default:
-                    throw new StreamCorruptedException(Msg.getString(
-                            "K00d2", Integer.toHexString(tc & 0xff))); //$NON-NLS-1$
+                    throw new StreamCorruptedException(Messages.getString(
+                            "luni.BC", Integer.toHexString(tc & 0xff))); //$NON-NLS-1$
             }
             // Only TC_RESET falls through
         } while (true);
@@ -1267,8 +1267,8 @@
                             }
                             break;
                         default:
-                            throw new StreamCorruptedException(Msg.getString(
-                                    "K00d5", fieldDesc.getTypeCode())); //$NON-NLS-1$
+                            throw new StreamCorruptedException(Messages.getString(
+                                    "luni.BF", fieldDesc.getTypeCode())); //$NON-NLS-1$
                     }
                 } catch (NoSuchFieldError err) {
                 }
@@ -1294,8 +1294,8 @@
                         Class<?> fieldType = fieldDesc.getType();
                         Class<?> valueType = toSet.getClass();
                         if (!fieldType.isAssignableFrom(valueType)) {
-                            throw new ClassCastException(Msg.getString(
-                                    "K00d4", new String[] { //$NON-NLS-1$
+                            throw new ClassCastException(Messages.getString(
+                                    "luni.C0", new String[] { //$NON-NLS-1$
                                     fieldType.toString(), valueType.toString(),
                                             classDesc.getName() + "." //$NON-NLS-1$
                                                     + fieldName }));
@@ -1600,7 +1600,7 @@
         ObjectStreamClass classDesc = readClassDesc();
 
         if (classDesc == null) {
-            throw new InvalidClassException(Msg.getString("K00d1")); //$NON-NLS-1$
+            throw new InvalidClassException(Messages.getString("luni.C1")); //$NON-NLS-1$
         }
 
         Integer newHandle = nextHandle();
@@ -1657,8 +1657,8 @@
                     doubleArray[i] = input.readDouble();
                 }
             } else {
-                throw new ClassNotFoundException(Msg.getString(
-                        "K00d7", classDesc.getName())); //$NON-NLS-1$
+                throw new ClassNotFoundException(Messages.getString(
+                        "luni.C2", classDesc.getName())); //$NON-NLS-1$
             }
         } else {
             // Array of Objects
@@ -1702,7 +1702,7 @@
             }
             return localClass;
         }
-        throw new InvalidClassException(Msg.getString("K00d1")); //$NON-NLS-1$
+        throw new InvalidClassException(Messages.getString("luni.C1")); //$NON-NLS-1$
     }
 
     /*
@@ -1720,8 +1720,8 @@
             case TC_NULL:
                 return null;
             default:
-                throw new StreamCorruptedException(Msg.getString(
-                        "K00d2", Integer.toHexString(tc & 0xff))); //$NON-NLS-1$
+                throw new StreamCorruptedException(Messages.getString(
+                        "luni.BC", Integer.toHexString(tc & 0xff))); //$NON-NLS-1$
         }
     }
 
@@ -1743,8 +1743,8 @@
         // Check SUIDs, note all SUID for Enum is 0L
         if (0L != classDesc.getSerialVersionUID()
                 || 0L != superClass.getSerialVersionUID()) {
-            throw new InvalidClassException(superClass.getName(), Msg
-                    .getString("K00da", superClass, //$NON-NLS-1$
+            throw new InvalidClassException(superClass.getName(), Messages
+                    .getString("luni.C3", superClass, //$NON-NLS-1$
                             superClass));
         }
         byte tc = nextTC();
@@ -1772,7 +1772,7 @@
             case TC_REFERENCE:
                 if (unshared) {
                     readNewHandle();
-                    throw new InvalidObjectException(Msg.getString("KA002")); //$NON-NLS-1$
+                    throw new InvalidObjectException(Messages.getString("luni.BE")); //$NON-NLS-1$
                 }
                 name = (String) readCyclicReference();
                 break;
@@ -1780,7 +1780,7 @@
                 name = (String) readNewString(unshared);
                 break;
             default:
-                throw new StreamCorruptedException(Msg.getString("K00d2"));//$NON-NLS-1$
+                throw new StreamCorruptedException(Messages.getString("luni.BC"));//$NON-NLS-1$
         }
 
         Enum<?> result = Enum.valueOf((Class) classDesc.forClass(), name);
@@ -1980,8 +1980,8 @@
 
             // Has to have an empty constructor
             if (constructor == null) {
-                throw new InvalidClassException(constructorClass.getName(), Msg
-                        .getString("K00dc")); //$NON-NLS-1$
+                throw new InvalidClassException(constructorClass.getName(), Messages
+                        .getString("luni.C4")); //$NON-NLS-1$
             }
 
             int constructorModifiers = constructor.getModifiers();
@@ -1991,8 +1991,8 @@
             if (Modifier.isPrivate(constructorModifiers)
                     || (wasExternalizable && !Modifier
                             .isPublic(constructorModifiers))) {
-                throw new InvalidClassException(constructorClass.getName(), Msg
-                        .getString("K00dc")); //$NON-NLS-1$
+                throw new InvalidClassException(constructorClass.getName(), Messages
+                        .getString("luni.C4")); //$NON-NLS-1$
             }
 
             // We know we are testing from a subclass, so the only other case
@@ -2005,7 +2005,7 @@
                 // visibility. Check if same package
                 if (!inSamePackage(constructorClass, objectClass)) {
                     throw new InvalidClassException(constructorClass.getName(),
-                            Msg.getString("K00dc")); //$NON-NLS-1$
+                            Messages.getString("luni.C4")); //$NON-NLS-1$
                 }
             }
 
@@ -2039,7 +2039,7 @@
         ObjectStreamClass classDesc = readClassDesc();
 
         if (classDesc == null) {
-            throw new InvalidClassException(Msg.getString("K00d1")); //$NON-NLS-1$
+            throw new InvalidClassException(Messages.getString("luni.C1")); //$NON-NLS-1$
         }
 
         Integer newHandle = nextHandle();
@@ -2395,7 +2395,7 @@
         Object res = objectsRead.get(handle);
 
         if (res == UNSHARED_OBJ) {
-            throw new InvalidObjectException(Msg.getString("KA010")); //$NON-NLS-1$
+            throw new InvalidObjectException(Messages.getString("luni.C5")); //$NON-NLS-1$
         }
 
         return res;
@@ -2448,7 +2448,7 @@
             throw new NotActiveException();
         }
         if (object == null) {
-            throw new InvalidObjectException(Msg.getString("K00d9")); //$NON-NLS-1$
+            throw new InvalidObjectException(Messages.getString("luni.C6")); //$NON-NLS-1$
         }
         // From now on it is just insertion in a SortedCollection. Since
         // the Java class libraries don't provide that, we have to
@@ -2608,8 +2608,8 @@
 
         if (loadedStreamClass.getSerialVersionUID() != localStreamClass
                 .getSerialVersionUID()) {
-            throw new InvalidClassException(loadedStreamClass.getName(), Msg
-                    .getString("K00da", loadedStreamClass, //$NON-NLS-1$
+            throw new InvalidClassException(loadedStreamClass.getName(), Messages
+                    .getString("luni.C3", loadedStreamClass, //$NON-NLS-1$
                             localStreamClass));
         }
 
@@ -2617,8 +2617,8 @@
         String localClassBaseName = getBaseName(localStreamClass.getName());
 
         if (!loadedClassBaseName.equals(localClassBaseName)) {
-            throw new InvalidClassException(loadedStreamClass.getName(), Msg
-                    .getString("KA015", loadedClassBaseName, //$NON-NLS-1$
+            throw new InvalidClassException(loadedStreamClass.getName(), Messages
+                    .getString("luni.C7", loadedClassBaseName, //$NON-NLS-1$
                             localClassBaseName));
         }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ObjectOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ObjectOutputStream.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ObjectOutputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ObjectOutputStream.java Sun Feb 14 08:40:42 2010
@@ -25,7 +25,7 @@
 import org.apache.harmony.misc.accessors.ObjectAccessor;
 import org.apache.harmony.misc.accessors.AccessorFactory;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * A specialized {@link OutputStream} that is able to write (serialize) Java
@@ -668,13 +668,13 @@
      */
     public void useProtocolVersion(int version) throws IOException {
         if (!objectsWritten.isEmpty()) {
-            // KA028=Cannot set protocol version when stream in use
-            throw new IllegalStateException(Msg.getString("KA028")); //$NON-NLS-1$
+            // luni.C8=Cannot set protocol version when stream in use
+            throw new IllegalStateException(Messages.getString("luni.C8")); //$NON-NLS-1$
         }
         if (version != ObjectStreamConstants.PROTOCOL_VERSION_1
                 && version != ObjectStreamConstants.PROTOCOL_VERSION_2) {
-            // K00b3=Unknown protocol\: {0}
-            throw new IllegalArgumentException(Msg.getString("K00b3", version)); //$NON-NLS-1$
+            // luni.9C=Unknown protocol\: {0}
+            throw new IllegalArgumentException(Messages.getString("luni.9C", version)); //$NON-NLS-1$
         }
         protocolVersion = version;
     }
@@ -1080,8 +1080,8 @@
                             break;
                         default:
                             throw new IOException(
-                                    org.apache.harmony.luni.util.Msg.getString(
-                                            "K00d5", fieldDesc.getTypeCode())); //$NON-NLS-1$
+                                    Messages.getString(
+                                            "luni.BF", fieldDesc.getTypeCode())); //$NON-NLS-1$
                     }
                 } else {
                     // Object type (array included).
@@ -1307,8 +1307,8 @@
                 }
             } else {
                 throw new InvalidClassException(
-                        org.apache.harmony.luni.util.Msg.getString(
-                                "K00d7", arrayClass.getName())); //$NON-NLS-1$
+                        Messages.getString(
+                                "luni.C2", arrayClass.getName())); //$NON-NLS-1$
             }
         } else {
             // Array of Objects

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ObjectStreamClass.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ObjectStreamClass.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ObjectStreamClass.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ObjectStreamClass.java Sun Feb 14 08:40:42 2010
@@ -32,7 +32,7 @@
 import java.util.List;
 import java.util.WeakHashMap;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.luni.util.PriviAction;
 import org.apache.harmony.luni.util.ThreadLocalCache;
 
@@ -418,8 +418,8 @@
                             // Static field, parameter is ignored
                             return field.getLong(null);
                         } catch (IllegalAccessException iae) {
-                            throw new RuntimeException(Msg.getString(
-                                    "K0071", iae)); //$NON-NLS-1$
+                            throw new RuntimeException(Messages.getString(
+                                    "luni.C9", iae)); //$NON-NLS-1$
                         }
                     }
                 }
@@ -590,7 +590,7 @@
                 }
             }
         } catch (IOException e) {
-            throw new RuntimeException(Msg.getString("K0072", e));//$NON-NLS-1$
+            throw new RuntimeException(Messages.getString("luni.CA", e));//$NON-NLS-1$
         }
 
         // now compute the UID based on the SHA

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ObjectStreamField.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ObjectStreamField.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ObjectStreamField.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ObjectStreamField.java Sun Feb 14 08:40:42 2010
@@ -333,6 +333,10 @@
     }
 
     void resolve(ClassLoader loader) {
+        if (typeString == null && isPrimitive()){
+            // primitive type declared in a serializable class
+            typeString = String.valueOf(getTypeCode());
+        }
         if (typeString.length() == 1) {
             switch (typeString.charAt(0)) {
                 case 'I':

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/OutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/OutputStream.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/OutputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/OutputStream.java Sun Feb 14 08:40:42 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * The base class for all output streams. An output stream is a means of writing
@@ -101,7 +101,7 @@
         // avoid int overflow, check null buffer
         if (offset > buffer.length || offset < 0 || count < 0
                 || count > buffer.length - offset) {
-            throw new IndexOutOfBoundsException(Msg.getString("K002f")); //$NON-NLS-1$
+            throw new IndexOutOfBoundsException(Messages.getString("luni.13")); //$NON-NLS-1$
         }
         for (int i = offset; i < offset + count; i++) {
             write(buffer[i]);

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/OutputStreamWriter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/OutputStreamWriter.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/OutputStreamWriter.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/OutputStreamWriter.java Sun Feb 14 08:40:42 2010
@@ -26,7 +26,7 @@
 import java.security.AccessController;
 
 import org.apache.harmony.luni.util.HistoricalNamesUtil;
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.luni.util.PriviAction;
 
 /**
@@ -181,8 +181,8 @@
 
     private void checkStatus() throws IOException {
         if (encoder == null) {
-            // K005d=Writer is closed.
-            throw new IOException(Msg.getString("K005d")); //$NON-NLS-1$
+            // luni.A7=Writer is closed.
+            throw new IOException(Messages.getString("luni.A7")); //$NON-NLS-1$
         }
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PipedInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PipedInputStream.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PipedInputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PipedInputStream.java Sun Feb 14 08:40:42 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * Receives information from a communications pipe. When two threads want to
@@ -189,17 +189,17 @@
     @Override
     public synchronized int read() throws IOException {
         if (!isConnected) {
-            // K0074=Not connected
-            throw new IOException(Msg.getString("K0074")); //$NON-NLS-1$
+            // luni.CB=Not connected
+            throw new IOException(Messages.getString("luni.CB")); //$NON-NLS-1$
         }
         if (buffer == null) {
-            // K0075=InputStream is closed
-            throw new IOException(Msg.getString("K0075")); //$NON-NLS-1$
+            // luni.CC=InputStream is closed
+            throw new IOException(Messages.getString("luni.CC")); //$NON-NLS-1$
         }
 
         if (lastWriter != null && !lastWriter.isAlive() && (in < 0)) {
-            // KA030=Write end dead
-            throw new IOException(Msg.getString("KA030")); //$NON-NLS-1$
+            // luni.CD=Write end dead
+            throw new IOException(Messages.getString("luni.CD")); //$NON-NLS-1$
         }
         /**
          * Set the last thread to be reading on this PipedInputStream. If
@@ -215,8 +215,8 @@
                     return -1;
                 }
                 if ((attempts-- <= 0) && lastWriter != null && !lastWriter.isAlive()) {
-                    // K0076=Pipe broken
-                    throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
+                    // luni.CE=Pipe broken
+                    throw new IOException(Messages.getString("luni.CE")); //$NON-NLS-1$
                 }
                 // Notify callers of receive()
                 notifyAll();
@@ -286,18 +286,18 @@
         }
 
         if (!isConnected) {
-            // K0074=Not connected
-            throw new IOException(Msg.getString("K0074")); //$NON-NLS-1$
+            // luni.CB=Not connected
+            throw new IOException(Messages.getString("luni.CB")); //$NON-NLS-1$
         }
 
         if (buffer == null) {
-            // K0075=InputStream is closed
-            throw new IOException(Msg.getString("K0075")); //$NON-NLS-1$
+            // luni.CC=InputStream is closed
+            throw new IOException(Messages.getString("luni.CC")); //$NON-NLS-1$
         }
 
         if (lastWriter != null && !lastWriter.isAlive() && (in < 0)) {
-            // KA030=Write end dead
-            throw new IOException(Msg.getString("KA030")); //$NON-NLS-1$
+            // luni.CD=Write end dead
+            throw new IOException(Messages.getString("luni.CD")); //$NON-NLS-1$
         }
 
         /**
@@ -314,8 +314,8 @@
                     return -1;
                 }
                 if ((attempts-- <= 0) && lastWriter != null && !lastWriter.isAlive()) {
-                    // K0076=Pipe broken
-                    throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
+                    // luni.CE=Pipe broken
+                    throw new IOException(Messages.getString("luni.CE")); //$NON-NLS-1$
                 }
                 // Notify callers of receive()
                 notifyAll();
@@ -383,10 +383,10 @@
      */
     protected synchronized void receive(int oneByte) throws IOException {
         if (buffer == null || isClosed) {
-            throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
         }
         if (lastReader != null && !lastReader.isAlive()) {
-            throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.CE")); //$NON-NLS-1$
         }
         /**
          * Set the last thread to be writing on this PipedInputStream. If
@@ -399,7 +399,7 @@
                 notifyAll();
                 wait(1000);
                 if (lastReader != null && !lastReader.isAlive()) {
-                    throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
+                    throw new IOException(Messages.getString("luni.CE")); //$NON-NLS-1$
                 }
             }
         } catch (InterruptedException e) {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PipedOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PipedOutputStream.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PipedOutputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PipedOutputStream.java Sun Feb 14 08:40:42 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * Places information on a communications pipe. When two threads want to pass
@@ -87,11 +87,11 @@
             throw new NullPointerException();
         }
         if (this.dest != null) {
-            throw new IOException(Msg.getString("K0079")); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.5F")); //$NON-NLS-1$
         }
         synchronized (stream) {
             if (stream.isConnected) {
-                throw new IOException(Msg.getString("K007a")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D0")); //$NON-NLS-1$
             }
             if (stream.buffer == null) {
                 stream.buffer = new byte[PipedInputStream.PIPE_SIZE];
@@ -148,8 +148,8 @@
     @Override
     public void write(byte buffer[], int offset, int count) throws IOException {
         if (dest == null) {
-            // K007b=Pipe Not Connected
-            throw new IOException(Msg.getString("K007b")); //$NON-NLS-1$
+            // luni.D1=Pipe Not Connected
+            throw new IOException(Messages.getString("luni.D1")); //$NON-NLS-1$
         }
         super.write(buffer, offset, count);
     }
@@ -177,7 +177,7 @@
     @Override
     public void write(int oneByte) throws IOException {
         if (dest == null) {
-            throw new IOException(Msg.getString("K007b")); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.D1")); //$NON-NLS-1$
         }
         dest.receive(oneByte);
     }

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PipedReader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PipedReader.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PipedReader.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PipedReader.java Sun Feb 14 08:40:42 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * Receives information on a communications pipe. When two threads want to pass
@@ -168,10 +168,10 @@
     void establishConnection() throws IOException {
         synchronized (lock) {
             if (data == null) {
-                throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
             }
             if (isConnected) {
-                throw new IOException(Msg.getString("K007a")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D0")); //$NON-NLS-1$
             }
             isConnected = true;
         }
@@ -234,10 +234,10 @@
     public int read(char[] buffer, int offset, int count) throws IOException {
         synchronized (lock) {
             if (!isConnected) {
-                throw new IOException(Msg.getString("K007b")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D1")); //$NON-NLS-1$
             }
             if (data == null) {
-                throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
             }
             // avoid int overflow
             if (offset < 0 || count > buffer.length - offset || count < 0) {
@@ -260,7 +260,7 @@
                         return -1;
                     }
                     if (!first && lastWriter != null && !lastWriter.isAlive()) {
-                        throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
+                        throw new IOException(Messages.getString("luni.CE")); //$NON-NLS-1$
                     }
                     first = false;
                     // Notify callers of receive()
@@ -330,10 +330,10 @@
     public boolean ready() throws IOException {
         synchronized (lock) {
             if (!isConnected) {
-                throw new IOException(Msg.getString("K007b")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D1")); //$NON-NLS-1$
             }
             if (data == null) {
-                throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
             }
             return in != -1;
         }
@@ -356,10 +356,10 @@
     void receive(char oneChar) throws IOException {
         synchronized (lock) {
             if (data == null) {
-                throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
             }
             if (lastReader != null && !lastReader.isAlive()) {
-                throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CE")); //$NON-NLS-1$
             }
             /*
              * Set the last thread to be writing on this PipedWriter. If
@@ -372,7 +372,7 @@
                     lock.notifyAll();
                     wait(1000);
                     if (lastReader != null && !lastReader.isAlive()) {
-                        throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
+                        throw new IOException(Messages.getString("luni.CE")); //$NON-NLS-1$
                     }
                 }
             } catch (InterruptedException e) {
@@ -412,10 +412,10 @@
     void receive(char[] chars, int offset, int count) throws IOException {
         synchronized (lock) {
             if (data == null) {
-                throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
             }
             if (lastReader != null && !lastReader.isAlive()) {
-                throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CE")); //$NON-NLS-1$
             }
             /**
              * Set the last thread to be writing on this PipedWriter. If
@@ -429,7 +429,7 @@
                         lock.notifyAll();
                         wait(1000);
                         if (lastReader != null && !lastReader.isAlive()) {
-                            throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
+                            throw new IOException(Messages.getString("luni.CE")); //$NON-NLS-1$
                         }
                     }
                 } catch (InterruptedException e) {
@@ -481,7 +481,7 @@
     void flush() throws IOException {
         synchronized (lock) {
             if (isClosed) {
-                throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
             }
             lock.notifyAll();
         }

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PipedWriter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PipedWriter.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PipedWriter.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PipedWriter.java Sun Feb 14 08:40:42 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * Places information on a communications pipe. When two threads want to pass
@@ -93,10 +93,10 @@
     public void connect(PipedReader stream) throws IOException {
         synchronized (lock) {
             if (this.dest != null) {
-                throw new IOException(Msg.getString("K0079")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.5F")); //$NON-NLS-1$
             }
             if (closed) {
-                throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
             }
             stream.establishConnection();
             this.dest = stream;
@@ -114,7 +114,7 @@
     public void flush() throws IOException {
         synchronized(lock) {
             if (closed) {
-                throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
             }
         }
     	
@@ -158,13 +158,13 @@
     public void write(char buffer[], int offset, int count) throws IOException {
         synchronized (lock) {
             if (closed) {
-                throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
             }
             if (dest == null) {
-                throw new IOException(Msg.getString("K007b")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D1")); //$NON-NLS-1$
             }
             if (buffer == null) {
-                throw new NullPointerException(Msg.getString("K0047")); //$NON-NLS-1$
+                throw new NullPointerException(Messages.getString("luni.11")); //$NON-NLS-1$
             }
 
             // avoid int overflow
@@ -200,10 +200,10 @@
     public void write(int c) throws IOException {
         synchronized (lock) {
             if (closed) {
-                throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
             }
             if (dest == null) {
-                throw new IOException(Msg.getString("K007b")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D1")); //$NON-NLS-1$
             }
             dest.receive((char) c);
         }

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PrintStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PrintStream.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PrintStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PrintStream.java Sun Feb 14 08:40:42 2010
@@ -24,7 +24,7 @@
 import java.util.IllegalFormatException;
 import java.util.Locale;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.luni.util.PriviAction;
 
 /**
@@ -333,7 +333,7 @@
      */
     public PrintStream format(Locale l, String format, Object... args) {
         if (format == null) {
-            throw new NullPointerException(Msg.getString("K0351")); //$NON-NLS-1$
+            throw new NullPointerException(Messages.getString("luni.D2")); //$NON-NLS-1$
         }
         new Formatter(this, l).format(format, args);
         return this;
@@ -676,12 +676,12 @@
     public void write(byte[] buffer, int offset, int length) {
         // Force buffer null check first!
         if (offset > buffer.length || offset < 0) {
-            // K002e=Offset out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset)); //$NON-NLS-1$
+            // luni.12=Offset out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.12", offset)); //$NON-NLS-1$
         }
         if (length < 0 || length > buffer.length - offset) {
-            // K0031=Length out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length)); //$NON-NLS-1$
+            // luni.18=Length out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.18", length)); //$NON-NLS-1$
         }
         synchronized (this) {
             if (out == null) {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PrintWriter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PrintWriter.java?rev=909986&r1=909985&r2=909986&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PrintWriter.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PrintWriter.java Sun Feb 14 08:40:42 2010
@@ -22,7 +22,7 @@
 import java.util.IllegalFormatException;
 import java.util.Locale;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.luni.util.PriviAction;
 
 /**
@@ -329,7 +329,7 @@
      */
     public PrintWriter format(Locale l, String format, Object... args) {
         if (format == null) {
-            throw new NullPointerException(Msg.getString("K0351")); //$NON-NLS-1$
+            throw new NullPointerException(Messages.getString("luni.D2")); //$NON-NLS-1$
         }
         new Formatter(this, l).format(format, args);
         if (autoflush) {



Mime
View raw message