directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1005787 - in /directory/shared/trunk: dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/ dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/r...
Date Fri, 08 Oct 2010 11:46:40 GMT
Author: pamarcelot
Date: Fri Oct  8 11:46:39 2010
New Revision: 1005787

URL: http://svn.apache.org/viewvc?rev=1005787&view=rev
Log:
Updated requestId tests as the default requestId for a message is now -1 and no longer 0.

Modified:
    directory/shared/trunk/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/LdapResultDsml.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResponseDsml.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractRequestDsml.java

Modified: directory/shared/trunk/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java?rev=1005787&r1=1005786&r2=1005787&view=diff
==============================================================================
--- directory/shared/trunk/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
(original)
+++ directory/shared/trunk/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
Fri Oct  8 11:46:39 2010
@@ -254,7 +254,7 @@ public class Dsmlv2Engine
             // Checking the request has a requestID attribute if Processing = Parallel and
ResponseOrder = Unordered
             if ( ( batchRequest.getProcessing().equals( Processing.PARALLEL ) )
                 && ( batchRequest.getResponseOrder().equals( ResponseOrder.UNORDERED
) )
-                && ( request.getMessageId() == 0 ) )
+                && ( request.getMessageId() <= 0 ) )
             {
                 // Then we have to send an errorResponse
                 ErrorResponse errorResponse = new ErrorResponse( 0, ErrorResponseType.MALFORMED_REQUEST,
I18n
@@ -382,7 +382,7 @@ public class Dsmlv2Engine
                         SearchResultEntryDsml searchResultEntryDsml = new SearchResultEntryDsml(
searchResultEntry );
                         searchResponseDsml = new SearchResponseDsml( searchResultEntryDsml
);
 
-                        if ( requestID != 0 )
+                        if ( requestID > 0 )
                         {
                             searchResponseDsml.setMessageId( requestID );
                         }
@@ -397,7 +397,7 @@ public class Dsmlv2Engine
                             searchResultReference );
                         searchResponseDsml = new SearchResponseDsml( searchResultReferenceDsml
);
 
-                        if ( requestID != 0 )
+                        if ( requestID > 0 )
                         {
                             searchResponseDsml.setMessageId( requestID );
                         }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/LdapResultDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/LdapResultDsml.java?rev=1005787&r1=1005786&r2=1005787&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/LdapResultDsml.java
(original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/LdapResultDsml.java
Fri Oct  8 11:46:39 2010
@@ -72,7 +72,7 @@ public class LdapResultDsml implements D
 
         // RequestID
         int requestID = message.getMessageId();
-        if ( requestID != 0 )
+        if ( requestID > 0 )
         {
             root.addAttribute( "requestID", "" + requestID );
         }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResponseDsml.java?rev=1005787&r1=1005786&r2=1005787&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResponseDsml.java
(original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResponseDsml.java
Fri Oct  8 11:46:39 2010
@@ -100,7 +100,7 @@ public class SearchResponseDsml extends 
         if ( instance != null )
         {
             int requestID = instance.getMessageId();
-            if ( requestID != 0 )
+            if ( requestID > 0 )
             {
                 element.addAttribute( "requestID", "" + requestID );
             }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractRequestDsml.java?rev=1005787&r1=1005786&r2=1005787&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractRequestDsml.java
(original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractRequestDsml.java
Fri Oct  8 11:46:39 2010
@@ -59,7 +59,7 @@ public abstract class AbstractRequestDsm
 
         // Request ID
         int requestID = instance.getMessageId();
-        if ( requestID != 0 )
+        if ( requestID > 0 )
         {
             element.addAttribute( "requestID", "" + requestID );
         }



Mime
View raw message