You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2009/08/27 23:47:13 UTC

svn commit: r808651 - /directory/apacheds/branches/apacheds-schema/schema-loader/src/main/java/org/apache/directory/server/schema/loader/ldif/AttributeClassLoader.java

Author: akarasulu
Date: Thu Aug 27 21:47:12 2009
New Revision: 808651

URL: http://svn.apache.org/viewvc?rev=808651&view=rev
Log:
fixing use of server attribute to use entry attribute instead

Modified:
    directory/apacheds/branches/apacheds-schema/schema-loader/src/main/java/org/apache/directory/server/schema/loader/ldif/AttributeClassLoader.java

Modified: directory/apacheds/branches/apacheds-schema/schema-loader/src/main/java/org/apache/directory/server/schema/loader/ldif/AttributeClassLoader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/schema-loader/src/main/java/org/apache/directory/server/schema/loader/ldif/AttributeClassLoader.java?rev=808651&r1=808650&r2=808651&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/schema-loader/src/main/java/org/apache/directory/server/schema/loader/ldif/AttributeClassLoader.java (original)
+++ directory/apacheds/branches/apacheds-schema/schema-loader/src/main/java/org/apache/directory/server/schema/loader/ldif/AttributeClassLoader.java Thu Aug 27 21:47:12 2009
@@ -17,15 +17,12 @@
  *  under the License. 
  *  
  */
-
-
 package org.apache.directory.server.schema.loader.ldif;
 
 
 import javax.naming.NamingException;
 import javax.naming.directory.InvalidAttributeValueException;
 
-import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
 
@@ -38,7 +35,7 @@
  */
 public class AttributeClassLoader extends ClassLoader
 {
-    public ServerAttribute attribute;
+    public EntryAttribute attribute;
     
 
     public AttributeClassLoader()
@@ -49,12 +46,12 @@
     
     public void setAttribute( EntryAttribute attribute ) throws NamingException
     {
-        if ( ((ServerAttribute)attribute).getAttributeType().getSyntax().isHumanReadable() )
+        if ( attribute.isHR() )
         {
             throw new InvalidAttributeValueException( "The attribute must be binary" );
         }
         
-        this.attribute = (ServerAttribute)attribute;
+        this.attribute = attribute;
     }