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: Fixed the test to use the static LdapEnoder class
Date Thu, 15 Nov 2018 06:37:39 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 a5f582a  Fixed the test to use the static LdapEnoder class
a5f582a is described below

commit a5f582ab73d3b865ad7baa1a0a117a4cf371d729
Author: elecharny <elecharny@pierre-arnauds-macbook-pro.home>
AuthorDate: Thu Nov 15 07:37:37 2018 +0100

    Fixed the test to use the static LdapEnoder class
---
 .../directory/server/operations/bind/SaslBindIT.java     | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
b/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
index 946cf21..0d825de 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
@@ -6,16 +6,16 @@
  *  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.server.operations.bind;
 
@@ -35,10 +35,10 @@ import javax.naming.directory.InitialDirContext;
 
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.commons.net.SocketClient;
+import org.apache.directory.api.ldap.codec.api.AbstractMessageDecorator;
 import org.apache.directory.api.ldap.codec.api.LdapDecoder;
 import org.apache.directory.api.ldap.codec.api.LdapEncoder;
 import org.apache.directory.api.ldap.codec.api.LdapMessageContainer;
-import org.apache.directory.api.ldap.codec.api.AbstractMessageDecorator;
 import org.apache.directory.api.ldap.model.constants.SaslQoP;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.constants.SupportedSaslMechanisms;
@@ -87,7 +87,7 @@ import org.slf4j.LoggerFactory;
 
 /**
  * An {@link AbstractServerTest} testing SASL authentication.
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @RunWith(FrameworkRunner.class)
@@ -713,8 +713,7 @@ public class SaslBindIT extends AbstractLdapTestUnit
             LdapDecoder decoder = new LdapDecoder();
 
             // Send encoded request to server
-            LdapEncoder encoder = new LdapEncoder( getLdapServer().getDirectoryService().getLdapCodecService()
);
-            ByteBuffer bb = encoder.encodeMessage( request );
+            ByteBuffer bb = LdapEncoder.encodeMessage( getService().getLdapCodecService(),
request );
 
             bb.flip();
 
@@ -753,8 +752,7 @@ public class SaslBindIT extends AbstractLdapTestUnit
             LdapDecoder decoder = new LdapDecoder();
 
             // Send encoded request to server
-            LdapEncoder encoder = new LdapEncoder( getLdapServer().getDirectoryService().getLdapCodecService()
);
-            ByteBuffer bb = encoder.encodeMessage( request );
+            ByteBuffer bb = LdapEncoder.encodeMessage( getService().getLdapCodecService(),
request );
             bb.flip();
 
             _output_.write( bb.array() );


Mime
View raw message