cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/8] git commit: Avoid NPE if no claims
Date Wed, 01 Oct 2014 07:52:34 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 85f7dda77 -> 4373b960b


Avoid NPE if no claims


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

Branch: refs/heads/master
Commit: d01083531828754185749035b9e7d9b21a90afda
Parents: 85f7dda
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Sep 29 14:24:00 2014 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Sep 29 14:24:00 2014 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/fediz/core/config/Protocol.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/d0108353/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/Protocol.java
----------------------------------------------------------------------
diff --git a/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/Protocol.java b/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/Protocol.java
index 803e228..6900891 100644
--- a/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/Protocol.java
+++ b/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/Protocol.java
@@ -189,8 +189,10 @@ public abstract class Protocol {
     public List<Claim> getClaimTypesRequested() {
         ClaimTypesRequested claimsRequested = getProtocolType().getClaimTypesRequested();
         List<Claim> claims = new ArrayList<Claim>();
-        for (ClaimType c : claimsRequested.getClaimType()) {
-            claims.add(new Claim(c));
+        if (claimsRequested != null) {
+            for (ClaimType c : claimsRequested.getClaimType()) {
+                claims.add(new Claim(c));
+            }
         }
         return claims;
     }


Mime
View raw message