You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by gi...@apache.org on 2012/03/15 21:26:08 UTC
svn commit: r1301181 -
/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/ext/WSSUtils.java
Author: giger
Date: Thu Mar 15 20:26:08 2012
New Revision: 1301181
URL: http://svn.apache.org/viewvc?rev=1301181&view=rev
Log:
handle possible NPE correctly (resolves a todo)
Modified:
webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/ext/WSSUtils.java
Modified: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/ext/WSSUtils.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/ext/WSSUtils.java?rev=1301181&r1=1301180&r2=1301181&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/ext/WSSUtils.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/ext/WSSUtils.java Thu Mar 15 20:26:08 2012
@@ -378,8 +378,10 @@ public class WSSUtils extends XMLSecurit
}
public static boolean pathMatches(List<QName> path1, List<QName> path2, boolean matchAnySoapNS, boolean lastElementWildCard) {
- //todo remove these null checks! paths must not be null!
- if (path1 == null || path2 == null || path1.size() != path2.size()) {
+ if (path1 == null || path2 == null) {
+ throw new IllegalArgumentException("Internal error");
+ }
+ if (path1.size() != path2.size()) {
return false;
}
Iterator<QName> path1Iterator = path1.iterator();