You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by co...@apache.org on 2011/10/07 11:55:21 UTC
svn commit: r1179985 -
/santuario/xml-security-java/branches/1.4.x-fixes/src/org/apache/xml/security/algorithms/JCEMapper.java
Author: coheigea
Date: Fri Oct 7 09:55:21 2011
New Revision: 1179985
URL: http://svn.apache.org/viewvc?rev=1179985&view=rev
Log:
Fix for a NPE in JCEMapper
Modified:
santuario/xml-security-java/branches/1.4.x-fixes/src/org/apache/xml/security/algorithms/JCEMapper.java
Modified: santuario/xml-security-java/branches/1.4.x-fixes/src/org/apache/xml/security/algorithms/JCEMapper.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/branches/1.4.x-fixes/src/org/apache/xml/security/algorithms/JCEMapper.java?rev=1179985&r1=1179984&r2=1179985&view=diff
==============================================================================
--- santuario/xml-security-java/branches/1.4.x-fixes/src/org/apache/xml/security/algorithms/JCEMapper.java (original)
+++ santuario/xml-security-java/branches/1.4.x-fixes/src/org/apache/xml/security/algorithms/JCEMapper.java Fri Oct 7 09:55:21 2011
@@ -123,9 +123,11 @@ public class JCEMapper {
*
*/
public static String getJCEKeyAlgorithmFromURI(String AlgorithmURI) {
-
- return ((Algorithm) algorithmsMap.get(AlgorithmURI)).requiredKey;
-
+ Algorithm algorithm = (Algorithm) algorithmsMap.get(AlgorithmURI);
+ if (algorithm != null) {
+ return algorithm.requiredKey;
+ }
+ return null;
}
/**