directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1771554 - /directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/storedProcedure/StoredProcedureRequestImpl.java
Date Sun, 27 Nov 2016 10:35:08 GMT
Author: elecharny
Date: Sun Nov 27 10:35:07 2016
New Revision: 1771554

URL: http://svn.apache.org/viewvc?rev=1771554&view=rev
Log:
Fixed Sonarlint warnings

Modified:
    directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/storedProcedure/StoredProcedureRequestImpl.java

Modified: directory/shared/branches/shared-value/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/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/storedProcedure/StoredProcedureRequestImpl.java?rev=1771554&r1=1771553&r2=1771554&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/storedProcedure/StoredProcedureRequestImpl.java
(original)
+++ directory/shared/branches/shared-value/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/storedProcedure/StoredProcedureRequestImpl.java
Sun Nov 27 10:35:07 2016
@@ -28,7 +28,6 @@ import org.apache.directory.api.asn1.ber
 import org.apache.directory.api.asn1.ber.tlv.IntegerDecoderException;
 import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.message.AbstractExtendedRequest;
-import org.apache.directory.api.util.StringConstants;
 import org.apache.directory.api.util.Strings;
 import org.apache.directory.api.util.exception.NotImplementedException;
 
@@ -42,9 +41,9 @@ public class StoredProcedureRequestImpl
 {
     private String language = "Java";
 
-    private byte[] procedure = StringConstants.EMPTY_BYTES;
+    private byte[] procedure = Strings.EMPTY_BYTES;
 
-    private List<StoredProcedureParameter> parameters = new ArrayList<StoredProcedureParameter>();
+    private List<StoredProcedureParameter> parameters = new ArrayList<>();
 
 
     /**
@@ -91,6 +90,7 @@ public class StoredProcedureRequestImpl
     /**
      * {@inheritDoc}
      */
+    @Override
     public String getLanguage()
     {
         return language;
@@ -100,12 +100,14 @@ public class StoredProcedureRequestImpl
     /**
      * {@inheritDoc}
      */
+    @Override
     public void setLanguage( String language )
     {
         this.language = language;
     }
 
 
+    @Override
     public byte[] getProcedure()
     {
         if ( procedure == null )
@@ -119,6 +121,7 @@ public class StoredProcedureRequestImpl
     }
 
 
+    @Override
     public void setProcedure( byte[] procedure )
     {
         if ( procedure != null )
@@ -133,12 +136,14 @@ public class StoredProcedureRequestImpl
     }
 
 
+    @Override
     public List<StoredProcedureParameter> getParameters()
     {
         return parameters;
     }
 
 
+    @Override
     public void addParameter( StoredProcedureParameter parameter )
     {
         parameters.add( parameter );
@@ -157,6 +162,7 @@ public class StoredProcedureRequestImpl
     /**
      * {@inheritDoc}
      */
+    @Override
     public String getProcedureSpecification()
     {
         return Strings.utf8ToString( procedure );
@@ -166,6 +172,7 @@ public class StoredProcedureRequestImpl
     /**
      * {@inheritDoc}
      */
+    @Override
     public int size()
     {
         return parameters.size();
@@ -175,9 +182,10 @@ public class StoredProcedureRequestImpl
     /**
      * {@inheritDoc}
      */
+    @Override
     public Object getParameterType( int index )
     {
-        if ( !language.equals( "java" ) )
+        if ( !"java".equals( language ) )
         {
             return parameters.get( index ).getType();
         }
@@ -191,7 +199,7 @@ public class StoredProcedureRequestImpl
      */
     public Object getParameterTypeString( int index )
     {
-        if ( !language.equals( "java" ) )
+        if ( !"java".equals( language ) )
         {
             Object obj = parameters.get( index ).getType();
             
@@ -208,6 +216,7 @@ public class StoredProcedureRequestImpl
     /**
      * {@inheritDoc}
      */
+    @Override
     public Class<?> getJavaParameterType( int index )
     {
         throw new NotImplementedException( I18n.err( I18n.ERR_04175 ) );
@@ -217,9 +226,10 @@ public class StoredProcedureRequestImpl
     /**
      * {@inheritDoc}
      */
+    @Override
     public Object getParameterValue( int index )
     {
-        if ( !language.equals( "java" ) )
+        if ( !"java".equals( language ) )
         {
             return parameters.get( index ).getValue();
         }
@@ -233,7 +243,7 @@ public class StoredProcedureRequestImpl
      */
     public Object getParameterValueString( int index )
     {
-        if ( !language.equals( "java" ) )
+        if ( !"java".equals( language ) )
         {
             Object obj = parameters.get( index ).getValue();
             
@@ -242,7 +252,7 @@ public class StoredProcedureRequestImpl
                 String str = Strings.utf8ToString( ( byte[] ) obj );
                 String type = ( String ) getParameterTypeString( index );
 
-                if ( type.equals( "int" ) )
+                if ( "int".equals( type ) )
                 {
                     try
                     {
@@ -268,6 +278,7 @@ public class StoredProcedureRequestImpl
     /**
      * {@inheritDoc}
      */
+    @Override
     public Object getJavaParameterValue( int index )
     {
         throw new NotImplementedException( I18n.err( I18n.ERR_04176 ) );
@@ -277,6 +288,7 @@ public class StoredProcedureRequestImpl
     /**
      * {@inheritDoc}
      */
+    @Override
     public void addParameter( Object type, Object value )
     {
         /**



Mime
View raw message