summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--javax/rmi/ssl/SslRMIClientSocketFactory.java10
2 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 00b34fe17..ddfd2c61b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-12-31 Andrew John Hughes <gnu_andrew@member.fsf.org>
+
+ PR classpath/34582:
+ * javax/rmi/ssl/SslRMIClientSocketFactory.java:
+ (getProp(String)): Check for the property being null.
+
2007-12-28 Dalibor Topic <robilad@kaffe.org>
* configure.ac (AC_CHECK_HEADERS): Check for
diff --git a/javax/rmi/ssl/SslRMIClientSocketFactory.java b/javax/rmi/ssl/SslRMIClientSocketFactory.java
index 1fed5824c..3a4c6cebe 100644
--- a/javax/rmi/ssl/SslRMIClientSocketFactory.java
+++ b/javax/rmi/ssl/SslRMIClientSocketFactory.java
@@ -50,7 +50,7 @@ import java.rmi.server.RMIClientSocketFactory;
* 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;