Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 99915 invoked from network); 11 Feb 2010 21:26:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Feb 2010 21:26:03 -0000 Received: (qmail 27296 invoked by uid 500); 11 Feb 2010 21:26:03 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 27249 invoked by uid 500); 11 Feb 2010 21:26:03 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 27240 invoked by uid 99); 11 Feb 2010 21:26:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Feb 2010 21:26:03 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Feb 2010 21:26:02 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id DD0232388A23; Thu, 11 Feb 2010 21:25:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@harmony.apache.org From: hindessm@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100211212541.DD0232388A23@eris.apache.org> 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