directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject [directory-server] branch master updated: o Fixed replication to use the SyncInfoValue intermediateResponse instead of the control o Reflect the changes made in LDAP i18n class
Date Sat, 17 Mar 2018 05:56:36 GMT
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-server.git


The following commit(s) were added to refs/heads/master by this push:
     new 9e4c4ed  o Fixed replication to use the SyncInfoValue intermediateResponse instead
of the control o Reflect the changes made in LDAP i18n class
9e4c4ed is described below

commit 9e4c4ed5fe5e1388173d5a0d2fbf09cc8034936c
Author: Emmanuel L├ęcharny <elecharny@symas.com>
AuthorDate: Sat Mar 17 06:56:18 2018 +0100

    o Fixed replication to use the SyncInfoValue intermediateResponse
    instead of the control
    o Reflect the changes made in LDAP i18n class
---
 .../directory/server/core/api/filtering/CursorList.java      | 12 ++++++------
 core-jndi/pom.xml                                            |  2 +-
 .../org/apache/directory/server/core/jndi/ServerContext.java |  2 +-
 core-shared/pom.xml                                          |  2 +-
 .../server/core/schema/SchemaLdifToPartitionExtractor.java   |  6 +++---
 .../api/operations/search/ClientSearchRequestTest.java       | 12 ++++--------
 protocol-ldap/pom.xml                                        |  3 ++-
 .../ldap/replication/consumer/ReplicationConsumerImpl.java   |  2 +-
 .../ldap/replication/provider/SyncReplRequestHandler.java    |  4 ++--
 .../directory/server/operations/modify/ModifyReferralIT.java | 11 ++++-------
 .../directory/server/replication/MockSyncReplConsumer.java   |  2 +-
 .../server/core/partition/impl/btree/IndexCursorAdaptor.java |  8 ++++----
 12 files changed, 30 insertions(+), 36 deletions(-)

diff --git a/core-api/src/main/java/org/apache/directory/server/core/api/filtering/CursorList.java
b/core-api/src/main/java/org/apache/directory/server/core/api/filtering/CursorList.java
index f68149e..64cd93c 100644
--- a/core-api/src/main/java/org/apache/directory/server/core/api/filtering/CursorList.java
+++ b/core-api/src/main/java/org/apache/directory/server/core/api/filtering/CursorList.java
@@ -114,19 +114,19 @@ public class CursorList extends AbstractCursor<Entry> implements
EntryFilteringC
 
         if ( ( start < 0 ) || ( start > listSize ) )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_02005_START_INDEX_OUT_OF_RANGE,
start ) );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_13105_START_INDEX_OUT_OF_RANGE,
start ) );
         }
 
         if ( ( end < 0 ) || ( end > listSize ) )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_02006_END_INDEX_OUT_OF_RANGE,
end ) );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_13106_END_INDEX_OUT_OF_RANGE,
end ) );
         }
 
         // check list is not empty list since the empty list is the only situation
         // where we allow for start to equal the end: in other cases it makes no sense
         if ( ( listSize > 0 ) && ( start >= end ) )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_02007_START_INDEX_ABOVE_END_INDEX,
start, end ) );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_13107_START_INDEX_ABOVE_END_INDEX,
start, end ) );
         }
 
         this.start = start;
@@ -168,7 +168,7 @@ public class CursorList extends AbstractCursor<Entry> implements
EntryFilteringC
      */
     public void before( Entry element ) throws LdapException, CursorException
     {
-        throw new UnsupportedOperationException( I18n.err( I18n.ERR_02008_LIST_MAY_BE_SORTED
) );
+        throw new UnsupportedOperationException( I18n.err( I18n.ERR_13108_LIST_MAY_BE_SORTED
) );
     }
 
 
