Author: lquack
Date: Mon Feb 15 18:05:11 2016
New Revision: 1730585
URL: http://svn.apache.org/viewvc?rev=1730585&view=rev
Log:
QPID-7056: [Java Broker] From SSLUtil#tryGetSSLContext throw
NoSuchAlgorithmException instead of RuntimeException to match the behaviour of
SSLContext.getInstance()
Modified:
qpid/java/trunk/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java
Modified:
qpid/java/trunk/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java
URL:
http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java?rev=1730585&r1=1730584&r2=1730585&view=diff
==============================================================================
---
qpid/java/trunk/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java
(original)
+++
qpid/java/trunk/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java
Mon Feb 15 18:05:11 2016
@@ -582,12 +582,12 @@ public class SSLUtil
return filteredList.toArray(new String[filteredList.size()]);
}
- public static SSLContext tryGetSSLContext()
+ public static SSLContext tryGetSSLContext() throws NoSuchAlgorithmException
{
return tryGetSSLContext(TLS_PROTOCOL_PREFERENCES);
}
- public static SSLContext tryGetSSLContext(final String[] protocols)
+ public static SSLContext tryGetSSLContext(final String[] protocols) throws
NoSuchAlgorithmException
{
for (String protocol : protocols)
{
@@ -600,7 +600,7 @@ public class SSLUtil
// pass and try the next protocol in the list
}
}
- throw new RuntimeException(String.format("Could not create SSLContext
with one of the requested protocols: %s",
- Arrays.toString(protocols)));
+ throw new NoSuchAlgorithmException(String.format("Could not create
SSLContext with one of the requested protocols: %s",
+
Arrays.toString(protocols)));
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]