directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1679749 - in /directory/shared/trunk: dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/ ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/ ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/contr...
Date Sat, 16 May 2015 17:21:39 GMT
Author: elecharny
Date: Sat May 16 17:21:38 2015
New Revision: 1679749

URL: http://svn.apache.org/r1679749
Log:
o Removed some Sonar warnings

Modified:
    directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/AbstractGrammar.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapApiServiceFactory.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/pagedSearch/PagedResultsFactory.java
    directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyImpl.java
    directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/syncrepl/syncState/SyncStateValueImpl.java
    directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/cancel/CancelRequestImpl.java
    directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/certGeneration/CertGenerationRequestImpl.java
    directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/gracefulShutdown/GracefulShutdownRequestImpl.java
    directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/pwdModify/PasswordModifyRequestImpl.java
    directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/startTls/StartTlsRequestImpl.java
    directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/storedProcedure/StoredProcedureRequestImpl.java
    directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/whoAmI/WhoAmIRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/Cursor.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/CursorLdapReferralException.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/exception/LdapSchemaException.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AbstractExtendedRequest.java

Modified: directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/AbstractGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/AbstractGrammar.java?rev=1679749&r1=1679748&r2=1679749&view=diff
==============================================================================
--- directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/AbstractGrammar.java
(original)
+++ directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/AbstractGrammar.java
Sat May 16 17:21:38 2015
@@ -47,9 +47,6 @@ public abstract class AbstractGrammar im
     /** The grammar name */
     protected String name;
 
-    /** The grammar's states */
-    protected Enum<Dsmlv2StatesEnum>[] statesEnum;
-
 
     /**
      * Returns the grammar's name

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapApiServiceFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapApiServiceFactory.java?rev=1679749&r1=1679748&r2=1679749&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapApiServiceFactory.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapApiServiceFactory.java
Sat May 16 17:21:38 2015
@@ -20,7 +20,6 @@
 package org.apache.directory.api.ldap.codec.api;
 
 
-import org.apache.directory.api.ldap.codec.osgi.DefaultLdapCodecService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/pagedSearch/PagedResultsFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/pagedSearch/PagedResultsFactory.java?rev=1679749&r1=1679748&r2=1679749&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/pagedSearch/PagedResultsFactory.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/pagedSearch/PagedResultsFactory.java
Sat May 16 17:21:38 2015
@@ -23,7 +23,6 @@ package org.apache.directory.api.ldap.co
 import org.apache.directory.api.ldap.codec.api.CodecControl;
 import org.apache.directory.api.ldap.codec.api.ControlFactory;
 import org.apache.directory.api.ldap.codec.api.LdapApiService;
-import org.apache.directory.api.ldap.model.message.controls.EntryChange;
 import org.apache.directory.api.ldap.model.message.controls.PagedResults;
 
 

Modified: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyImpl.java?rev=1679749&r1=1679748&r2=1679749&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyImpl.java
(original)
+++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyImpl.java
Sat May 16 17:21:38 2015
@@ -20,9 +20,6 @@
 package org.apache.directory.api.ldap.extras.controls.ppolicy;
 
 
-import org.apache.directory.api.ldap.model.message.Control;
-
-
 /**
  * A simple {@link PasswordPolicy} {@link Control} implementation.
  *

Modified: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/syncrepl/syncState/SyncStateValueImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/syncrepl/syncState/SyncStateValueImpl.java?rev=1679749&r1=1679748&r2=1679749&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/syncrepl/syncState/SyncStateValueImpl.java
(original)
+++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/syncrepl/syncState/SyncStateValueImpl.java
Sat May 16 17:21:38 2015
@@ -22,7 +22,6 @@ package org.apache.directory.api.ldap.ex
 
 import java.util.Arrays;
 
-import org.apache.directory.api.ldap.model.message.Control;
 import org.apache.directory.api.ldap.model.message.controls.AbstractControl;
 import org.apache.directory.api.util.Strings;
 

Modified: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/cancel/CancelRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/cancel/CancelRequestImpl.java?rev=1679749&r1=1679748&r2=1679749&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/cancel/CancelRequestImpl.java
(original)
+++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/cancel/CancelRequestImpl.java
Sat May 16 17:21:38 2015
@@ -79,11 +79,11 @@ public class CancelRequestImpl extends A
 
     public CancelResponse getResultResponse()
     {
-        if ( response == null )
+        if ( getResponse() == null )
         {
-            response = new CancelResponseImpl( cancelId );
+            setResponse( new CancelResponseImpl( cancelId ) );
         }
 
-        return ( CancelResponse ) response;
+        return ( CancelResponse ) getResponse();
     }
 }

Modified: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/certGeneration/CertGenerationRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/certGeneration/CertGenerationRequestImpl.java?rev=1679749&r1=1679748&r2=1679749&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/certGeneration/CertGenerationRequestImpl.java
(original)
+++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/certGeneration/CertGenerationRequestImpl.java
Sat May 16 17:21:38 2015
@@ -20,6 +20,8 @@
 package org.apache.directory.api.ldap.extras.extended.certGeneration;
 
 
+import org.apache.directory.api.ldap.extras.extended.gracefulShutdown.GracefulShutdownResponse;
+import org.apache.directory.api.ldap.extras.extended.gracefulShutdown.GracefulShutdownResponseImpl;
 import org.apache.directory.api.ldap.model.message.AbstractExtendedRequest;
 
 
@@ -151,7 +153,12 @@ public class CertGenerationRequestImpl e
     @Override
     public CertGenerationResponse getResultResponse()
     {
-        return new CertGenerationResponseImpl();
+        if ( getResponse() == null )
+        {
+            setResponse( new CertGenerationResponseImpl() );
+        }
+
+        return ( CertGenerationResponse ) getResponse();
     }
 
 

Modified: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/gracefulShutdown/GracefulShutdownRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/gracefulShutdown/GracefulShutdownRequestImpl.java?rev=1679749&r1=1679748&r2=1679749&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/gracefulShutdown/GracefulShutdownRequestImpl.java
(original)
+++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/gracefulShutdown/GracefulShutdownRequestImpl.java
Sat May 16 17:21:38 2015
@@ -34,8 +34,6 @@ import org.apache.directory.api.ldap.mod
  */
 public class GracefulShutdownRequestImpl extends AbstractExtendedRequest implements GracefulShutdownRequest
 {
-    private GracefulShutdownResponse response;
-
     /** Offline time after disconnection */
     private int timeOffline;
 
@@ -124,11 +122,11 @@ public class GracefulShutdownRequestImpl
     @Override
     public GracefulShutdownResponse getResultResponse()
     {
-        if ( response == null )
+        if ( getResponse() == null )
         {
-            response = new GracefulShutdownResponseImpl();
+            setResponse( new GracefulShutdownResponseImpl() );
         }
 
-        return response;
+        return ( GracefulShutdownResponse ) getResponse();
     }
 }

