directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject [directory-ldap-api] 02/02: o Fix failing tests (ByteBuffer was not flipped) o Fix a checkstyle error o Minor typo
Date Sat, 27 Jan 2018 05:49:09 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-ldap-api.git

commit dc76a2250fad5925f592a15cfa60cba537e3f340
Author: Emmanuel L├ęcharny <elecharny@symas.com>
AuthorDate: Sat Jan 27 06:43:47 2018 +0100

    o Fix failing tests (ByteBuffer was not flipped)
    o Fix a checkstyle error
    o Minor typo
---
 .../ads_impl/endTransaction/EndTransactionRequestContainer.java       | 2 +-
 .../ads_impl/endTransaction/EndTransactionRequestDecorator.java       | 2 +-
 .../extended/ads_impl/endTransaction/EndTransactionRequestTest.java   | 4 ++++
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionRequestContainer.java
b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionRequestContainer.java
index 58d6765..14b48cf 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionRequestContainer.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionRequestContainer.java
@@ -35,7 +35,7 @@ public class EndTransactionRequestContainer extends AbstractContainer
 
 
     /**
-     * Creates a new EndTransactionContainer object. We will store one
+     * Creates a new EndTransactionRequestContainer object. We will store one
      * grammar, it's enough ...
      */
     public EndTransactionRequestContainer()
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionRequestDecorator.java
b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionRequestDecorator.java
index 68bc709..4e4768c 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionRequestDecorator.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionRequestDecorator.java
@@ -188,7 +188,7 @@ public class EndTransactionRequestDecorator extends ExtendedRequestDecorator<End
         bb.put( TLV.getBytes( requestLength ) );
         
         // The commit flag, if it's not true
-        if ( ! getCommit() )
+        if ( !getCommit() )
         {
             BerValue.encode( bb, false );
         }
diff --git a/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionRequestTest.java
b/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionRequestTest.java
index 7f03d4a..eeff245 100644
--- a/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionRequestTest.java
+++ b/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionRequestTest.java
@@ -59,6 +59,8 @@ public class EndTransactionRequestTest
         bb.put( new byte[]
             { 0x30, 0x00, // EndTransactionRequest ::= SEQUENCE {
             } );
+        
+        bb.flip();
 
         EndTransactionRequestContainer container = new EndTransactionRequestContainer();
 
@@ -79,6 +81,8 @@ public class EndTransactionRequestTest
                 0x01, 0x01, 0x00       // Commit, TRUE
         } );
 
+        bb.flip();
+
         EndTransactionRequestContainer container = new EndTransactionRequestContainer();
 
         decoder.decode( bb, container );

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

Mime
View raw message