summaryrefslogtreecommitdiff
path: root/javax
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2007-12-31 04:29:31 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2007-12-31 04:29:31 +0000
commit337798a681657a2799376f09d429b3f5baf32fc2 (patch)
tree6c8e82fc58b4e317e19cce36092194009da5867d /javax
parent43bdb5d55c757aa9f422a4f0dad5f5304dd4c86e (diff)
downloadclasspath-337798a681657a2799376f09d429b3f5baf32fc2.tar.gz
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.
Diffstat (limited to 'javax')
-rw-r--r--javax/rmi/ssl/SslRMIClientSocketFactory.java10
1 files changed, 6 insertions, 4 deletions
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;