directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1538376 - /directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/LdapResourceProvider.java
Date Sun, 03 Nov 2013 15:17:06 GMT
Author: kayyagari
Date: Sun Nov  3 15:17:05 2013
New Revision: 1538376

URL: http://svn.apache.org/r1538376
Log:
fixed a wrong cast

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

Modified: directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/LdapResourceProvider.java
URL: http://svn.apache.org/viewvc/directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/LdapResourceProvider.java?rev=1538376&r1=1538375&r2=1538376&view=diff
==============================================================================
--- directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/LdapResourceProvider.java
(original)
+++ directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/LdapResourceProvider.java
Sun Nov  3 15:17:05 2013
@@ -247,10 +247,12 @@ public class LdapResourceProvider implem
 //            throw new IllegalArgumentException( "No resource schema exists with the URI
" + schemaUri );
 //        }
         
-        SimpleType st = ( SimpleType ) schema.getAttribute( scimAtName );
+        BaseType bt = schema.getAttribute( scimAtName );
         
-        if ( st != null  )
+        if ( bt instanceof SimpleType  )
         {
+            SimpleType st = ( SimpleType ) bt;
+            
             if( Strings.isNotEmpty( st.getMappedTo() ) )
             {
                 return ldapSchema.getAttributeType( st.getMappedTo() );
@@ -270,7 +272,7 @@ public class LdapResourceProvider implem
                 return null;
             }
             
-            BaseType bt = schema.getAttribute( scimAtName.substring( 0, pos ) );
+            bt = schema.getAttribute( scimAtName.substring( 0, pos ) );
             
             if( bt == null )
             {



Mime
View raw message