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 2010/03/16 18:13:29 UTC
svn commit: r923877 - in /directory/apacheds/trunk/core/src:
main/java/org/apache/directory/server/core/
main/java/org/apache/directory/server/core/configuration/
main/java/org/apache/directory/server/core/journal/
test/java/org/apache/directory/server...
Author: kayyagari
Date: Tue Mar 16 17:13:28 2010
New Revision: 923877
URL: http://svn.apache.org/viewvc?rev=923877&view=rev
Log:
o fixed exceptions
o modified a method call in DefaultDirectoryService
o removed 'configuration' package (now obsolete)
Removed:
directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/
Modified:
directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournalStore.java
directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/changelog/MemoryChangeLogStoreTest.java
directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/prefs/PreferencesUtilsTest.java
directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=923877&r1=923876&r2=923877&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Tue Mar 16 17:13:28 2010
@@ -1507,8 +1507,7 @@ public class DefaultDirectoryService imp
continue;
}
- EntryAttribute attribute = AttributeUtils.toClientAttribute(
- LdifReader.parseAttributeValue( addedLine ) );
+ EntryAttribute attribute = LdifReader.parseAttributeValue( addedLine );
EntryAttribute oldAttribute = entry.get( attribute.getId() );
if ( oldAttribute != null )
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournalStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournalStore.java?rev=923877&r1=923876&r2=923877&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournalStore.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournalStore.java Tue Mar 16 17:13:28 2010
@@ -26,10 +26,9 @@ import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
-import javax.naming.NamingException;
-
import org.apache.directory.server.core.DirectoryService;
import org.apache.directory.server.core.LdapPrincipal;
+import org.apache.directory.shared.ldap.exception.LdapException;
import org.apache.directory.shared.ldap.ldif.LdifEntry;
import org.apache.directory.shared.ldap.ldif.LdifUtils;
@@ -124,7 +123,7 @@ public class DefaultJournalStore impleme
writer.write( LdifUtils.convertToLdif( forward, 80 ) );
writer.flush();
}
- catch ( NamingException ne )
+ catch ( LdapException ne )
{
return false;
}
Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/changelog/MemoryChangeLogStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/changelog/MemoryChangeLogStoreTest.java?rev=923877&r1=923876&r2=923877&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/changelog/MemoryChangeLogStoreTest.java (original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/changelog/MemoryChangeLogStoreTest.java Tue Mar 16 17:13:28 2010
@@ -20,6 +20,10 @@ package org.apache.directory.server.core
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
+
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -28,11 +32,10 @@ import java.io.ObjectOutputStream;
import java.util.HashMap;
import java.util.Map;
-import javax.naming.NamingException;
-
import org.apache.directory.server.core.LdapPrincipal;
import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.exception.LdapException;
import org.apache.directory.shared.ldap.ldif.ChangeType;
import org.apache.directory.shared.ldap.ldif.LdifEntry;
import org.apache.directory.shared.ldap.ldif.LdifRevertor;
@@ -44,9 +47,6 @@ import org.apache.directory.shared.ldap.
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertNull;
/**
@@ -110,7 +110,7 @@ public class MemoryChangeLogStoreTest
@Test
- public void testChangeLogSerialization() throws NamingException, IOException, ClassNotFoundException
+ public void testChangeLogSerialization() throws LdapException, IOException, ClassNotFoundException
{
DN systemDn = new DN( "ou=system" );
systemDn.normalize( oidsMap );
Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/prefs/PreferencesUtilsTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/prefs/PreferencesUtilsTest.java?rev=923877&r1=923876&r2=923877&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/prefs/PreferencesUtilsTest.java (original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/prefs/PreferencesUtilsTest.java Tue Mar 16 17:13:28 2010
@@ -20,15 +20,13 @@
package org.apache.directory.server.core.prefs;
-import javax.naming.NamingException;
+import static org.junit.Assert.assertEquals;
import org.apache.directory.server.constants.ServerDNConstants;
-import org.apache.directory.server.core.prefs.PreferencesUtils;
+import org.apache.directory.shared.ldap.exception.LdapException;
import org.apache.directory.shared.ldap.name.DN;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-
/**
* Test caseses for preference utility methods.
@@ -42,10 +40,10 @@ public class PreferencesUtilsTest
* Tests to confirm the toSysDn() method can translate an absolute
* preference node path into an LDAP distinguished name.
*
- * @throws NamingException if there are problems transforming the name
+ * @throws LdapException if there are problems transforming the name
*/
@Test
- public void testToSysDn() throws NamingException
+ public void testToSysDn() throws LdapException
{
// simple test
String expectedDN = "prefNodeName=kerberos,prefNodeName=apache,prefNodeName=org," +
Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java?rev=923877&r1=923876&r2=923877&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java (original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java Tue Mar 16 17:13:28 2010
@@ -29,14 +29,13 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import javax.naming.NamingException;
-
import org.apache.directory.server.core.entry.DefaultServerAttribute;
import org.apache.directory.server.core.entry.DefaultServerEntry;
import org.apache.directory.server.core.entry.ServerAttribute;
import org.apache.directory.server.core.entry.ServerEntry;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.entry.ModificationOperation;
+import org.apache.directory.shared.ldap.exception.LdapException;
import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.name.DN;
@@ -594,7 +593,7 @@ public class SchemaCheckerTest
class MockOidRegistry extends OidRegistry
{
- public String getOid( String name ) throws NamingException
+ public String getOid( String name ) throws LdapException
{
return StringTools.deepTrimToLower( name );
}
@@ -604,12 +603,12 @@ public class SchemaCheckerTest
return true;
}
- public String getPrimaryName( String oid ) throws NamingException
+ public String getPrimaryName( String oid ) throws LdapException
{
return oid;
}
- public List<String> getNameSet( String oid ) throws NamingException
+ public List<String> getNameSet( String oid ) throws LdapException
{
return Collections.singletonList( oid );
}
@@ -633,7 +632,7 @@ public class SchemaCheckerTest
return null;
}
- public void unregister( String numericOid ) throws NamingException
+ public void unregister( String numericOid ) throws LdapException
{
}
}
Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java?rev=923877&r1=923876&r2=923877&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java (original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java Tue Mar 16 17:13:28 2010
@@ -24,11 +24,10 @@ import static org.junit.Assert.assertFal
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import javax.naming.NamingException;
-
import org.apache.directory.server.core.entry.DefaultServerAttribute;
import org.apache.directory.server.core.entry.ServerAttribute;
import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
+import org.apache.directory.shared.ldap.exception.LdapException;
import org.apache.directory.shared.ldap.filter.EqualityNode;
import org.apache.directory.shared.ldap.filter.GreaterEqNode;
import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -131,7 +130,7 @@ public class RefinementLeafEvaluatorTest
assertFalse( evaluator.evaluate( new GreaterEqNode( "", new ClientStringValue( "" ) ), objectClasses ) );
fail( "should never get here due to an NE" );
}
- catch ( NamingException ne )
+ catch ( LdapException ne )
{
}
@@ -140,7 +139,7 @@ public class RefinementLeafEvaluatorTest
assertFalse( evaluator.evaluate( new EqualityNode( "", new ClientStringValue( "" ) ), objectClasses ) );
fail( "should never get here due to an NE" );
}
- catch ( NamingException ne )
+ catch ( LdapException ne )
{
}
@@ -159,7 +158,7 @@ public class RefinementLeafEvaluatorTest
assertFalse( evaluator.evaluate( new EqualityNode( "cn", new ClientStringValue( "" ) ), objectClasses ) );
fail( "should never get here due to an IAE" );
}
- catch ( NamingException ne )
+ catch ( LdapException ne )
{
assertTrue( true );
}