@@ -177,7 +177,7 @@ public class CursorList extends AbstractCursor<Entry> implements
EntryFilteringC
      */
     public void after( Entry element ) throws LdapException, CursorException
     {
-        throw new UnsupportedOperationException( I18n.err( I18n.ERR_02008_LIST_MAY_BE_SORTED
) );
+        throw new UnsupportedOperationException( I18n.err( I18n.ERR_13108_LIST_MAY_BE_SORTED
) );
     }
 
 
@@ -333,7 +333,7 @@ public class CursorList extends AbstractCursor<Entry> implements
EntryFilteringC
     {
         if ( ( index < start ) || ( index >= end ) )
         {
-            throw new CursorException( I18n.err( I18n.ERR_02009_CURSOR_NOT_POSITIONED ) );
+            throw new CursorException( I18n.err( I18n.ERR_13109_CURSOR_NOT_POSITIONED ) );
         }
 
         if ( currentCursor.available() )
diff --git a/core-jndi/pom.xml b/core-jndi/pom.xml
index a8ed9f6..0035276 100644
--- a/core-jndi/pom.xml
+++ b/core-jndi/pom.xml
@@ -148,9 +148,9 @@
                 org.apache.directory.api.ldap.extras.controls.ppolicy;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.extras.controls.ppolicy_impl;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.extras.controls.syncrepl.syncDone;version=${org.apache.directory.api.version},
-                org.apache.directory.api.ldap.extras.controls.syncrepl.syncInfoValue;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.extras.controls.syncrepl.syncState;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.extras.controls.syncrepl_impl;version=${org.apache.directory.api.version},
+                org.apache.directory.api.ldap.extras.intermediate.syncrepl;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.model.constants;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.model.cursor;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.model.entry;version=${org.apache.directory.api.version},
diff --git a/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
b/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
index 5aa4b44..76f6755 100644
--- a/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
+++ b/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
@@ -64,7 +64,7 @@ import org.apache.directory.api.ldap.extras.controls.syncrepl.syncState.SyncStat
 import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncDoneValueDecorator;
 import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncRequestValueDecorator;
 import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncStateValueDecorator;
-import org.apache.directory.api.ldap.extras.intermediate.syncrepl.syncInfoValue.SyncInfoValue;
+import org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValue;
 import org.apache.directory.api.ldap.model.constants.JndiPropertyConstants;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.cursor.EmptyCursor;
diff --git a/core-shared/pom.xml b/core-shared/pom.xml
index fba1a00..0068bdc 100644
--- a/core-shared/pom.xml
+++ b/core-shared/pom.xml
@@ -150,8 +150,8 @@
                 net.sf.ehcache;version=${ehcache.version},
                 org.apache.directory.api.ldap.codec.api;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.extras.controls.syncrepl.syncDone;version=${org.apache.directory.api.version},
-                org.apache.directory.api.ldap.extras.controls.syncrepl.syncInfoValue;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.extras.controls.syncrepl.syncState;version=${org.apache.directory.api.version},
+                org.apache.directory.api.ldap.extras.intermediate.syncrepl;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.model.constants;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.model.cursor;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.model.entry;version=${org.apache.directory.api.version},
diff --git a/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaLdifToPartitionExtractor.java
b/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaLdifToPartitionExtractor.java
index 8886368..748bbe6 100644
--- a/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaLdifToPartitionExtractor.java
+++ b/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaLdifToPartitionExtractor.java
@@ -182,7 +182,7 @@ public class SchemaLdifToPartitionExtractor implements SchemaLdifExtractor
 
         if ( !source.getParentFile().exists() )
         {
-            throw new FileNotFoundException( I18n.err( I18n.ERR_08002, source.getAbsolutePath()
) );
+            throw new FileNotFoundException( I18n.err( I18n.ERR_11003, source.getAbsolutePath()
) );
         }
 
         InputStream in = Files.newInputStream( source.toPath() );
@@ -245,7 +245,7 @@ public class SchemaLdifToPartitionExtractor implements SchemaLdifExtractor
                     else
                     {
                         // throw an exception : we should not have more than one entry per
schema ldif file
-                        String msg = I18n.err( I18n.ERR_08003, source );
+                        String msg = I18n.err( I18n.ERR_11003, source );
                         LOG.error( msg );
                         throw new InvalidObjectException( msg );
                     }
@@ -306,7 +306,7 @@ public class SchemaLdifToPartitionExtractor implements SchemaLdifExtractor
         }
         catch ( LdapException ne )
         {
-            String msg = I18n.err( I18n.ERR_08004, source, ne.getLocalizedMessage() );
+            String msg = I18n.err( I18n.ERR_11004, source, ne.getLocalizedMessage() );
             LOG.error( msg );
             throw new InvalidObjectException( msg );
         }
