Fix to null checking.
authorcantor <cantor@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 17 Jun 2002 20:45:50 +0000 (20:45 +0000)
committercantor <cantor@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 17 Jun 2002 20:45:50 +0000 (20:45 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@139 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/eduPerson/ScopedAttribute.java

index ced4da0..3736161 100755 (executable)
@@ -144,7 +144,9 @@ public class ScopedAttribute extends SAMLAttribute
         for (int i = 0; i < nlist.getLength(); i++)
         {
             ((Element)nlist.item(i)).removeAttributeNS(null, "Scope");
-            String scope=(i<scopes.size() ? scopes.get(i).toString() : null);
+            String scope=null;
+            if (i<scopes.size() && scopes.get(i)!=null)
+                scope=scopes.get(i).toString();
             if (scope != null && scope.length()>0 && !scope.equals(defaultScope))
                 ((Element)nlist.item(i)).setAttributeNS(null, "Scope", scope);
         }