From 88157a932969306c7d0a9c5ad6270a6160d95dd7 Mon Sep 17 00:00:00 2001 From: wassa Date: Thu, 10 Oct 2002 19:57:27 +0000 Subject: [PATCH] If the responder cannot find an attribute class, it now responds with the attributes that are loaded successfully and logs the error, instead of failing. git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@316 ab3bd59b-922f-494d-bb5f-6f0a3c29deca --- src/edu/internet2/middleware/shibboleth/aa/AAResponder.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/edu/internet2/middleware/shibboleth/aa/AAResponder.java b/src/edu/internet2/middleware/shibboleth/aa/AAResponder.java index e510e03..6dec271 100755 --- a/src/edu/internet2/middleware/shibboleth/aa/AAResponder.java +++ b/src/edu/internet2/middleware/shibboleth/aa/AAResponder.java @@ -140,7 +140,9 @@ public class AAResponder{ Attribute dAttr = aAttr.getDirAttribute(userCtx, true); if(dAttr != null){ SAMLAttribute sAttr = jndi2saml(dAttr); - sAttrs.add(sAttr); + if (sAttr != null) { + sAttrs.add(sAttr); + } } } SAMLAttribute[] sa = new SAMLAttribute[sAttrs.size()]; @@ -314,7 +316,7 @@ public class AAResponder{ return sa.toSamlAttribute(this.domain, vals.toArray()); } catch (Exception e) { log.error("Failed to load the class for attribute (" + jAttr.getID() + ") :" + e); - throw new AAException("Failed to load the class for attribute (" + jAttr.getID() + ") :" + e); + return null; } } -- 1.7.10.4