harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r909153 - in /harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal: SocketChannelImpl.java nls/messages.properties
Date Thu, 11 Feb 2010 21:25:41 GMT
Author: hindessm
Date: Thu Feb 11 21:25:39 2010
New Revision: 909153

URL: http://svn.apache.org/viewvc?rev=909153&view=rev
Log:
Refactor nls message handling to remove dependency on old luni classes.

Modified:
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/SocketChannelImpl.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/nls/messages.properties

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/SocketChannelImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/SocketChannelImpl.java?rev=909153&r1=909152&r2=909153&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/SocketChannelImpl.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/SocketChannelImpl.java
Thu Feb 11 21:25:39 2010
@@ -47,7 +47,7 @@
 import org.apache.harmony.luni.platform.INetworkSystem;
 import org.apache.harmony.luni.platform.Platform;
 import org.apache.harmony.luni.util.ErrorCodeException;
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.nio.internal.nls.Messages;
 import org.apache.harmony.nio.AddressUtil;
 import org.apache.harmony.nio.internal.nls.Messages;
 
@@ -910,7 +910,7 @@
                 throws SocketException {
             checkOpen();
             if (size < 1) {
-                throw new IllegalArgumentException(Msg.getString("K0035")); //$NON-NLS-1$
+                throw new IllegalArgumentException(Messages.getString("nio.0E")); //$NON-NLS-1$
             }
             socketImpl
                     .setOption(SocketOptions.SO_RCVBUF, Integer.valueOf(size));
@@ -927,7 +927,7 @@
         public synchronized void setSendBufferSize(int size) throws SocketException {
             checkOpen();
             if (size < 1) {
-                throw new IllegalArgumentException(Msg.getString("K0035")); //$NON-NLS-1$
+                throw new IllegalArgumentException(Messages.getString("nio.0E")); //$NON-NLS-1$
             }
             socketImpl.setOption(SocketOptions.SO_SNDBUF, Integer.valueOf(size));
         }
@@ -936,7 +936,7 @@
         public void setSoLinger(boolean on, int timeout) throws SocketException {
             checkOpen();
             if (on && timeout < 0) {
-                throw new IllegalArgumentException(Msg.getString("K0045")); //$NON-NLS-1$
+                throw new IllegalArgumentException(Messages.getString("nio.0F")); //$NON-NLS-1$
             }
             int val = on ? (65535 < timeout ? 65535 : timeout) : -1;
             socketImpl.setOption(SocketOptions.SO_LINGER, Integer.valueOf(val));
@@ -946,7 +946,7 @@
         public synchronized void setSoTimeout(int timeout) throws SocketException {
             checkOpen();
             if (timeout < 0) {
-                throw new IllegalArgumentException(Msg.getString("K0036")); //$NON-NLS-1$
+                throw new IllegalArgumentException(Messages.getString("nio.10")); //$NON-NLS-1$
             }
             socketImpl.setOption(SocketOptions.SO_TIMEOUT, Integer.valueOf(timeout));
         }

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/nls/messages.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/nls/messages.properties?rev=909153&r1=909152&r2=909153&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/nls/messages.properties
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/nls/messages.properties
Thu Feb 11 21:25:39 2010
@@ -28,3 +28,6 @@
 nio.0B=New position must be non-negative.
 nio.0C=Offset out of bounds \: {0}
 nio.0D=Length out of bounds \: {0}
+nio.0E=Zero or negative buffer size
+nio.0F=Attempted to set a negative SoLinger
+nio.10=Invalid negative timeout



Mime
View raw message