camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject camel git commit: NPE guard
Date Wed, 26 Nov 2014 11:23:54 GMT
Repository: camel
Updated Branches:
  refs/heads/master 9ad9c0525 -> e409033d7


NPE guard


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e409033d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e409033d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e409033d

Branch: refs/heads/master
Commit: e409033d71caf98b612508c5614af8535128aadc
Parents: 9ad9c05
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Wed Nov 26 11:23:44 2014 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Wed Nov 26 11:23:44 2014 +0000

----------------------------------------------------------------------
 .../component/xmlsecurity/processor/XmlSignerProcessor.java     | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e409033d/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignerProcessor.java
----------------------------------------------------------------------
diff --git a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignerProcessor.java
b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignerProcessor.java
index 5e5b7ee..eb1e4a7 100644
--- a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignerProcessor.java
+++ b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignerProcessor.java
@@ -246,6 +246,11 @@ public class XmlSignerProcessor extends XmlSignatureProcessor {
 
             final Node node = getMessageBodyNode(out);
 
+            if (getConfiguration().getKeyAccessor() == null) {
+                throw new XmlSignatureNoKeyException(
+                    "Key selector is missing for XML signature generation. Specify a key
selector in the configuration.");
+            }
+            
             final KeySelector keySelector = getConfiguration().getKeyAccessor().getKeySelector(out);
             if (keySelector == null) {
                 throw new XmlSignatureNoKeyException(


Mime
View raw message