commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1100117 - in /commons/sandbox/runtime/trunk/src/main: java/org/apache/commons/runtime/net/LocalSocketAddress.java native/shared/netaddr.c
Date Fri, 06 May 2011 07:38:33 GMT
Author: mturk
Date: Fri May  6 07:38:32 2011
New Revision: 1100117

URL: http://svn.apache.org/viewvc?rev=1100117&view=rev
Log:
Declare correct exceptions that are thrown

Modified:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/LocalSocketAddress.java
    commons/sandbox/runtime/trunk/src/main/native/shared/netaddr.c

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/LocalSocketAddress.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/LocalSocketAddress.java?rev=1100117&r1=1100116&r2=1100117&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/LocalSocketAddress.java
(original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/LocalSocketAddress.java
Fri May  6 07:38:32 2011
@@ -23,7 +23,6 @@ import java.net.SocketException;
 import java.net.UnknownHostException;
 import org.apache.commons.runtime.Memory;
 import org.apache.commons.runtime.Status;
-import org.apache.commons.runtime.SystemException;
 import org.apache.commons.runtime.InvalidArgumentException;
 
 /**
@@ -43,7 +42,7 @@ public final class LocalSocketAddress ex
      * Create a new local socket adrress.
      */
     public LocalSocketAddress(String name)
-        throws SystemException, InvalidArgumentException
+        throws NetworkException, InvalidArgumentException
     {
         super(name, AddressFamily.LOCAL);
     }
@@ -52,7 +51,7 @@ public final class LocalSocketAddress ex
      * Create a new local socket adrress.
      */
     public LocalSocketAddress(File path)
-        throws SystemException, InvalidArgumentException
+        throws NetworkException, InvalidArgumentException
     {
         super( path.getPath(), AddressFamily.LOCAL);
     }

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/netaddr.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/netaddr.c?rev=1100117&r1=1100116&r2=1100117&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/netaddr.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/netaddr.c Fri May  6 07:38:32 2011
@@ -940,6 +940,8 @@ ACR_NET_EXPORT(jint, SocketAddress, next
         case AF_INET6:
             return 2;
         case AF_LOCAL:
+            /* XXX: This can never happen (TM)
+             */
             return 3;
         default:
         break;



Mime
View raw message