Modified: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/pwdModify/PasswordModifyRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/pwdModify/PasswordModifyRequestImpl.java?rev=1679749&r1=1679748&r2=1679749&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/pwdModify/PasswordModifyRequestImpl.java
(original)
+++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/pwdModify/PasswordModifyRequestImpl.java
Sat May 16 17:21:38 2015
@@ -129,12 +129,12 @@ public class PasswordModifyRequestImpl e
     @Override
     public PasswordModifyResponse getResultResponse()
     {
-        if ( response == null )
+        if ( getResponse() == null )
         {
-            response = new PasswordModifyResponseImpl( getMessageId() );
+            setResponse( new PasswordModifyResponseImpl( getMessageId() ) );
         }
 
-        return ( PasswordModifyResponse ) response;
+        return ( PasswordModifyResponse ) getResponse();
     }
 
 

Modified: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/startTls/StartTlsRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/startTls/StartTlsRequestImpl.java?rev=1679749&r1=1679748&r2=1679749&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/startTls/StartTlsRequestImpl.java
(original)
+++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/startTls/StartTlsRequestImpl.java
Sat May 16 17:21:38 2015
@@ -57,12 +57,12 @@ public class StartTlsRequestImpl extends
     @Override
     public StartTlsResponse getResultResponse()
     {
-        if ( response == null )
+        if ( getResponse() == null )
         {
-            response = new StartTlsResponseImpl( getMessageId() );
+            setResponse( new StartTlsResponseImpl( getMessageId() ) );
         }
 
-        return ( StartTlsResponse ) response;
+        return ( StartTlsResponse ) getResponse();
     }
 
 

