directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1538251 - /directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/schema/ResourceSchema.java
Date Sat, 02 Nov 2013 18:49:37 GMT
Author: kayyagari
Date: Sat Nov  2 18:49:37 2013
New Revision: 1538251

URL: http://svn.apache.org/r1538251
Log:
o strip the URI part
o escape '.' when doing a regex match

Modified:
    directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/schema/ResourceSchema.java

Modified: directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/schema/ResourceSchema.java
URL: http://svn.apache.org/viewvc/directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/schema/ResourceSchema.java?rev=1538251&r1=1538250&r2=1538251&view=diff
==============================================================================
--- directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/schema/ResourceSchema.java
(original)
+++ directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/schema/ResourceSchema.java
Sat Nov  2 18:49:37 2013
@@ -80,9 +80,22 @@ public abstract class ResourceSchema
 
     public BaseType getAttribute( String name )
     {
+        if( name == null )
+        {
+            return null;
+        }
+        
+        name = name.trim();
+        
+        int colonPos = name.lastIndexOf( ":" );
+        if( colonPos > 0 )
+        {
+            name = name.substring( colonPos + 1 );
+        }
+
         if( name.contains( "." ) )
         {
-            String[] atPath = name.split( "." );
+            String[] atPath = name.split( "\\." );
             
             BaseType b = _findAtType( atPath[0] );
             



Mime
View raw message