Fix up simple attribute definition to automatically map from new standard format...
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 10 Jun 2003 19:39:04 +0000 (19:39 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 10 Jun 2003 19:39:04 +0000 (19:39 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@617 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/aa/attrresolv/provider/SimpleAttributeDefinition.java

index bc18e0a..32ddcf2 100644 (file)
@@ -93,7 +93,14 @@ public class SimpleAttributeDefinition extends BaseAttributeDefinition implement
 
                String sourceName = e.getAttribute("sourceName");
                if (sourceName == null || sourceName.equals("")) {
-                       connectorMapping = getId().substring(getId().lastIndexOf(":") + 1);
+                       int index = getId().lastIndexOf("#");
+                       if (index < 0) {
+                               index = getId().lastIndexOf(":");
+                       }
+                       if (index < 0) {
+                               index = getId().lastIndexOf("/");
+                       }
+                       connectorMapping = getId().substring(index + 1);
                } else {
                        connectorMapping = sourceName;
                }