diff --git a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
index 3b4fd80..4555929 100644
--- a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
+++ b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
@@ -170,15 +170,11 @@ public class ClientSearchRequestTest extends AbstractLdapTestUnit
             "*", "+" );
         int count = 0;
     
-        if ( cursor.available() )
+        while ( cursor.next() )
         {
-            for ( Entry entry : cursor )
-            //while ( cursor.next() )
-            {
-                assertNotNull( entry );
-                count++;
-            }
-        } 
+            assertNotNull( cursor.get() );
+            count++;
+        }
     
         SearchResultDone done = cursor.getSearchResultDone();
     
diff --git a/protocol-ldap/pom.xml b/protocol-ldap/pom.xml
index 297584b..47042a4 100644
--- a/protocol-ldap/pom.xml
+++ b/protocol-ldap/pom.xml
@@ -220,7 +220,7 @@
                 org.apache.directory.api.ldap.extras.controls;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.extras.controls.ppolicy;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.extras.controls.syncrepl.syncDone;version=${org.apache.directory.api.version},
-                org.apache.directory.api.ldap.extras.controls.syncrepl.syncInfoValue;version=${org.apache.directory.api.version},
+                org.apache.directory.api.ldap.extras.controls.syncrepl.syncRequest;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.extras.controls.syncrepl.syncState;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.extras.controls.syncrepl_impl;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.extras.extended.certGeneration;version=${org.apache.directory.api.version},
@@ -230,6 +230,7 @@
                 org.apache.directory.api.ldap.extras.extended.startTls;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.extras.extended.storedProcedure;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.extras.extended.whoAmI;version=${org.apache.directory.api.version},
+                org.apache.directory.api.ldap.extras.intermediate.syncrepl;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.model.constants;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.model.csn;version=${org.apache.directory.api.version},
                 org.apache.directory.api.ldap.model.cursor;version=${org.apache.directory.api.version},
diff --git a/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java
b/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java
index d3e702b..605dd0b 100644
--- a/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java
+++ b/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java
@@ -34,8 +34,8 @@ import org.apache.directory.api.ldap.extras.controls.syncrepl.syncRequest.SyncRe
 import org.apache.directory.api.ldap.extras.controls.syncrepl.syncState.SyncStateTypeEnum;
 import org.apache.directory.api.ldap.extras.controls.syncrepl.syncState.SyncStateValue;
 import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncRequestValueDecorator;
+import org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValue;
 import org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValueDecorator;
-import org.apache.directory.api.ldap.extras.intermediate.syncrepl.syncInfoValue.SyncInfoValue;
 import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.csn.Csn;
diff --git a/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java
b/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java
index 3343a70..8bcb0ec 100644
--- a/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java
+++ b/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java
@@ -45,9 +45,9 @@ import org.apache.directory.api.ldap.extras.controls.syncrepl.syncState.SyncStat
 import org.apache.directory.api.ldap.extras.controls.syncrepl.syncState.SyncStateValue;
 import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncDoneValueDecorator;
 import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncStateValueDecorator;
+import org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValue;
 import org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValueDecorator;
