directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1087325 - /directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
Date Thu, 31 Mar 2011 15:04:53 GMT
Author: pamarcelot
Date: Thu Mar 31 15:04:53 2011
New Revision: 1087325

URL: http://svn.apache.org/viewvc?rev=1087325&view=rev
Log:
Fixed an NPE in case where the returning attributes is a 'null' object.

Modified:
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java?rev=1087325&r1=1087324&r2=1087325&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
(original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
Thu Mar 31 15:04:53 2011
@@ -448,7 +448,10 @@ public class DirectoryApiConnectionWrapp
                     request.setBase( new Dn( searchBase ) );
                     request.setFilter( filter );
                     request.setScope( convertSearchScope( searchControls ) );
-                    request.addAttributes( searchControls.getReturningAttributes() );
+                    if ( searchControls.getReturningAttributes() != null )
+                    {
+                        request.addAttributes( searchControls.getReturningAttributes() );
+                    }
                     request.addAllControls( convertControls( controls ) );
                     request.setSizeLimit( searchControls.getCountLimit() );
                     request.setTimeLimit( searchControls.getTimeLimit() );
@@ -700,7 +703,7 @@ public class DirectoryApiConnectionWrapp
             for ( ModificationItem modificationItem : modificationItems )
             {
                 Modification modification = new DefaultModification();
-                
+
                 try
                 {
                     modification.setAttribute( AttributeUtils.toClientAttribute( modificationItem.getAttribute()
) );



Mime
View raw message