Modified: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/storedProcedure/StoredProcedureRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/storedProcedure/StoredProcedureRequestImpl.java?rev=1679749&r1=1679748&r2=1679749&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/storedProcedure/StoredProcedureRequestImpl.java
(original)
+++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/storedProcedure/StoredProcedureRequestImpl.java
Sat May 16 17:21:38 2015
@@ -46,8 +46,6 @@ public class StoredProcedureRequestImpl
 
     private List<StoredProcedureParameter> parameters = new ArrayList<StoredProcedureParameter>();
 
-    private StoredProcedureResponse response;
-
 
     /**
      * Instantiates a new stored procedure request.
@@ -321,13 +319,11 @@ public class StoredProcedureRequestImpl
      */
     public StoredProcedureResponse getResultResponse()
     {
-        if ( response == null )
+        if ( getResponse() == null )
         {
-            StoredProcedureResponseImpl spr = new StoredProcedureResponseImpl( getMessageId()
);
-            spr.setResponseName( EXTENSION_OID );
-            response = spr;
+            setResponse( new StoredProcedureResponseImpl( getMessageId() ) );
         }
 
-        return response;
+        return ( StoredProcedureResponse ) getResponse();
     }
 }

Modified: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/whoAmI/WhoAmIRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/whoAmI/WhoAmIRequestImpl.java?rev=1679749&r1=1679748&r2=1679749&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/whoAmI/WhoAmIRequestImpl.java
(original)
+++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/whoAmI/WhoAmIRequestImpl.java
Sat May 16 17:21:38 2015
@@ -57,12 +57,12 @@ public class WhoAmIRequestImpl extends A
     @Override
     public WhoAmIResponse getResultResponse()
     {
-        if ( response == null )
+        if ( getResponse() == null )
         {
-            response = new WhoAmIResponseImpl( getMessageId() );
+            setResponse( new WhoAmIResponseImpl( getMessageId() ) );
         }
 
-        return ( WhoAmIResponse ) response;
+        return ( WhoAmIResponse ) getResponse();
     }
 
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/Cursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/Cursor.java?rev=1679749&r1=1679748&r2=1679749&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/Cursor.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/Cursor.java
Sat May 16 17:21:38 2015
@@ -19,8 +19,6 @@
 package org.apache.directory.api.ldap.model.cursor;
 
 
-import java.io.IOException;
-
 import org.apache.directory.api.ldap.model.exception.LdapException;
 
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/CursorLdapReferralException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/CursorLdapReferralException.java?rev=1679749&r1=1679748&r2=1679749&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/CursorLdapReferralException.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/CursorLdapReferralException.java
Sat May 16 17:21:38 2015
@@ -19,7 +19,6 @@
 package org.apache.directory.api.ldap.model.cursor;
 
 
-import org.apache.directory.api.ldap.model.exception.LdapException;
 import org.apache.directory.api.ldap.model.exception.LdapReferralException;
 import org.apache.directory.api.ldap.model.message.ResultCodeEnum;
 import org.apache.directory.api.ldap.model.name.Dn;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/exception/LdapSchemaException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/exception/LdapSchemaException.java?rev=1679749&r1=1679748&r2=1679749&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/exception/LdapSchemaException.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/exception/LdapSchemaException.java
Sat May 16 17:21:38 2015
@@ -20,7 +20,6 @@
 package org.apache.directory.api.ldap.model.exception;
 
 
-import org.apache.directory.api.ldap.model.schema.SchemaManager;
 import org.apache.directory.api.ldap.model.schema.SchemaObject;
 
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AbstractExtendedRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AbstractExtendedRequest.java?rev=1679749&r1=1679748&r2=1679749&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AbstractExtendedRequest.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AbstractExtendedRequest.java
Sat May 16 17:21:38 2015
@@ -33,7 +33,7 @@ public abstract class AbstractExtendedRe
     private String oid;
 
     /** The associated response */
-    protected ExtendedResponse response;
+    private ExtendedResponse response;
 
 
     /**
@@ -150,6 +150,24 @@ public abstract class AbstractExtendedRe
 
 
     /**
+     * @return the response
+     */
+    public ExtendedResponse getResponse()
+    {
+        return response;
+    }
+
+
+    /**
+     * @param response the response to set
+     */
+    public void setResponse( ExtendedResponse response )
+    {
+        this.response = response;
+    }
+
+
+    /**
      * {@inheritDoc}
      */
     @Override



Mime
View raw message