directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1005097 - /directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResponseDsml.java
Date Wed, 06 Oct 2010 16:07:40 GMT
Author: pamarcelot
Date: Wed Oct  6 16:07:39 2010
New Revision: 1005097

URL: http://svn.apache.org/viewvc?rev=1005097&view=rev
Log:
Added a new empty constructor.

Modified:
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResponseDsml.java

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=1005097&r1=1005096&r2=1005097&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
Wed Oct  6 16:07:39 2010
@@ -43,6 +43,15 @@ public class SearchResponseDsml extends 
 
     /**
      * Creates a new instance of SearchResponseDsml.
+     */
+    public SearchResponseDsml()
+    {
+        super( null );
+    }
+
+
+    /**
+     * Creates a new instance of SearchResponseDsml.
      *
      * @param response the LDAP response message to decorate
      */
@@ -88,10 +97,13 @@ public class SearchResponseDsml extends 
         Element element = root.addElement( "searchResponse" );
 
         // RequestID
-        int requestID = instance.getMessageId();
-        if ( requestID != 0 )
+        if ( instance != null )
         {
-            element.addAttribute( "requestID", "" + requestID );
+            int requestID = instance.getMessageId();
+            if ( requestID != 0 )
+            {
+                element.addAttribute( "requestID", "" + requestID );
+            }
         }
 
         for ( DsmlDecorator response : responses )



Mime
View raw message