-import org.apache.directory.api.ldap.extras.intermediate.syncrepl.syncInfoValue.SyncInfoValue;
-import org.apache.directory.api.ldap.extras.intermediate.syncrepl.syncInfoValue.SynchronizationInfoEnum;
+import org.apache.directory.api.ldap.extras.intermediate.syncrepl.SynchronizationInfoEnum;
 import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.cursor.Cursor;
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReferralIT.java
b/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReferralIT.java
index 08998b7..45cf5f0 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReferralIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReferralIT.java
@@ -23,6 +23,8 @@ package org.apache.directory.server.operations.modify;
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredConnection;
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContextThrowOnRefferal;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 import javax.naming.ReferralException;
@@ -32,7 +34,6 @@ import javax.naming.directory.DirContext;
 import javax.naming.directory.ModificationItem;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.api.ldap.model.entry.Entry;
 import org.apache.directory.api.ldap.model.message.Control;
 import org.apache.directory.api.ldap.model.message.ModifyRequest;
 import org.apache.directory.api.ldap.model.message.ModifyRequestImpl;
@@ -135,13 +136,9 @@ public class ModifyReferralIT extends AbstractLdapTestUnit
 
         assertTrue( conn.compare( "uid=akarasuluref,ou=users,ou=system", "description", "referral
to akarasulu" ) );
         
-        Entry result = conn.lookup( target, new Control[] {manageDSAIT}, "*" );
+        assertNotNull( conn.lookup( target, new Control[] {manageDSAIT}, "*" ) );
         
-        System.out.println( result );
-
-        result = conn.lookup( target, new Control[] {}, "*" );
-        
-        System.out.println( result );
+        assertNull( conn.lookup( target, new Control[] {}, "*" ) );
 
         conn.close();
     }
diff --git a/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java
b/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java
index 8e49e27..17878f3 100644
--- a/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java
+++ b/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java
@@ -41,8 +41,8 @@ import org.apache.directory.api.ldap.extras.controls.syncrepl.syncRequest.SyncRe
 import org.apache.directory.api.ldap.extras.controls.syncrepl.syncState.SyncStateTypeEnum;
 import org.apache.directory.api.ldap.extras.controls.syncrepl.syncState.SyncStateValue;
 import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncRequestValueDecorator;
+import org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValue;
 import org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValueDecorator;
-import org.apache.directory.api.ldap.extras.intermediate.syncrepl.syncInfoValue.SyncInfoValue;
 import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.cursor.EntryCursor;
diff --git a/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java
b/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java
index 95dda51..4e362b4 100644
--- a/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java
+++ b/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java
@@ -228,7 +228,7 @@ public class IndexCursorAdaptor<K> extends AbstractIndexCursor<K>
      */
     public boolean isAfterLast()
     {
-        throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
+        throw new UnsupportedOperationException( I18n.err( I18n.ERR_13102_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "isAfterLast()" ) ) );
     }
 
@@ -238,7 +238,7 @@ public class IndexCursorAdaptor<K> extends AbstractIndexCursor<K>
      */
     public boolean isBeforeFirst()
     {
-        throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
+        throw new UnsupportedOperationException( I18n.err( I18n.ERR_13102_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "isBeforeFirst()" ) ) );
     }
 
@@ -248,7 +248,7 @@ public class IndexCursorAdaptor<K> extends AbstractIndexCursor<K>
      */
     public boolean isFirst()
     {
-        throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
+        throw new UnsupportedOperationException( I18n.err( I18n.ERR_13102_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "isFirst()" ) ) );
     }
 
@@ -258,7 +258,7 @@ public class IndexCursorAdaptor<K> extends AbstractIndexCursor<K>
      */
     public boolean isLast()
     {
-        throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
+        throw new UnsupportedOperationException( I18n.err( I18n.ERR_13102_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "isLast()" ) ) );
     }
 

-- 
To stop receiving notification emails like this one, please contact
elecharny@apache.org.

Mime
View raw message