You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2017/02/27 12:57:59 UTC
cxf git commit: Fixing NPE
Repository: cxf
Updated Branches:
refs/heads/3.0.x-fixes bf83c0ee1 -> 853e4d291
Fixing NPE
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/853e4d29
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/853e4d29
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/853e4d29
Branch: refs/heads/3.0.x-fixes
Commit: 853e4d2915b5b7a5e439715bc9ee15c069996008
Parents: bf83c0e
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Mon Feb 27 12:57:52 2017 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Mon Feb 27 12:57:52 2017 +0000
----------------------------------------------------------------------
.../security/wss4j/CryptoCoverageChecker.java | 58 ++++++++++----------
1 file changed, 30 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/853e4d29/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/CryptoCoverageChecker.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/CryptoCoverageChecker.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/CryptoCoverageChecker.java
index b5a0d97..9c7154a 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/CryptoCoverageChecker.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/CryptoCoverageChecker.java
@@ -138,37 +138,39 @@ public class CryptoCoverageChecker extends AbstractSoapInterceptor {
List<WSHandlerResult> results = CastUtils.cast(
(List<?>) message.get(WSHandlerConstants.RECV_RESULTS));
- for (final WSHandlerResult wshr : results) {
- final List<WSSecurityEngineResult> wsSecurityEngineSignResults =
- WSSecurityUtil.fetchAllActionResults(wshr.getResults(), WSConstants.SIGN);
-
- final List<WSSecurityEngineResult> wsSecurityEngineEncResults =
- WSSecurityUtil.fetchAllActionResults(wshr.getResults(), WSConstants.ENCR);
-
- for (WSSecurityEngineResult wser : wsSecurityEngineSignResults) {
-
- List<WSDataRef> sl = CastUtils.cast((List<?>) wser
- .get(WSSecurityEngineResult.TAG_DATA_REF_URIS));
- if (sl != null) {
- if (sl.size() == 1
- && sl.get(0).getName().equals(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN))) {
- //endorsing the signature so don't include
- break;
- }
-
- for (WSDataRef r : sl) {
- signed.add(r);
+ if (results != null) {
+ for (final WSHandlerResult wshr : results) {
+ final List<WSSecurityEngineResult> wsSecurityEngineSignResults =
+ WSSecurityUtil.fetchAllActionResults(wshr.getResults(), WSConstants.SIGN);
+
+ final List<WSSecurityEngineResult> wsSecurityEngineEncResults =
+ WSSecurityUtil.fetchAllActionResults(wshr.getResults(), WSConstants.ENCR);
+
+ for (WSSecurityEngineResult wser : wsSecurityEngineSignResults) {
+
+ List<WSDataRef> sl = CastUtils.cast((List<?>) wser
+ .get(WSSecurityEngineResult.TAG_DATA_REF_URIS));
+ if (sl != null) {
+ if (sl.size() == 1
+ && sl.get(0).getName().equals(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN))) {
+ //endorsing the signature so don't include
+ break;
+ }
+
+ for (WSDataRef r : sl) {
+ signed.add(r);
+ }
}
}
- }
-
- for (WSSecurityEngineResult wser : wsSecurityEngineEncResults) {
- List<WSDataRef> el = CastUtils.cast((List<?>) wser
- .get(WSSecurityEngineResult.TAG_DATA_REF_URIS));
+
+ for (WSSecurityEngineResult wser : wsSecurityEngineEncResults) {
+ List<WSDataRef> el = CastUtils.cast((List<?>) wser
+ .get(WSSecurityEngineResult.TAG_DATA_REF_URIS));
- if (el != null) {
- for (WSDataRef r : el) {
- encrypted.add(r);
+ if (el != null) {
+ for (WSDataRef r : el) {
+ encrypted.add(r);
+ }
}
}
}