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 2019/04/29 21:57:49 UTC

[directory-ldap-api] branch 1.0 updated: Applied fix for DIRAPI-300

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/1.0 by this push:
     new a3b855a  Applied fix for DIRAPI-300
a3b855a is described below

commit a3b855a44858006f72997cd5df9f47fc725f9ff0
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Mon Apr 29 23:57:37 2019 +0200

    Applied fix for DIRAPI-300
---
 .../org/apache/directory/api/dsmlv2/engine/Dsmlv2Engine.java   | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/dsml/engine/src/main/java/org/apache/directory/api/dsmlv2/engine/Dsmlv2Engine.java b/dsml/engine/src/main/java/org/apache/directory/api/dsmlv2/engine/Dsmlv2Engine.java
index a5d15d7..fa4cc6f 100644
--- a/dsml/engine/src/main/java/org/apache/directory/api/dsmlv2/engine/Dsmlv2Engine.java
+++ b/dsml/engine/src/main/java/org/apache/directory/api/dsmlv2/engine/Dsmlv2Engine.java
@@ -355,6 +355,8 @@ public class Dsmlv2Engine
             return;
         }
 
+        String batchResponseTag = null;
+
         if ( respWriter != null )
         {
             StringBuilder sb = new StringBuilder();
@@ -377,7 +379,7 @@ public class Dsmlv2Engine
             sb.append( batchRequest.getRequestID() );
             sb.append( "\">" );
 
-            respWriter.write( sb.toString() );
+            batchResponseTag = sb.toString();
         }
 
         // Processing each request:
@@ -419,6 +421,12 @@ public class Dsmlv2Engine
             return;
         }
 
+        // We can now write the tag, as we don't have an error
+        if ( respWriter != null )
+        {
+            respWriter.write( batchResponseTag );
+        }
+
         // (Request == null when there's no more request to process)
         while ( request != null )
         {