----- Forwarded message from  -----

To: [email protected]
Subject: FYI: Fix for PR34582

This fixes the bug shown in PR34582 where the SSL RMI
client socket factory can not be initialized due to a
null pointer exception.

Changelog:

2007-12-31  Andrew John Hughes  <[EMAIL PROTECTED]>

        PR classpath/34582:
        * javax/rmi/ssl/SslRMIClientSocketFactory.java:
        (getProp(String)): Check for the property being null.

-- 
Andrew :-)

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }

Index: javax/rmi/ssl/SslRMIClientSocketFactory.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/rmi/ssl/SslRMIClientSocketFactory.java,v
retrieving revision 1.2
diff -u -3 -p -u -r1.2 SslRMIClientSocketFactory.java
--- javax/rmi/ssl/SslRMIClientSocketFactory.java        16 Jul 2006 20:18:05 
-0000      1.2
+++ javax/rmi/ssl/SslRMIClientSocketFactory.java        31 Dec 2007 04:26:47 
-0000
@@ -50,7 +50,7 @@ import java.rmi.server.RMIClientSocketFa
  * SslRMIClientSocketFactory
  *
  * This class implements an RMIClientSocketFactory for SSL sockets.
- * it uses the defeult SSLClientSocketFactory.
+ * it uses the default SSLClientSocketFactory.
  *
  * This class can optionally use the following system properties, if set: 
  * <code>javax.rmi.ssl.client.enabledCipherSuites</code>
@@ -92,17 +92,19 @@ public class SslRMIClientSocketFactory 
 
   private String[] getProp(String p)
   {
-    StringTokenizer st;
+    String o;
     try
       {
-       String o = (String)System.getProperty( p );
-       st = new StringTokenizer( o, "," );
+       o = System.getProperty(p);
       }
     catch(SecurityException se)
       {
        return null;
       }
 
+    if (o == null)
+      return null;
+    StringTokenizer st = new StringTokenizer( o, "," );
     int n = st.countTokens();
     if( n < 1 )
       return null;




----- End forwarded message -----

-- 
Andrew :-)

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }

Attachment: signature.asc
Description: Digital signature

Reply via email to