You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2016/05/30 13:05:23 UTC
svn commit: r1746124 - in /directory/shared/branches/shared-value:
integ-osgi/src/test/java/org/apache/directory/api/osgi/
integ/src/test/java/org/apache/directory/api/ldap/model/name/
ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/...
Author: elecharny
Date: Mon May 30 13:05:22 2016
New Revision: 1746124
URL: http://svn.apache.org/viewvc?rev=1746124&view=rev
Log:
Merged the changes made in trunk into the branch
Added:
directory/shared/branches/shared-value/integ/src/test/java/org/apache/directory/api/ldap/model/name/FastParserRdnTest.java
directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/LdapConnectionTimeOutException.java
directory/shared/branches/shared-value/ldap/model/src/test/java/org/apache/directory/api/ldap/model/name/FastRdnParserTest.java
Modified:
directory/shared/branches/shared-value/integ-osgi/src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasCodecApiOsgiTest.java
directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
directory/shared/branches/shared-value/ldap/client/api/src/test/java/org/apache/directory/ldap/client/api/LdapNetworkConnectionTest.java
directory/shared/branches/shared-value/ldap/extras/codec-api/pom.xml
directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyImpl.java
directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyResponseImpl.java
directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv/VirtualListViewResultCode.java
directory/shared/branches/shared-value/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/permissiveModify_impl/PermissiveModifyDecorator.java
directory/shared/branches/shared-value/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/permissiveModify_impl/PermissiveModifyFactory.java
directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Rdn.java
directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/IntegerComparator.java
directory/shared/branches/shared-value/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/SingleLdifSchemaLoader.java
Modified: directory/shared/branches/shared-value/integ-osgi/src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasCodecApiOsgiTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/integ-osgi/src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasCodecApiOsgiTest.java?rev=1746124&r1=1746123&r2=1746124&view=diff
==============================================================================
--- directory/shared/branches/shared-value/integ-osgi/src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasCodecApiOsgiTest.java (original)
+++ directory/shared/branches/shared-value/integ-osgi/src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasCodecApiOsgiTest.java Mon May 30 13:05:22 2016
@@ -22,9 +22,13 @@ package org.apache.directory.api.osgi;
import org.apache.directory.api.ldap.extras.controls.SynchronizationModeEnum;
import org.apache.directory.api.ldap.extras.controls.ad.AdDirSyncImpl;
+import org.apache.directory.api.ldap.extras.controls.changeNotifications.ChangeNotificationsImpl;
+import org.apache.directory.api.ldap.extras.controls.permissiveModify.PermissiveModifyImpl;
import org.apache.directory.api.ldap.extras.controls.ppolicy.PasswordPolicyImpl;
import org.apache.directory.api.ldap.extras.controls.syncrepl.syncInfoValue.SyncInfoValueImpl;
import org.apache.directory.api.ldap.extras.controls.syncrepl.syncState.SyncStateValueImpl;
+import org.apache.directory.api.ldap.extras.controls.vlv.VirtualListViewRequestImpl;
+import org.apache.directory.api.ldap.extras.controls.vlv.VirtualListViewResponseImpl;
import org.apache.directory.api.ldap.extras.extended.pwdModify.PasswordModifyRequestImpl;
import org.apache.directory.api.ldap.extras.extended.pwdModify.PasswordModifyResponseImpl;
import org.apache.directory.api.ldap.extras.extended.startTls.StartTlsRequestImpl;
@@ -49,9 +53,13 @@ public class ApiLdapExtrasCodecApiOsgiTe
{
SynchronizationModeEnum.REFRESH_AND_PERSIST.getValue();
new AdDirSyncImpl().getOid();
+ new ChangeNotificationsImpl().getOid();
+ new PermissiveModifyImpl().getOid();
new PasswordPolicyImpl().getOid();
new SyncStateValueImpl( true ).getCookie();
new SyncInfoValueImpl().getType();
+ new VirtualListViewRequestImpl().getOid();
+ new VirtualListViewResponseImpl().getOid();
new PasswordModifyRequestImpl().getUserIdentity();
new PasswordModifyResponseImpl( 5 ).setResponseName( "foo" );
new WhoAmIRequestImpl();
Added: directory/shared/branches/shared-value/integ/src/test/java/org/apache/directory/api/ldap/model/name/FastParserRdnTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/integ/src/test/java/org/apache/directory/api/ldap/model/name/FastParserRdnTest.java?rev=1746124&view=auto
==============================================================================
--- directory/shared/branches/shared-value/integ/src/test/java/org/apache/directory/api/ldap/model/name/FastParserRdnTest.java (added)
+++ directory/shared/branches/shared-value/integ/src/test/java/org/apache/directory/api/ldap/model/name/FastParserRdnTest.java Mon May 30 13:05:22 2016
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.api.ldap.model.name;
+
+import org.apache.directory.api.ldap.model.exception.LdapException;
+import org.apache.directory.api.ldap.model.schema.SchemaManager;
+import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.assertEquals;
+
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
+/**
+ * Tests for the schemaAware Rdn class when using teh FastParser
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrency()
+public class FastParserRdnTest
+{
+ private static SchemaManager schemaManager;
+
+
+ @BeforeClass
+ public static void setup() throws Exception
+ {
+ schemaManager = new DefaultSchemaManager();
+ }
+
+
+ @Test
+ public void testSimpleRdnValueSchemaAware() throws LdapException
+ {
+ String errors = null;
+
+ Rdn rdn = new Rdn( schemaManager, "CommonName = TEST " );
+
+ if ( !"CommonName = TEST ".equals( rdn.getName() ) )
+ {
+ errors += "\nRdn.getName fails '" + rdn.getName() + "'";
+ }
+
+ if ( !"2.5.4.3= test ".equals( rdn.getNormName() ) )
+ {
+ errors = "\nRdn.getNormName fails '" + rdn.getNormName() + "'";
+ }
+
+ if ( !"TEST".equals( rdn.getValue( "cn" ) ) )
+ {
+ errors += "\nRdn.getNormValue( 'cn' ) fails '" + ( String ) rdn.getValue( "cn" ) + "'";
+ }
+
+ assertEquals( null, errors );
+ }
+
+
+ @Test
+ public void testSimpleRdnValueNullSchemaManager() throws LdapException
+ {
+ String errors = null;
+
+ Rdn rdn = new Rdn( (SchemaManager)null, "Cn= TEST " );
+
+ if ( !"Cn= TEST ".equals( rdn.getName() ) )
+ {
+ errors += "\nRdn.getName fails '" + rdn.getName() + "'";
+ }
+
+ if ( !"Cn=TEST".equals( rdn.getNormName() ) )
+ {
+ errors = "\nRdn.getNormName fails '" + rdn.getNormName() + "'";
+ }
+
+ if ( !"TEST".equals( rdn.getValue( "cn" ) ) )
+ {
+ errors += "\nRdn.getNormValue( 'cn' ) fails '" + ( String ) rdn.getValue( "cn" ) + "'";
+ }
+
+ assertEquals( null, errors );
+ }
+}
Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=1746124&r1=1746123&r2=1746124&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java Mon May 30 13:05:22 2016
@@ -319,7 +319,7 @@ public class LdapNetworkConnection exten
* Get the largest timeout from the search time limit and the connection
* timeout.
*/
- static long getTimeout( long connectionTimoutInMS, int searchTimeLimitInSeconds )
+ public long getTimeout( long connectionTimoutInMS, int searchTimeLimitInSeconds )
{
if ( searchTimeLimitInSeconds < 0 )
{
@@ -327,7 +327,14 @@ public class LdapNetworkConnection exten
}
else if ( searchTimeLimitInSeconds == 0 )
{
- return Long.MAX_VALUE;
+ if ( config.getTimeout() == 0 )
+ {
+ return Long.MAX_VALUE;
+ }
+ else
+ {
+ return config.getTimeout();
+ }
}
else
{
Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java?rev=1746124&r1=1746123&r2=1746124&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java Mon May 30 13:05:22 2016
@@ -39,6 +39,7 @@ import org.apache.directory.api.ldap.mod
import org.apache.directory.api.ldap.model.message.SearchResultDone;
import org.apache.directory.api.ldap.model.message.SearchResultEntry;
import org.apache.directory.api.ldap.model.message.SearchResultReference;
+import org.apache.directory.ldap.client.api.exception.LdapConnectionTimeOutException;
import org.apache.directory.ldap.client.api.future.SearchFuture;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -146,7 +147,7 @@ public class SearchCursorImpl extends Ab
{
future.cancel( true );
- throw new LdapException( LdapNetworkConnection.TIME_OUT_ERROR );
+ throw new LdapConnectionTimeOutException( LdapNetworkConnection.TIME_OUT_ERROR );
}
done = ( response instanceof SearchResultDone );
Added: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/LdapConnectionTimeOutException.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/LdapConnectionTimeOutException.java?rev=1746124&view=auto
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/LdapConnectionTimeOutException.java (added)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/LdapConnectionTimeOutException.java Mon May 30 13:05:22 2016
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.ldap.client.api.exception;
+
+
+import org.apache.directory.api.ldap.model.exception.LdapException;
+
+
+/**
+ * A LdapConnectionTimeOutException is thrown if there is an connection time-out
+ * situation.
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class LdapConnectionTimeOutException extends LdapException
+{
+ /** The serialVersionUID. */
+ static final long serialVersionUID = 1L;
+
+
+ /**
+ * Instantiates a new connection timeout exception.
+ */
+ public LdapConnectionTimeOutException()
+ {
+ super();
+ }
+
+
+ /**
+ * Instantiates a new connection timeout exception.
+ *
+ * @param explanation the explanation
+ */
+ public LdapConnectionTimeOutException( String explanation )
+ {
+ super( explanation );
+ }
+
+
+ /**
+ * Instantiates a new connection timeout exception.
+ *
+ * @param explanation the explanation
+ * @param cause The root cause for this exception
+ */
+ public LdapConnectionTimeOutException( String explanation, Throwable cause )
+ {
+ super( explanation, cause );
+ }
+}
Modified: directory/shared/branches/shared-value/ldap/client/api/src/test/java/org/apache/directory/ldap/client/api/LdapNetworkConnectionTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/test/java/org/apache/directory/ldap/client/api/LdapNetworkConnectionTest.java?rev=1746124&r1=1746123&r2=1746124&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/test/java/org/apache/directory/ldap/client/api/LdapNetworkConnectionTest.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/test/java/org/apache/directory/ldap/client/api/LdapNetworkConnectionTest.java Mon May 30 13:05:22 2016
@@ -22,9 +22,11 @@ package org.apache.directory.ldap.client
import static org.junit.Assert.assertEquals;
+import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@@ -81,10 +83,24 @@ public class LdapNetworkConnectionTest
@Test
- public void testGetClientTimeout()
+ @Ignore
+ public void testGetClientTimeout() throws IOException
{
- long timeout = LdapNetworkConnection.getTimeout( connectionTimeoutInMS, searchTimeLimitInSeconds );
- assertEquals( expectedTimeoutInMS, timeout );
+ LdapNetworkConnection ldapConnection = null;
+
+ try
+ {
+ ldapConnection = new LdapNetworkConnection();
+ long timeout = ldapConnection.getTimeout( connectionTimeoutInMS, searchTimeLimitInSeconds );
+ assertEquals( expectedTimeoutInMS, timeout );
+ }
+ finally
+ {
+ if ( ldapConnection != null )
+ {
+ ldapConnection.close();
+ }
+ }
}
}
Modified: directory/shared/branches/shared-value/ldap/extras/codec-api/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/extras/codec-api/pom.xml?rev=1746124&r1=1746123&r2=1746124&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/extras/codec-api/pom.xml (original)
+++ directory/shared/branches/shared-value/ldap/extras/codec-api/pom.xml Mon May 30 13:05:22 2016
@@ -66,7 +66,7 @@
<Export-Package>
org.apache.directory.api.ldap.extras.controls;version=${project.version};-noimport:=true,
org.apache.directory.api.ldap.extras.controls.ad;version=${project.version};-noimport:=true,
- org.apache.directory.api.ldap.extras.controls.changeNotifications_impl;version=${project.version},
+ org.apache.directory.api.ldap.extras.controls.changeNotifications;version=${project.version},
org.apache.directory.api.ldap.extras.controls.permissiveModify;version=${project.version};-noimport:=true,
org.apache.directory.api.ldap.extras.controls.ppolicy;version=${project.version};-noimport:=true,
org.apache.directory.api.ldap.extras.controls.syncrepl.syncDone;version=${project.version};-noimport:=true,
Modified: directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyImpl.java?rev=1746124&r1=1746123&r2=1746124&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyImpl.java (original)
+++ directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyImpl.java Mon May 30 13:05:22 2016
@@ -146,4 +146,29 @@ public class PasswordPolicyImpl implemen
{
return response;
}
+
+
+ /**
+ * Get a String representation of a PasswordPolicyImpl
+ *
+ * @return A BindResponse String
+ */
+ public String toString()
+ {
+ StringBuilder sb = new StringBuilder();
+
+ sb.append( " PasswordPolicy[" );
+ sb.append( "criticality:" ).append( criticality ).append( "]" );
+
+ if ( response != null )
+ {
+ sb.append( response );
+ }
+ else
+ {
+ sb.append( '\n' );
+ }
+
+ return sb.toString();
+ }
}
Modified: directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyResponseImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyResponseImpl.java?rev=1746124&r1=1746123&r2=1746124&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyResponseImpl.java (original)
+++ directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyResponseImpl.java Mon May 30 13:05:22 2016
@@ -95,7 +95,7 @@ public class PasswordPolicyResponseImpl
@Override
public String toString()
{
- return "PasswordPolicyResponseImpl [timeBeforeExpiration=" + timeBeforeExpiration + ", graceAuthNRemaining="
+ return "PasswordPolicyResponse [timeBeforeExpiration=" + timeBeforeExpiration + ", graceAuthNRemaining="
+ graceAuthNRemaining + ", ppolicyError=" + ppolicyError + "]";
}
}
Modified: directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv/VirtualListViewResultCode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv/VirtualListViewResultCode.java?rev=1746124&r1=1746123&r2=1746124&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv/VirtualListViewResultCode.java (original)
+++ directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv/VirtualListViewResultCode.java Mon May 30 13:05:22 2016
@@ -45,6 +45,10 @@ public enum VirtualListViewResultCode
SORTCONTROLMISSING(60, "Sort control missing"),
OFFSETRANGEERROR(61, "Offset range error"),
+
+ OPENLDAP_SSSMISSING(76, "SSS missing"), // OpenLDAP-specific error code
+
+ OPENLDAP_RANGEERRROR(77, "Range error"), // OpenLDAP-specific error code
OTHER(80, "Other");
@@ -118,6 +122,12 @@ public enum VirtualListViewResultCode
case 61:
return OFFSETRANGEERROR;
+ case 76:
+ return OPENLDAP_SSSMISSING;
+
+ case 77:
+ return OPENLDAP_RANGEERRROR;
+
case 80:
return OTHER;
Modified: directory/shared/branches/shared-value/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/permissiveModify_impl/PermissiveModifyDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/permissiveModify_impl/PermissiveModifyDecorator.java?rev=1746124&r1=1746123&r2=1746124&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/permissiveModify_impl/PermissiveModifyDecorator.java (original)
+++ directory/shared/branches/shared-value/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/permissiveModify_impl/PermissiveModifyDecorator.java Mon May 30 13:05:22 2016
@@ -50,6 +50,7 @@ public class PermissiveModifyDecorator e
/**
* Returns the default control length.
*/
+ @Override
public int computeLength()
{
return 0;
Modified: directory/shared/branches/shared-value/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/permissiveModify_impl/PermissiveModifyFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/permissiveModify_impl/PermissiveModifyFactory.java?rev=1746124&r1=1746123&r2=1746124&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/permissiveModify_impl/PermissiveModifyFactory.java (original)
+++ directory/shared/branches/shared-value/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/permissiveModify_impl/PermissiveModifyFactory.java Mon May 30 13:05:22 2016
@@ -53,6 +53,7 @@ public class PermissiveModifyFactory imp
/**
* {@inheritDoc}
*/
+ @Override
public String getOid()
{
return PermissiveModify.OID;
@@ -62,6 +63,7 @@ public class PermissiveModifyFactory imp
/**
* {@inheritDoc}
*/
+ @Override
public CodecControl<PermissiveModify> newCodecControl()
{
return new PermissiveModifyDecorator( codec, new PermissiveModifyImpl() );
@@ -71,6 +73,7 @@ public class PermissiveModifyFactory imp
/**
* {@inheritDoc}
*/
+ @Override
public CodecControl<PermissiveModify> newCodecControl( PermissiveModify control )
{
return new PermissiveModifyDecorator( codec, control );
Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Rdn.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Rdn.java?rev=1746124&r1=1746123&r2=1746124&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Rdn.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Rdn.java Mon May 30 13:05:22 2016
@@ -286,7 +286,22 @@ public class Rdn implements Cloneable, E
addAVA( schemaManager, upType, new Value( upValue ) );
}
- upName = upType + '=' + upValue;
+ StringBuilder sb = new StringBuilder();
+ sb.append( upType ).append( '=' ).append( upValue );
+ upName = sb.toString();
+
+ sb.setLength( 0 );
+ sb.append( ava.getNormType() ).append( '=' );
+
+ Value value = ava.getValue();
+
+ if ( value != null )
+ {
+ sb.append( value.getNormalized() );
+ }
+
+ normName = sb.toString();
+ normalized = true;
hashCode();
}
Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/IntegerComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/IntegerComparator.java?rev=1746124&r1=1746123&r2=1746124&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/IntegerComparator.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/IntegerComparator.java Mon May 30 13:05:22 2016
@@ -24,6 +24,7 @@ import java.io.Serializable;
import java.math.BigInteger;
import org.apache.directory.api.i18n.I18n;
+import org.apache.directory.api.ldap.model.entry.Value;
import org.apache.directory.api.ldap.model.exception.LdapException;
import org.apache.directory.api.ldap.model.schema.LdapComparator;
import org.apache.directory.api.ldap.model.schema.normalizers.NumericNormalizer;
@@ -64,6 +65,10 @@ public class IntegerComparator extends L
{
return compare( ( String ) v1, ( String ) v2 );
}
+ else if ( v1 instanceof Value )
+ {
+ return compare( ( ( Value ) v1 ).getValue(), ( ( Value ) v2 ).getValue() );
+ }
else
{
return compare( ( Long ) v1, ( Long ) v2 );
Added: directory/shared/branches/shared-value/ldap/model/src/test/java/org/apache/directory/api/ldap/model/name/FastRdnParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/test/java/org/apache/directory/api/ldap/model/name/FastRdnParserTest.java?rev=1746124&view=auto
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/test/java/org/apache/directory/api/ldap/model/name/FastRdnParserTest.java (added)
+++ directory/shared/branches/shared-value/ldap/model/src/test/java/org/apache/directory/api/ldap/model/name/FastRdnParserTest.java Mon May 30 13:05:22 2016
@@ -0,0 +1,449 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.api.ldap.model.name;
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.Iterator;
+
+import org.apache.directory.api.ldap.model.exception.LdapException;
+import org.apache.directory.api.ldap.model.name.Ava;
+import org.apache.directory.api.ldap.model.name.Rdn;
+import org.apache.directory.api.ldap.model.schema.SchemaManager;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
+
+/**
+ * Test the class Rdn when it can be parsed by the Fast parser
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrency()
+public class FastRdnParserTest
+{
+ /** A null schemaManager used in tests */
+ SchemaManager schemaManager = null;
+
+
+ /**
+ * Test a null Rdn
+ */
+ @Test
+ public void testRdnNull()
+ {
+ assertEquals( "", new Rdn().toString() );
+ }
+
+
+ /**
+ * test an empty Rdn
+ *
+ * @throws LdapException
+ */
+ @Test
+ public void testRdnEmpty() throws LdapException
+ {
+ assertEquals( "", new Rdn( "" ).toString() );
+ }
+
+
+ /**
+ * test a simple Rdn : a = b
+ *
+ * @throws LdapException
+ */
+ @Test
+ public void testRdnSimple() throws LdapException
+ {
+ assertEquals( "a=b", new Rdn( "a = b" ).getNormName() );
+ }
+
+
+ /**
+ * test a composite Rdn with or without spaces: a=b, a =b, a= b, a = b, a =
+ * b
+ *
+ * @throws LdapException
+ */
+ @Test
+ public void testRdnCompositeWithSpace() throws LdapException
+ {
+ assertEquals( "a=b", new Rdn( "a=b" ).getNormName() );
+ assertEquals( "a=b", new Rdn( " a=b" ).getNormName() );
+ assertEquals( "a=b", new Rdn( "a =b" ).getNormName() );
+ assertEquals( "a=b", new Rdn( "a= b" ).getNormName() );
+ assertEquals( "a=b", new Rdn( "a=b " ).getNormName() );
+ assertEquals( "a=b", new Rdn( " a =b" ).getNormName() );
+ assertEquals( "a=b", new Rdn( " a= b" ).getNormName() );
+ assertEquals( "a=b", new Rdn( " a=b " ).getNormName() );
+ assertEquals( "a=b", new Rdn( "a = b" ).getNormName() );
+ assertEquals( "a=b", new Rdn( "a =b " ).getNormName() );
+ assertEquals( "a=b", new Rdn( "a= b " ).getNormName() );
+ assertEquals( "a=b", new Rdn( " a = b" ).getNormName() );
+ assertEquals( "a=b", new Rdn( " a =b " ).getNormName() );
+ assertEquals( "a=b", new Rdn( " a= b " ).getNormName() );
+ assertEquals( "a=b", new Rdn( "a = b " ).getNormName() );
+ assertEquals( "a=b", new Rdn( " a = b " ).getNormName() );
+ }
+
+
+ /**
+ * test a simple Rdn with an oid attribut wiithout oid prefix : 12.34.56 =
+ * azerty
+ *
+ * @throws LdapException
+ */
+ @Test
+ public void testRdnOidWithoutPrefix() throws LdapException
+ {
+ assertEquals( "12.34.56=azerty", new Rdn( "12.34.56 = azerty" ).getNormName() );
+ }
+
+
+ /**
+ * Test the clone method for a Rdn.
+ *
+ * @throws LdapException
+ */
+ @Test
+ public void testRDNCloningOneNameComponent() throws LdapException
+ {
+ Rdn rdn = new Rdn( "a", "b" );
+
+ Rdn rdnClone = rdn.clone();
+
+ rdn = new Rdn( "c=d" );
+
+ assertEquals( "b", rdnClone.getValue( "a" ) );
+ }
+
+
+ /**
+ * Test the creation of a new Rdn
+ *
+ * @throws org.apache.directory.api.ldap.model.exception.LdapException
+ */
+ @Test
+ public void testRDNCreation() throws LdapException
+ {
+ Rdn rdn = new Rdn( "A", " b " );
+ assertEquals( "a= b ", rdn.getNormName() );
+ assertEquals( "A= b ", rdn.getName() );
+ }
+
+
+ /**
+ * Test for DIRSHARED-3.
+ * Tests that equals() is invertable for single-valued RDNs.
+ *
+ * @throws LdapException
+ */
+ @Test
+ public void testCompareInvertableNC2NC() throws LdapException
+ {
+ Rdn rdn1 = new Rdn( " a = b " );
+ Rdn rdn2 = new Rdn( " a = c " );
+ assertFalse( rdn1.equals( rdn2 ) );
+ assertFalse( rdn2.equals( rdn1 ) );
+
+ }
+
+
+ /**
+ * Compares with a null Rdn.
+ *
+ * @throws LdapException
+ */
+ @Test
+ public void testRDNCompareToNullRdn() throws LdapException
+ {
+ Rdn rdn1 = new Rdn( " a = b " );
+
+ assertFalse( rdn1.equals( null ) );
+ }
+
+
+ /**
+ * Compares a simple NC to a simple NC.
+ *
+ * @throws LdapException
+ */
+ @Test
+ public void testRDNCompareToNC2NC() throws LdapException
+ {
+ Rdn rdn1 = new Rdn( " a = b " );
+ Rdn rdn2 = new Rdn( " a = b " );
+
+ assertTrue( rdn1.equals( rdn2 ) );
+ }
+
+
+ /**
+ * Compares a simple NC to a simple NC in UperCase.
+ *
+ * @throws LdapException
+ */
+ @Test
+ public void testRDNCompareToNC2NCUperCase() throws LdapException
+ {
+ Rdn rdn1 = new Rdn( " a = b " );
+ Rdn rdn2 = new Rdn( " A = b " );
+
+ assertTrue( rdn1.equals( rdn2 ) );
+ }
+
+
+ /**
+ * Compares a simple NC to a different simple NC.
+ *
+ * @throws LdapException
+ */
+ @Test
+ public void testRDNCompareToNC2NCNotEquals() throws LdapException
+ {
+ Rdn rdn1 = new Rdn( " a = b " );
+ Rdn rdn2 = new Rdn( " A = d " );
+
+ assertFalse( rdn1.equals( rdn2 ) );
+ }
+
+
+ /**
+ * Test the getSize method.
+ *
+ */
+ @Test
+ public void testGetSize0()
+ {
+ Rdn rdn = new Rdn();
+
+ assertEquals( 0, rdn.size() );
+ }
+
+
+ @Test
+ public void testSingleValuedIterator() throws LdapException
+ {
+ Rdn rdn = new Rdn( "cn=Kate Bush" );
+ Iterator<Ava> iterator = rdn.iterator();
+ assertNotNull( iterator );
+ assertTrue( iterator.hasNext() );
+ assertNotNull( iterator.next() );
+ assertFalse( iterator.hasNext() );
+ }
+
+
+ @Test
+ public void testEmptyIterator()
+ {
+ Rdn rdn = new Rdn();
+ Iterator<Ava> iterator = rdn.iterator();
+ assertNotNull( iterator );
+ assertFalse( iterator.hasNext() );
+ }
+
+
+ /** Serialization tests ------------------------------------------------- */
+
+ /**
+ * Test serialization of an empty Rdn
+ */
+ @Test
+ public void testEmptyRDNSerialization() throws LdapException, IOException, ClassNotFoundException
+ {
+ Rdn rdn = new Rdn( schemaManager, "" );
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectOutputStream out = new ObjectOutputStream( baos );
+
+ out.writeObject( rdn );
+
+ ObjectInputStream in = null;
+
+ byte[] data = baos.toByteArray();
+ in = new ObjectInputStream( new ByteArrayInputStream( data ) );
+
+ Rdn rdn2 = ( Rdn ) in.readObject();
+
+ assertEquals( rdn, rdn2 );
+ }
+
+
+ @Test
+ public void testNullRdnSerialization() throws IOException, ClassNotFoundException
+ {
+ Rdn rdn = new Rdn( schemaManager );
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectOutputStream out = new ObjectOutputStream( baos );
+
+ out.writeObject( rdn );
+
+ ObjectInputStream in = null;
+
+ byte[] data = baos.toByteArray();
+ in = new ObjectInputStream( new ByteArrayInputStream( data ) );
+
+ Rdn rdn2 = ( Rdn ) in.readObject();
+
+ assertEquals( rdn, rdn2 );
+ }
+
+
+ /**
+ * Test serialization of a simple Rdn
+ */
+ @Test
+ public void testSimpleRdnSerialization() throws LdapException, IOException, ClassNotFoundException
+ {
+ Rdn rdn = new Rdn( schemaManager, "a=b" );
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectOutputStream out = new ObjectOutputStream( baos );
+
+ out.writeObject( rdn );
+
+ ObjectInputStream in = null;
+
+ byte[] data = baos.toByteArray();
+ in = new ObjectInputStream( new ByteArrayInputStream( data ) );
+
+ Rdn rdn2 = ( Rdn ) in.readObject();
+
+ assertEquals( rdn, rdn2 );
+ }
+
+
+ /**
+ * Test serialization of a simple Rdn
+ */
+ @Test
+ public void testSimpleRdn2Serialization() throws LdapException, IOException, ClassNotFoundException
+ {
+ Rdn rdn = new Rdn( schemaManager, " ABC = DEF " );
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectOutputStream out = new ObjectOutputStream( baos );
+
+ out.writeObject( rdn );
+
+ ObjectInputStream in = null;
+
+ byte[] data = baos.toByteArray();
+ in = new ObjectInputStream( new ByteArrayInputStream( data ) );
+
+ Rdn rdn2 = ( Rdn ) in.readObject();
+
+ assertEquals( rdn, rdn2 );
+ }
+
+
+ /**
+ * Test serialization of a simple Rdn with no value
+ */
+ @Test
+ public void testSimpleRdnNoValueSerialization() throws LdapException, IOException, ClassNotFoundException
+ {
+ Rdn rdn = new Rdn( schemaManager, " ABC =" );
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectOutputStream out = new ObjectOutputStream( baos );
+
+ out.writeObject( rdn );
+
+ ObjectInputStream in = null;
+
+ byte[] data = baos.toByteArray();
+ in = new ObjectInputStream( new ByteArrayInputStream( data ) );
+
+ Rdn rdn2 = ( Rdn ) in.readObject();
+
+ assertEquals( rdn, rdn2 );
+ }
+
+
+ /**
+ * Test serialization of a simple Rdn with one value
+ */
+ @Test
+ public void testSimpleRdnOneValueSerialization() throws LdapException, IOException, ClassNotFoundException
+ {
+ Rdn rdn = new Rdn( schemaManager, " ABC = def " );
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectOutputStream out = new ObjectOutputStream( baos );
+
+ out.writeObject( rdn );
+
+ ObjectInputStream in = null;
+
+ byte[] data = baos.toByteArray();
+ in = new ObjectInputStream( new ByteArrayInputStream( data ) );
+
+ Rdn rdn2 = ( Rdn ) in.readObject();
+
+ assertEquals( rdn, rdn2 );
+ }
+
+
+ /**
+ * test that a RDN can have an attributeType twice
+ */
+ @Test
+ public void testAvaConstructorRdnAtUsedTwice() throws LdapException
+ {
+ Rdn rdn = new Rdn( new Ava( "A", "b" ), new Ava( "A", "d" ) );
+
+ assertEquals( "A=b+A=d", rdn.getName() );
+ }
+
+
+ /**
+ * test that a RDN can have an attributeType twice
+ */
+ @Test
+ public void testRdnPerf() throws LdapException
+ {
+ long t0 = System.currentTimeMillis();
+
+ for ( int i = 0; i < 10000000; i++ )
+ {
+ Rdn rdn = new Rdn( "cn=test"+ i );
+ }
+
+ long t1 = System.currentTimeMillis();
+
+ System.out.println( "Delta = " + ( t1 - t0 ) );
+ }
+}
Modified: directory/shared/branches/shared-value/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/SingleLdifSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/SingleLdifSchemaLoader.java?rev=1746124&r1=1746123&r2=1746124&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/SingleLdifSchemaLoader.java (original)
+++ directory/shared/branches/shared-value/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/SingleLdifSchemaLoader.java Mon May 30 13:05:22 2016
@@ -66,7 +66,7 @@ public class SingleLdifSchemaLoader exte
"nameForms", "normalizers", "objectClasses", "syntaxes", "syntaxCheckers" };
/** The map containing ... */
- private Map<String, Map<String, List<Entry>>> scObjEntryMap = new HashMap<String, Map<String, List<Entry>>>();
+ private Map<String, Map<String, List<Entry>>> scObjEntryMap = new HashMap<>();
/**
@@ -125,6 +125,33 @@ public class SingleLdifSchemaLoader exte
}
}
+
+ /**
+ * Instantiates a new single LDIF schema loader.
+ */
+ public SingleLdifSchemaLoader( URL schemaUrl )
+ {
+ try
+ {
+ for ( String s : schemaObjectTypeRdns )
+ {
+ scObjEntryMap.put( s, new HashMap<String, List<Entry>>() );
+ }
+
+ InputStream in = schemaUrl.openStream();
+
+ initializeSchemas( in );
+ }
+ catch ( LdapException e )
+ {
+ throw new RuntimeException( e );
+ }
+ catch ( IOException e )
+ {
+ throw new RuntimeException( e );
+ }
+ }
+
/**
* Initialize the Schema object from a Single LDIF file
@@ -148,6 +175,11 @@ public class SingleLdifSchemaLoader exte
}
else
{
+ if ( currentSchema == null )
+ {
+ throw new LdapException( "the first entry in the LDIF file is not a schema definition" );
+ }
+
loadSchemaObject( currentSchema.getSchemaName(), ldifEntry );
}
}
@@ -176,7 +208,7 @@ public class SingleLdifSchemaLoader exte
if ( entryList == null )
{
- entryList = new ArrayList<Entry>();
+ entryList = new ArrayList<>();
entryList.add( ldifEntry.getEntry() );
m.put( schemaName, entryList );
}
@@ -195,7 +227,7 @@ public class SingleLdifSchemaLoader exte
IOException
{
Map<String, List<Entry>> m = scObjEntryMap.get( schemaObjectType );
- List<Entry> atList = new ArrayList<Entry>();
+ List<Entry> atList = new ArrayList<>();
for ( Schema s : schemas )
{
@@ -214,6 +246,7 @@ public class SingleLdifSchemaLoader exte
/**
* {@inheritDoc}
*/
+ @Override
public List<Entry> loadAttributeTypes( Schema... schemas ) throws LdapException, IOException
{
return loadSchemaObjects( "attributetypes", schemas );
@@ -223,6 +256,7 @@ public class SingleLdifSchemaLoader exte
/**
* {@inheritDoc}
*/
+ @Override
public List<Entry> loadComparators( Schema... schemas ) throws LdapException, IOException
{
return loadSchemaObjects( "comparators", schemas );
@@ -232,6 +266,7 @@ public class SingleLdifSchemaLoader exte
/**
* {@inheritDoc}
*/
+ @Override
public List<Entry> loadDitContentRules( Schema... schemas ) throws LdapException, IOException
{
return loadSchemaObjects( "ditContentRules", schemas );
@@ -241,6 +276,7 @@ public class SingleLdifSchemaLoader exte
/**
* {@inheritDoc}
*/
+ @Override
public List<Entry> loadDitStructureRules( Schema... schemas ) throws LdapException, IOException
{
return loadSchemaObjects( "ditStructureRules", schemas );
@@ -250,6 +286,7 @@ public class SingleLdifSchemaLoader exte
/**
* {@inheritDoc}
*/
+ @Override
public List<Entry> loadMatchingRules( Schema... schemas ) throws LdapException, IOException
{
return loadSchemaObjects( "matchingRules", schemas );
@@ -259,6 +296,7 @@ public class SingleLdifSchemaLoader exte
/**
* {@inheritDoc}
*/
+ @Override
public List<Entry> loadMatchingRuleUses( Schema... schemas ) throws LdapException, IOException
{
return loadSchemaObjects( "matchingRuleUse", schemas );
@@ -268,6 +306,7 @@ public class SingleLdifSchemaLoader exte
/**
* {@inheritDoc}
*/
+ @Override
public List<Entry> loadNameForms( Schema... schemas ) throws LdapException, IOException
{
return loadSchemaObjects( "nameForms", schemas );
@@ -277,6 +316,7 @@ public class SingleLdifSchemaLoader exte
/**
* {@inheritDoc}
*/
+ @Override
public List<Entry> loadNormalizers( Schema... schemas ) throws LdapException, IOException
{
return loadSchemaObjects( "normalizers", schemas );
@@ -286,6 +326,7 @@ public class SingleLdifSchemaLoader exte
/**
* {@inheritDoc}
*/
+ @Override
public List<Entry> loadObjectClasses( Schema... schemas ) throws LdapException, IOException
{
return loadSchemaObjects( "objectClasses", schemas );
@@ -295,6 +336,7 @@ public class SingleLdifSchemaLoader exte
/**
* {@inheritDoc}
*/
+ @Override
public List<Entry> loadSyntaxes( Schema... schemas ) throws LdapException, IOException
{
return loadSchemaObjects( "syntaxes", schemas );
@@ -304,6 +346,7 @@ public class SingleLdifSchemaLoader exte
/**
* {@inheritDoc}
*/
+ @Override
public List<Entry> loadSyntaxCheckers( Schema... schemas ) throws LdapException, IOException
{
return loadSchemaObjects( "syntaxCheckers", schemas );