You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ka...@apache.org on 2013/11/02 19:49:37 UTC
svn commit: r1538251 -
/directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/schema/ResourceSchema.java
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] );