directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1771880 [3/8] - in /directory/shared/trunk: integ/src/test/java/org/apache/directory/api/ldap/entry/ ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/ ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/ l...
Date Tue, 29 Nov 2016 10:48:28 GMT
Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AddRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AddRequestImpl.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AddRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AddRequestImpl.java Tue Nov 29 10:48:26 2016
@@ -136,6 +136,7 @@ public class AddRequestImpl extends Abst
      * 
      * @return the Dn of the added entry.
      */
+    @Override
     public Dn getEntryDn()
     {
         return entry.getDn();
@@ -145,6 +146,7 @@ public class AddRequestImpl extends Abst
     /**
      * {@inheritDoc}
      */
+    @Override
     public AddRequest setEntryDn( Dn dn )
     {
         entry.setDn( dn );
@@ -156,6 +158,7 @@ public class AddRequestImpl extends Abst
     /**
      * {@inheritDoc}
      */
+    @Override
     public Entry getEntry()
     {
         return entry;
@@ -165,6 +168,7 @@ public class AddRequestImpl extends Abst
     /**
      * {@inheritDoc}
      */
+    @Override
     public AddRequest setEntry( Entry entry )
     {
         this.entry = entry;
@@ -176,6 +180,7 @@ public class AddRequestImpl extends Abst
     /**
      * {@inheritDoc}
      */
+    @Override
     public AddRequest setMessageId( int messageId )
     {
         super.setMessageId( messageId );
@@ -187,6 +192,7 @@ public class AddRequestImpl extends Abst
     /**
      * {@inheritDoc}
      */
+    @Override
     public AddRequest addControl( Control control )
     {
         return ( AddRequest ) super.addControl( control );
@@ -196,6 +202,7 @@ public class AddRequestImpl extends Abst
     /**
      * {@inheritDoc}
      */
+    @Override
     public AddRequest addAllControls( Control[] controls )
     {
         return ( AddRequest ) super.addAllControls( controls );
@@ -205,6 +212,7 @@ public class AddRequestImpl extends Abst
     /**
      * {@inheritDoc}
      */
+    @Override
     public AddRequest removeControl( Control control )
     {
         return ( AddRequest ) super.removeControl( control );
@@ -221,6 +229,7 @@ public class AddRequestImpl extends Abst
      * 
      * @return the message type of the response.
      */
+    @Override
     public MessageTypeEnum getResponseType()
     {
         return MessageTypeEnum.ADD_RESPONSE;
@@ -232,6 +241,7 @@ public class AddRequestImpl extends Abst
      * 
      * @return the result containing response for this request
      */
+    @Override
     public AddResponse getResultResponse()
     {
         if ( response == null )
@@ -255,6 +265,7 @@ public class AddRequestImpl extends Abst
      * @param obj the object to test for equality to this
      * @return true if the obj is equal to this AddRequest, false otherwise
      */
+    @Override
     public boolean equals( Object obj )
     {
         // Short circuit
@@ -279,11 +290,11 @@ public class AddRequestImpl extends Abst
         // Check the entry
         if ( entry == null )
         {
-            return ( req.getEntry() == null );
+            return req.getEntry() == null;
         }
         else
         {
-            return ( entry.equals( req.getEntry() ) );
+            return entry.equals( req.getEntry() );
         }
     }
 
@@ -292,6 +303,7 @@ public class AddRequestImpl extends Abst
      * @see Object#hashCode()
      * @return the instance's hash code 
      */
+    @Override
     public int hashCode()
     {
         int hash = 37;
@@ -306,6 +318,7 @@ public class AddRequestImpl extends Abst
     /**
      * @see Object#toString()
      */
+    @Override
     public String toString()
     {
         StringBuilder sb = new StringBuilder();

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AddResponseImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AddResponseImpl.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AddResponseImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AddResponseImpl.java Tue Nov 29 10:48:26 2016
@@ -55,6 +55,7 @@ public class AddResponseImpl extends Abs
      * 
      * @return An AddResponse String
      */
+    @Override
     public String toString()
     {
         StringBuilder sb = new StringBuilder();

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AliasDerefMode.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AliasDerefMode.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AliasDerefMode.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AliasDerefMode.java Tue Nov 29 10:48:26 2016
@@ -97,19 +97,21 @@ public enum AliasDerefMode
         }
         else
         {
-            if ( property.trim().equalsIgnoreCase( "always" ) )
+            String trimmedProperty = property.trim();
+            
+            if ( "always".equalsIgnoreCase( trimmedProperty ) )
             {
                 return DEREF_ALWAYS;
             }
-            else if ( property.trim().equalsIgnoreCase( "never" ) )
+            else if ( "never".equalsIgnoreCase( trimmedProperty ) )
             {
                 return NEVER_DEREF_ALIASES;
             }
-            else if ( property.trim().equalsIgnoreCase( "finding" ) )
+            else if ( "finding".equalsIgnoreCase( trimmedProperty ) )
             {
                 return DEREF_FINDING_BASE_OBJ;
             }
-            else if ( property.trim().equalsIgnoreCase( "searching" ) )
+            else if ( "searching".equalsIgnoreCase( trimmedProperty ) )
             {
                 return DEREF_IN_SEARCHING;
             }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/BindRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/BindRequest.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/BindRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/BindRequest.java Tue Nov 29 10:48:26 2016
@@ -204,23 +204,27 @@ public interface BindRequest extends Sin
     /**
      * {@inheritDoc}
      */
+    @Override
     BindRequest setMessageId( int messageId );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     BindRequest addControl( Control control );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     BindRequest addAllControls( Control[] controls );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     BindRequest removeControl( Control control );
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/BindRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/BindRequestImpl.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/BindRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/BindRequestImpl.java Tue Nov 29 10:48:26 2016
@@ -93,6 +93,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean isSimple()
     {
         return isSimple;
@@ -102,6 +103,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean getSimple()
     {
         return isSimple;
@@ -111,6 +113,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public BindRequest setSimple( boolean simple )
     {
         this.isSimple = simple;
@@ -122,6 +125,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public byte[] getCredentials()
     {
         return credentials;
@@ -131,6 +135,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public BindRequest setCredentials( String credentials )
     {
         return setCredentials( Strings.getBytesUtf8( credentials ) );
@@ -140,6 +145,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public BindRequest setCredentials( byte[] credentials )
     {
         if ( credentials != null )
@@ -174,6 +180,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public String getSaslMechanism()
     {
         return mechanism;
@@ -183,6 +190,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public BindRequest setSaslMechanism( String saslMechanism )
     {
         this.isSimple = false;
@@ -195,6 +203,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public String getName()
     {
         return name;
@@ -204,6 +213,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public BindRequest setName( String name )
     {
         this.name = name;
@@ -226,6 +236,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public Dn getDn()
     {
         return dn;
@@ -235,6 +246,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public BindRequest setDn( Dn dn )
     {
         this.dn = dn;
@@ -247,6 +259,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean isVersion3()
     {
         return isVersion3;
@@ -256,6 +269,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean getVersion3()
     {
         return isVersion3;
@@ -265,6 +279,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public BindRequest setVersion3( boolean version3 )
     {
         this.isVersion3 = version3;
@@ -276,6 +291,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public BindRequest setMessageId( int messageId )
     {
         super.setMessageId( messageId );
@@ -287,6 +303,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public BindRequest addControl( Control control )
     {
         return ( BindRequest ) super.addControl( control );
@@ -296,6 +313,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public BindRequest addAllControls( Control[] controls )
     {
         return ( BindRequest ) super.addAllControls( controls );
@@ -305,6 +323,7 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public BindRequest removeControl( Control control )
     {
         return ( BindRequest ) super.removeControl( control );
@@ -320,6 +339,7 @@ public class BindRequestImpl extends Abs
      * 
      * @return the message type of the response.
      */
+    @Override
     public MessageTypeEnum getResponseType()
     {
         return MessageTypeEnum.BIND_RESPONSE;
@@ -331,6 +351,7 @@ public class BindRequestImpl extends Abs
      * 
      * @return the result containing response for this request
      */
+    @Override
     public BindResponse getResultResponse()
     {
         if ( response == null )
@@ -346,6 +367,7 @@ public class BindRequestImpl extends Abs
      * RFC 2251/4511 [Section 4.11]: Abandon, Bind, Unbind, and StartTLS operations
      * cannot be abandoned.
      */
+    @Override
     public void abandon()
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_04185 ) );
@@ -457,9 +479,10 @@ public class BindRequestImpl extends Abs
      * 
      * @return A BindRequest String
      */
+    @Override
     public String toString()
     {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         sb.append( "    BindRequest\n" );
         sb.append( "        Version : '" ).append( isVersion3 ? "3" : "2" ).append( "'\n" );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/BindResponseImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/BindResponseImpl.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/BindResponseImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/BindResponseImpl.java Tue Nov 29 10:48:26 2016
@@ -72,6 +72,7 @@ public class BindResponseImpl extends Ab
      * 
      * @return the sasl mech. specific credentials or null of auth. is simple
      */
+    @Override
     public byte[] getServerSaslCreds()
     {
         if ( serverSaslCreds == null )
@@ -93,6 +94,7 @@ public class BindResponseImpl extends Ab
      * @param serverSaslCreds
      *            the sasl auth. mech. specific credentials
      */
+    @Override
     public void setServerSaslCreds( byte[] serverSaslCreds )
     {
         if ( serverSaslCreds != null )
@@ -132,6 +134,7 @@ public class BindResponseImpl extends Ab
      *            the object to test for equality with this BindResponse
      * @return true if obj equals this BindResponse false otherwise
      */
+    @Override
     public boolean equals( Object obj )
     {
         // quickly return true if obj is this one
@@ -174,6 +177,7 @@ public class BindResponseImpl extends Ab
      * 
      * @return A BindResponse String
      */
+    @Override
     public String toString()
     {
         StringBuilder sb = new StringBuilder();

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/CompareRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/CompareRequest.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/CompareRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/CompareRequest.java Tue Nov 29 10:48:26 2016
@@ -97,23 +97,27 @@ public interface CompareRequest extends
     /**
      * {@inheritDoc}
      */
+    @Override
     CompareRequest setMessageId( int messageId );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     CompareRequest addControl( Control control );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     CompareRequest addAllControls( Control[] controls );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     CompareRequest removeControl( Control control );
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/CompareRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/CompareRequestImpl.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/CompareRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/CompareRequestImpl.java Tue Nov 29 10:48:26 2016
@@ -72,6 +72,7 @@ public class CompareRequestImpl extends
      * 
      * @return the Dn of the compared entry.
      */
+    @Override
     public Dn getName()
     {
         return name;
@@ -81,6 +82,7 @@ public class CompareRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public CompareRequest setName( Dn name )
     {
         this.name = name;
@@ -94,6 +96,7 @@ public class CompareRequestImpl extends
      * 
      * @return the attribute value to used in comparison.
      */
+    @Override
     public Value<?> getAssertionValue()
     {
         return attrVal;
@@ -103,6 +106,7 @@ public class CompareRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public CompareRequest setAssertionValue( String value )
     {
         this.attrVal = new StringValue( value );
@@ -114,6 +118,7 @@ public class CompareRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public CompareRequest setAssertionValue( byte[] value )
     {
         if ( value != null )
@@ -134,6 +139,7 @@ public class CompareRequestImpl extends
      * 
      * @return the attribute id used in comparison.
      */
+    @Override
     public String getAttributeId()
     {
         return attrId;
@@ -143,6 +149,7 @@ public class CompareRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public CompareRequest setAttributeId( String attributeId )
     {
         this.attrId = attributeId;
@@ -154,6 +161,7 @@ public class CompareRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public CompareRequest setMessageId( int messageId )
     {
         super.setMessageId( messageId );
@@ -165,6 +173,7 @@ public class CompareRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public CompareRequest addControl( Control control )
     {
         return ( CompareRequest ) super.addControl( control );
@@ -174,6 +183,7 @@ public class CompareRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public CompareRequest addAllControls( Control[] controls )
     {
         return ( CompareRequest ) super.addAllControls( controls );
@@ -183,6 +193,7 @@ public class CompareRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public CompareRequest removeControl( Control control )
     {
         return ( CompareRequest ) super.removeControl( control );
@@ -199,6 +210,7 @@ public class CompareRequestImpl extends
      * 
      * @return the message type of the response.
      */
+    @Override
     public MessageTypeEnum getResponseType()
     {
         return MessageTypeEnum.COMPARE_RESPONSE;
@@ -210,6 +222,7 @@ public class CompareRequestImpl extends
      * 
      * @return the result containing response for this request
      */
+    @Override
     public CompareResponse getResultResponse()
     {
         if ( response == null )
@@ -257,6 +270,7 @@ public class CompareRequestImpl extends
      * @param obj the obj to compare with this CompareRequest
      * @return true if the obj is equal to this request, false otherwise
      */
+    @Override
     public boolean equals( Object obj )
     {
         if ( obj == this )
@@ -271,21 +285,21 @@ public class CompareRequestImpl extends
 
         CompareRequest req = ( CompareRequest ) obj;
         Dn reqName = req.getName();
-
+        
         if ( ( name != null ) && ( reqName == null ) )
         {
             return false;
         }
 
         if ( ( name == null ) && ( reqName != null ) )
-        {
-            return false;
-        }
+            {
+                return false;
+            }
 
         if ( ( name != null ) && ( reqName != null ) && !name.equals( req.getName() ) )
         {
-            return false;
-        }
+                return false;
+            }
 
         String reqId = req.getAttributeId();
 
@@ -295,14 +309,14 @@ public class CompareRequestImpl extends
         }
 
         if ( ( attrId == null ) && ( reqId != null ) )
-        {
-            return false;
-        }
+            {
+                return false;
+            }
 
         if ( ( attrId != null ) && ( reqId != null ) && !attrId.equals( reqId ) )
         {
-            return false;
-        }
+                return false;
+            }
 
         Value<?> reqVal = req.getAssertionValue();
 
@@ -329,6 +343,7 @@ public class CompareRequestImpl extends
      * 
      * @return A Compare Request String
      */
+    @Override
     public String toString()
     {
         StringBuilder sb = new StringBuilder();

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/CompareResponseImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/CompareResponseImpl.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/CompareResponseImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/CompareResponseImpl.java Tue Nov 29 10:48:26 2016
@@ -53,6 +53,7 @@ public class CompareResponseImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean isTrue()
     {
         return ldapResult.getResultCode() == ResultCodeEnum.COMPARE_TRUE;
@@ -64,6 +65,7 @@ public class CompareResponseImpl extends
      * 
      * @return An CompareResponse String
      */
+    @Override
     public String toString()
     {
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/DeleteRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/DeleteRequest.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/DeleteRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/DeleteRequest.java Tue Nov 29 10:48:26 2016
@@ -53,23 +53,27 @@ public interface DeleteRequest extends S
     /**
      * {@inheritDoc}
      */
+    @Override
     DeleteRequest setMessageId( int messageId );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     DeleteRequest addControl( Control control );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     DeleteRequest addAllControls( Control[] controls );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     DeleteRequest removeControl( Control control );
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/DeleteRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/DeleteRequestImpl.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/DeleteRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/DeleteRequestImpl.java Tue Nov 29 10:48:26 2016
@@ -62,6 +62,7 @@ public class DeleteRequestImpl extends A
      * 
      * @return the Dn of the leaf entry to delete.
      */
+    @Override
     public Dn getName()
     {
         return name;
@@ -71,6 +72,7 @@ public class DeleteRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public DeleteRequest setName( Dn name )
     {
         this.name = name;
@@ -82,6 +84,7 @@ public class DeleteRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public DeleteRequest setMessageId( int messageId )
     {
         super.setMessageId( messageId );
@@ -93,6 +96,7 @@ public class DeleteRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public DeleteRequest addControl( Control control )
     {
         return ( DeleteRequest ) super.addControl( control );
@@ -102,6 +106,7 @@ public class DeleteRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public DeleteRequest addAllControls( Control[] controls )
     {
         return ( DeleteRequest ) super.addAllControls( controls );
@@ -111,6 +116,7 @@ public class DeleteRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public DeleteRequest removeControl( Control control )
     {
         return ( DeleteRequest ) super.removeControl( control );
@@ -127,6 +133,7 @@ public class DeleteRequestImpl extends A
      * 
      * @return the message type of the response.
      */
+    @Override
     public MessageTypeEnum getResponseType()
     {
         return MessageTypeEnum.DEL_RESPONSE;
@@ -138,6 +145,7 @@ public class DeleteRequestImpl extends A
      * 
      * @return the result containing response for this request
      */
+    @Override
     public DeleteResponse getResultResponse()
     {
         if ( response == null )
@@ -178,6 +186,7 @@ public class DeleteRequestImpl extends A
      * @param obj the object to test for equality to this
      * @return true if the obj is equal to this DeleteRequest, false otherwise
      */
+    @Override
     public boolean equals( Object obj )
     {
         if ( this == obj )
@@ -216,6 +225,7 @@ public class DeleteRequestImpl extends A
      * 
      * @return A DelRequest String
      */
+    @Override
     public String toString()
     {
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/DeleteResponseImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/DeleteResponseImpl.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/DeleteResponseImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/DeleteResponseImpl.java Tue Nov 29 10:48:26 2016
@@ -55,6 +55,7 @@ public class DeleteResponseImpl extends
      * 
      * @return A DelResponse String
      */
+    @Override
     public String toString()
     {
         StringBuilder sb = new StringBuilder();

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedRequest.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedRequest.java Tue Nov 29 10:48:26 2016
@@ -75,23 +75,27 @@ public interface ExtendedRequest extends
     /**
      * {@inheritDoc}
      */
+    @Override
     ExtendedRequest setMessageId( int messageId );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     ExtendedRequest addControl( Control control );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     ExtendedRequest addAllControls( Control[] controls );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     ExtendedRequest removeControl( Control control );
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedRequestImpl.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedRequestImpl.java Tue Nov 29 10:48:26 2016
@@ -56,6 +56,7 @@ public class ExtendedRequestImpl extends
      * 
      * @return the dotted-decimal representation as a String of the OID
      */
+    @Override
     public String getRequestName()
     {
         return oid;
@@ -67,6 +68,7 @@ public class ExtendedRequestImpl extends
      * 
      * @param newOid the dotted-decimal representation as a String of the OID
      */
+    @Override
     public ExtendedRequest setRequestName( String newOid )
     {
         this.oid = newOid;
@@ -78,6 +80,7 @@ public class ExtendedRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public ExtendedRequest setMessageId( int messageId )
     {
         super.setMessageId( messageId );
@@ -89,6 +92,7 @@ public class ExtendedRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public ExtendedRequest addControl( Control control )
     {
         return ( ExtendedRequest ) super.addControl( control );
@@ -98,6 +102,7 @@ public class ExtendedRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public ExtendedRequest addAllControls( Control[] controls )
     {
         return ( ExtendedRequest ) super.addAllControls( controls );
@@ -107,6 +112,7 @@ public class ExtendedRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public ExtendedRequest removeControl( Control control )
     {
         return ( ExtendedRequest ) super.removeControl( control );
@@ -123,6 +129,7 @@ public class ExtendedRequestImpl extends
      * 
      * @return the message type of the response.
      */
+    @Override
     public MessageTypeEnum getResponseType()
     {
         return MessageTypeEnum.EXTENDED_RESPONSE;
@@ -148,6 +155,7 @@ public class ExtendedRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public ExtendedResponse getResultResponse()
     {
         return getExtendedResponse();
@@ -177,6 +185,7 @@ public class ExtendedRequestImpl extends
      * @param obj the object to be checked for equality
      * @return true if the obj equals this ExtendedRequest, false otherwise
      */
+    @Override
     public boolean equals( Object obj )
     {
         if ( obj == this )
@@ -220,9 +229,10 @@ public class ExtendedRequestImpl extends
      * 
      * @return an Extended Request String
      */
+    @Override
     public String toString()
     {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         sb.append( "    Extended request\n" );
         sb.append( "        Request name : '" ).append( oid ).append( "'\n" );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedResponseImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedResponseImpl.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedResponseImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedResponseImpl.java Tue Nov 29 10:48:26 2016
@@ -79,9 +79,10 @@ public class ExtendedResponseImpl extend
      * 
      * @return the responseName of the extended response
      */
+    @Override
     public String getResponseName()
     {
-        return ( ( responseName == null ) ? "" : responseName );
+        return ( responseName == null ) ? "" : responseName;
     }
 
 
@@ -91,6 +92,7 @@ public class ExtendedResponseImpl extend
      * 
      * @param responseName the OID of the extended response type.
      */
+    @Override
     public void setResponseName( String responseName )
     {
         this.responseName = responseName;
@@ -123,6 +125,7 @@ public class ExtendedResponseImpl extend
      *            the object to be checked for equality
      * @return true if the obj equals this ExtendedRequest, false otherwise
      */
+    @Override
     public boolean equals( Object obj )
     {
         if ( obj == this )
@@ -167,6 +170,7 @@ public class ExtendedResponseImpl extend
      * 
      * @return An ExtendedResponse String
      */
+    @Override
     public String toString()
     {
         StringBuilder sb = new StringBuilder();

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/IntermediateResponseImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/IntermediateResponseImpl.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/IntermediateResponseImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/IntermediateResponseImpl.java Tue Nov 29 10:48:26 2016
@@ -56,6 +56,7 @@ public class IntermediateResponseImpl ex
      * 
      * @return the response value
      */
+    @Override
     public byte[] getResponseValue()
     {
         if ( responseValue == null )
@@ -74,6 +75,7 @@ public class IntermediateResponseImpl ex
      * 
      * @param value the response value.
      */
+    @Override
     public void setResponseValue( byte[] value )
     {
         if ( value != null )
@@ -94,9 +96,10 @@ public class IntermediateResponseImpl ex
      * 
      * @return the OID of the Intermediate response type.
      */
+    @Override
     public String getResponseName()
     {
-        return ( ( responseName == null ) ? "" : responseName );
+        return ( responseName == null ) ? "" : responseName;
     }
 
 
@@ -106,6 +109,7 @@ public class IntermediateResponseImpl ex
      * 
      * @param oid the OID of the Intermediate response type.
      */
+    @Override
     public void setResponseName( String oid )
     {
         this.responseName = oid;
@@ -139,6 +143,7 @@ public class IntermediateResponseImpl ex
      * @param obj the object to be checked for equality
      * @return true if the obj equals this IntemediateResponse, false otherwise
      */
+    @Override
     public boolean equals( Object obj )
     {
         if ( obj == this )
@@ -184,8 +189,8 @@ public class IntermediateResponseImpl ex
             return false;
         }
 
-        return ( ( responseValue == null ) || ( resp.getResponseValue() == null )
-        || Arrays.equals( responseValue, resp.getResponseValue() ) );
+        return ( responseValue == null ) || ( resp.getResponseValue() == null )
+        || Arrays.equals( responseValue, resp.getResponseValue() );
     }
 
 
@@ -194,6 +199,7 @@ public class IntermediateResponseImpl ex
      * 
      * @return An IntermediateResponse String
      */
+    @Override
     public String toString()
     {
         StringBuilder sb = new StringBuilder();

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/LdapResultImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/LdapResultImpl.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/LdapResultImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/LdapResultImpl.java Tue Nov 29 10:48:26 2016
@@ -53,6 +53,7 @@ public class LdapResultImpl implements L
     /**
      * {@inheritDoc}
      */
+    @Override
     public String getDiagnosticMessage()
     {
         return diagnosticMessage;
@@ -62,6 +63,7 @@ public class LdapResultImpl implements L
     /**
      * {@inheritDoc}
      */
+    @Override
     public void setDiagnosticMessage( String diagnosticMessage )
     {
         this.diagnosticMessage = diagnosticMessage;
@@ -72,6 +74,7 @@ public class LdapResultImpl implements L
     /**
      * {@inheritDoc}
      */
+    @Override
     public Dn getMatchedDn()
     {
         return matchedDn;
@@ -81,6 +84,7 @@ public class LdapResultImpl implements L
     /**
      * {@inheritDoc}
      */
+    @Override
     public void setMatchedDn( Dn matchedDn )
     {
         this.matchedDn = matchedDn;
@@ -91,6 +95,7 @@ public class LdapResultImpl implements L
     /**
      * {@inheritDoc}
      */
+    @Override
     public ResultCodeEnum getResultCode()
     {
         return resultCode;
@@ -100,17 +105,19 @@ public class LdapResultImpl implements L
     /**
      * {@inheritDoc}
      */
+    @Override
     public void setResultCode( ResultCodeEnum resultCode )
     {
         this.resultCode = resultCode;
 
-        isDefaultSuccess = isDefaultSuccess & ( resultCode == ResultCodeEnum.SUCCESS );
+        isDefaultSuccess = isDefaultSuccess && ( resultCode == ResultCodeEnum.SUCCESS );
     }
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     public Referral getReferral()
     {
         return referral;
@@ -120,6 +127,7 @@ public class LdapResultImpl implements L
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean isReferral()
     {
         return referral != null;
@@ -129,6 +137,7 @@ public class LdapResultImpl implements L
     /**
      * {@inheritDoc}
      */
+    @Override
     public void setReferral( Referral referral )
     {
         this.referral = referral;
@@ -139,6 +148,7 @@ public class LdapResultImpl implements L
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean isDefaultSuccess()
     {
         return isDefaultSuccess;
@@ -149,6 +159,7 @@ public class LdapResultImpl implements L
      * @see Object#hashCode()
      * @return the instance's hash code 
      */
+    @Override
     public int hashCode()
     {
         int hash = 37;
@@ -178,6 +189,7 @@ public class LdapResultImpl implements L
      * @param obj The object to compare with
      * @return <code>true</code> if both objects are equals
      */
+    @Override
     public boolean equals( Object obj )
     {
         // quickly return true if this is the obj
@@ -256,6 +268,7 @@ public class LdapResultImpl implements L
      * 
      * @return A LdapResult String
      */
+    @Override
     public String toString()
     {
         StringBuilder sb = new StringBuilder();

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyDnRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyDnRequest.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyDnRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyDnRequest.java Tue Nov 29 10:48:26 2016
@@ -165,23 +165,27 @@ public interface ModifyDnRequest extends
     /**
      * {@inheritDoc}
      */
+    @Override
     ModifyDnRequest setMessageId( int messageId );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     ModifyDnRequest addControl( Control control );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     ModifyDnRequest addAllControls( Control[] controls );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     ModifyDnRequest removeControl( Control control );
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyDnRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyDnRequestImpl.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyDnRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyDnRequestImpl.java Tue Nov 29 10:48:26 2016
@@ -69,6 +69,7 @@ public class ModifyDnRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean getDeleteOldRdn()
     {
         return deleteOldRdn;
@@ -78,6 +79,7 @@ public class ModifyDnRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyDnRequest setDeleteOldRdn( boolean deleteOldRdn )
     {
         this.deleteOldRdn = deleteOldRdn;
@@ -89,6 +91,7 @@ public class ModifyDnRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean isMove()
     {
         return newSuperior != null;
@@ -98,6 +101,7 @@ public class ModifyDnRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public Dn getName()
     {
         return name;
@@ -107,6 +111,7 @@ public class ModifyDnRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyDnRequest setName( Dn name )
     {
         this.name = name;
@@ -118,6 +123,7 @@ public class ModifyDnRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public Rdn getNewRdn()
     {
         return newRdn;
@@ -127,6 +133,7 @@ public class ModifyDnRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyDnRequest setNewRdn( Rdn newRdn )
     {
         this.newRdn = newRdn;
@@ -138,6 +145,7 @@ public class ModifyDnRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public Dn getNewSuperior()
     {
         return newSuperior;
@@ -147,6 +155,7 @@ public class ModifyDnRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyDnRequest setNewSuperior( Dn newSuperior )
     {
         this.newSuperior = newSuperior;
@@ -158,6 +167,7 @@ public class ModifyDnRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyDnRequest setMessageId( int messageId )
     {
         super.setMessageId( messageId );
@@ -169,6 +179,7 @@ public class ModifyDnRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyDnRequest addControl( Control control )
     {
         return ( ModifyDnRequest ) super.addControl( control );
@@ -178,6 +189,7 @@ public class ModifyDnRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyDnRequest addAllControls( Control[] controls )
     {
         return ( ModifyDnRequest ) super.addAllControls( controls );
@@ -187,6 +199,7 @@ public class ModifyDnRequestImpl extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyDnRequest removeControl( Control control )
     {
         return ( ModifyDnRequest ) super.removeControl( control );
@@ -203,6 +216,7 @@ public class ModifyDnRequestImpl extends
      * 
      * @return the message type of the response.
      */
+    @Override
     public MessageTypeEnum getResponseType()
     {
         return MessageTypeEnum.MODIFYDN_RESPONSE;
@@ -214,6 +228,7 @@ public class ModifyDnRequestImpl extends
      * 
      * @return the result containing response for this request
      */
+    @Override
     public ModifyDnResponse getResultResponse()
     {
         if ( response == null )
@@ -259,6 +274,7 @@ public class ModifyDnRequestImpl extends
      * @param obj the object to compare with this stub
      * @return true if the obj is equal to this stub, false otherwise
      */
+    @Override
     public boolean equals( Object obj )
     {
         if ( obj == this )
@@ -318,8 +334,8 @@ public class ModifyDnRequestImpl extends
             return false;
         }
 
-        return ( ( newSuperior == null ) || ( req.getNewSuperior() == null ) || newSuperior.equals( req
-            .getNewSuperior() ) );
+        return ( newSuperior == null ) || ( req.getNewSuperior() == null ) || newSuperior.equals( req
+            .getNewSuperior() );
     }
 
 
@@ -328,10 +344,11 @@ public class ModifyDnRequestImpl extends
      * 
      * @return A ModifyDNRequest String
      */
+    @Override
     public String toString()
     {
 
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         sb.append( "    ModifyDN Response\n" );
         sb.append( "        Entry : '" ).append( name ).append( "'\n" );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyDnResponseImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyDnResponseImpl.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyDnResponseImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyDnResponseImpl.java Tue Nov 29 10:48:26 2016
@@ -55,6 +55,7 @@ public class ModifyDnResponseImpl extend
      * 
      * @return A ModifyDNResponse String
      */
+    @Override
     public String toString()
     {
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyRequest.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyRequest.java Tue Nov 29 10:48:26 2016
@@ -269,23 +269,27 @@ public interface ModifyRequest extends S
     /**
      * {@inheritDoc}
      */
+    @Override
     ModifyRequest setMessageId( int messageId );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     ModifyRequest addControl( Control control );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     ModifyRequest addAllControls( Control[] controls );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     ModifyRequest removeControl( Control control );
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyRequestImpl.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyRequestImpl.java Tue Nov 29 10:48:26 2016
@@ -48,7 +48,7 @@ public class ModifyRequestImpl extends A
     private Dn name;
 
     /** Sequence of modifications or PDU's <b>modification</b> sequence field */
-    private List<Modification> mods = new ArrayList<Modification>();
+    private List<Modification> mods = new ArrayList<>();
 
     /** The associated response */
     private ModifyResponse response;
@@ -73,6 +73,7 @@ public class ModifyRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public Collection<Modification> getModifications()
     {
         return Collections.unmodifiableCollection( mods );
@@ -82,6 +83,7 @@ public class ModifyRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public Dn getName()
     {
         return name;
@@ -91,6 +93,7 @@ public class ModifyRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyRequest setName( Dn name )
     {
         this.name = name;
@@ -102,6 +105,7 @@ public class ModifyRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyRequest addModification( Modification mod )
     {
         mods.add( mod );
@@ -127,6 +131,7 @@ public class ModifyRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyRequest addModification( Attribute attr, ModificationOperation modOp )
     {
         mods.add( new DefaultModification( modOp, attr ) );
@@ -138,6 +143,7 @@ public class ModifyRequestImpl extends A
     /**
      *{@inheritDoc}
      */
+    @Override
     public ModifyRequest add( String attributeName, String... attributeValue )
     {
         addModification( ModificationOperation.ADD_ATTRIBUTE, attributeName, attributeValue );
@@ -160,6 +166,7 @@ public class ModifyRequestImpl extends A
     /**
      *{@inheritDoc}
      */
+    @Override
     public ModifyRequest add( Attribute attr )
     {
         addModification( attr, ModificationOperation.ADD_ATTRIBUTE );
@@ -171,6 +178,7 @@ public class ModifyRequestImpl extends A
     /**
      * @see #replace(String, String...)
      */
+    @Override
     public ModifyRequest replace( String attributeName )
     {
         addModification( ModificationOperation.REPLACE_ATTRIBUTE, attributeName, StringConstants.EMPTY_STRINGS );
@@ -182,6 +190,7 @@ public class ModifyRequestImpl extends A
     /**
      *{@inheritDoc}
      */
+    @Override
     public ModifyRequest replace( String attributeName, String... attributeValue )
     {
         addModification( ModificationOperation.REPLACE_ATTRIBUTE, attributeName, attributeValue );
@@ -204,6 +213,7 @@ public class ModifyRequestImpl extends A
     /**
      *{@inheritDoc}
      */
+    @Override
     public ModifyRequest replace( Attribute attr )
     {
         addModification( attr, ModificationOperation.REPLACE_ATTRIBUTE );
@@ -215,6 +225,7 @@ public class ModifyRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyRequest removeModification( Modification mod )
     {
         mods.remove( mod );
@@ -226,6 +237,7 @@ public class ModifyRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyRequest remove( String attributeName, String... attributeValue )
     {
         addModification( ModificationOperation.REMOVE_ATTRIBUTE, attributeName, attributeValue );
@@ -248,6 +260,7 @@ public class ModifyRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyRequest remove( Attribute attr )
     {
         addModification( attr, ModificationOperation.REMOVE_ATTRIBUTE );
@@ -259,6 +272,7 @@ public class ModifyRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyRequest remove( String attributerName )
     {
         addModification( new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE, attributerName ) );
@@ -270,6 +284,7 @@ public class ModifyRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyRequest setMessageId( int messageId )
     {
         super.setMessageId( messageId );
@@ -281,6 +296,7 @@ public class ModifyRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyRequest addControl( Control control )
     {
         return ( ModifyRequest ) super.addControl( control );
@@ -290,6 +306,7 @@ public class ModifyRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyRequest addAllControls( Control[] controls )
     {
         return ( ModifyRequest ) super.addAllControls( controls );
@@ -299,6 +316,7 @@ public class ModifyRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyRequest removeControl( Control control )
     {
         return ( ModifyRequest ) super.removeControl( control );
@@ -315,6 +333,7 @@ public class ModifyRequestImpl extends A
      * 
      * @return the message type of the response.
      */
+    @Override
     public MessageTypeEnum getResponseType()
     {
         return MessageTypeEnum.MODIFY_RESPONSE;
@@ -326,6 +345,7 @@ public class ModifyRequestImpl extends A
      * 
      * @return the result containing response for this request
      */
+    @Override
     public ModifyResponse getResultResponse()
     {
         if ( response == null )
@@ -367,6 +387,7 @@ public class ModifyRequestImpl extends A
      *            the object to compare this ModifyRequest to
      * @return true if obj equals this ModifyRequest, false otherwise
      */
+    @Override
     public boolean equals( Object obj )
     {
         if ( obj == this )
@@ -431,10 +452,10 @@ public class ModifyRequestImpl extends A
      * 
      * @return A ModifyRequest String
      */
+    @Override
     public String toString()
     {
-
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         sb.append( "    Modify Request\n" );
         sb.append( "        Object : '" ).append( name ).append( "'\n" );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyResponseImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyResponseImpl.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyResponseImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyResponseImpl.java Tue Nov 29 10:48:26 2016
@@ -54,6 +54,7 @@ public class ModifyResponseImpl extends
      * 
      * @return A ModifyResponse String
      */
+    @Override
     public String toString()
     {
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ReferralImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ReferralImpl.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ReferralImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ReferralImpl.java Tue Nov 29 10:48:26 2016
@@ -39,10 +39,10 @@ public class ReferralImpl implements Ref
     static final long serialVersionUID = 2638820668325359096L;
 
     /** Sequence of LDAPUrls composing this Referral */
-    private final List<String> urls = new ArrayList<String>();
+    private final List<String> urls = new ArrayList<>();
 
     /** The encoded LdapURL */
-    private final List<byte[]> urlsBytes = new ArrayList<byte[]>();
+    private final List<byte[]> urlsBytes = new ArrayList<>();
 
     /** The length of the referral */
     private int referralLength;
@@ -54,6 +54,7 @@ public class ReferralImpl implements Ref
     /**
      * {@inheritDoc}
      */
+    @Override
     public int getReferralLength()
     {
         return referralLength;
@@ -63,6 +64,7 @@ public class ReferralImpl implements Ref
     /**
      * {@inheritDoc}
      */
+    @Override
     public void setReferralLength( int referralLength )
     {
         this.referralLength = referralLength;
@@ -74,6 +76,7 @@ public class ReferralImpl implements Ref
      * 
      * @return the alternative url objects.
      */
+    @Override
     public Collection<String> getLdapUrls()
     {
         return Collections.unmodifiableCollection( urls );
@@ -83,6 +86,7 @@ public class ReferralImpl implements Ref
     /**
      * {@inheritDoc}
      */
+    @Override
     public Collection<byte[]> getLdapUrlsBytes()
     {
         return urlsBytes;
@@ -94,6 +98,7 @@ public class ReferralImpl implements Ref
      * 
      * @param url the LDAPv3 URL to add
      */
+    @Override
     public void addLdapUrl( String url )
     {
         urls.add( url );
@@ -103,6 +108,7 @@ public class ReferralImpl implements Ref
     /**
      * {@inheritDoc}
      */
+    @Override
     public void addLdapUrlBytes( byte[] urlBytes )
     {
         urlsBytes.add( urlBytes );
@@ -115,6 +121,7 @@ public class ReferralImpl implements Ref
      * @param url
      *            the LDAPv3 URL to remove
      */
+    @Override
     public void removeLdapUrl( String url )
     {
         urls.remove( url );
@@ -125,6 +132,7 @@ public class ReferralImpl implements Ref
      * @see Object#hashCode()
      * @return the instance's hash code 
      */
+    @Override
     public int hashCode()
     {
         int hash = 37;
@@ -150,6 +158,7 @@ public class ReferralImpl implements Ref
      *            the object to compare this ReferralImpl to
      * @return true if both implementations contain exactly the same URLs
      */
+    @Override
     public boolean equals( Object obj )
     {
         // just in case for speed return true if obj is this object
@@ -192,11 +201,12 @@ public class ReferralImpl implements Ref
      * 
      * @return A Referral String
      */
+    @Override
     public String toString()
     {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        if ( ( urls != null ) && ( urls.size() != 0 ) )
+        if ( !urls.isEmpty() )
         {
             sb.append( "            Referrals :\n" );
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ResultCodeEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ResultCodeEnum.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ResultCodeEnum.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ResultCodeEnum.java Tue Nov 29 10:48:26 2016
@@ -99,7 +99,7 @@ import org.apache.directory.api.ldap.mod
  *           attributeOrValueExists       (20),
  *           invalidAttributeSyntax       (21),
  *           -- 22-31 unused --
- *           NO_SUCH_OBJECT                 (32),
+ *           NO_SUCH_OBJECT               (32),
  *           aliasProblem                 (33),
  *           invalidDNSyntax              (34),
  *           -- 35 reserved for undefined isLeaf --
@@ -719,39 +719,7 @@ public enum ResultCodeEnum
     /** Stores the description of each element of the enumeration */
     private String message;
 
-
-    /**
-     * Private construct so no other instances can be created other than the
-     * public static constants in this class.
-     * 
-     * @param value the integer value of the enumeration.
-     * @param message the description of the enumeration.
-     */
-    ResultCodeEnum( int value, String message )
-    {
-        this.value = value;
-        this.message = message;
-    }
-
-
-    /**
-     * @return The value associated with the current element.
-     */
-    public int getValue()
-    {
-        return value;
-    }
-
-
-    /**
-     * @return The description associated with the current element.
-     */
-    public String getMessage()
-    {
-        return message;
-    }
-
-    private static final Set<ResultCodeEnum> EMPTY_RESULT_CODE_SET = new HashSet<ResultCodeEnum>();
+    private static final Set<ResultCodeEnum> EMPTY_RESULT_CODE_SET = new HashSet<>();
 
     // ------------------------------------------------------------------------
     // Error Codes Grouped Into Categories & Static Accessors
@@ -775,7 +743,7 @@ public enum ResultCodeEnum
 
     static
     {
-        Set<ResultCodeEnum> set = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> set = new HashSet<>();
         set.add( ResultCodeEnum.SUCCESS );
         set.add( ResultCodeEnum.COMPARE_TRUE );
         set.add( ResultCodeEnum.COMPARE_FALSE );
@@ -813,7 +781,7 @@ public enum ResultCodeEnum
 
     static
     {
-        Set<ResultCodeEnum> set = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> set = new HashSet<>();
         set.add( ResultCodeEnum.BUSY );
         set.add( ResultCodeEnum.OTHER );
         set.add( ResultCodeEnum.SUCCESS );
@@ -866,7 +834,7 @@ public enum ResultCodeEnum
 
     static
     {
-        Set<ResultCodeEnum> set = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> set = new HashSet<>();
         set.add( ResultCodeEnum.BUSY );
         set.add( ResultCodeEnum.OTHER );
         set.add( ResultCodeEnum.SUCCESS );
@@ -926,7 +894,7 @@ public enum ResultCodeEnum
 
     static
     {
-        Set<ResultCodeEnum> set = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> set = new HashSet<>();
         set.add( ResultCodeEnum.BUSY );
         set.add( ResultCodeEnum.OTHER );
         set.add( ResultCodeEnum.SUCCESS );
@@ -988,7 +956,7 @@ public enum ResultCodeEnum
 
     static
     {
-        Set<ResultCodeEnum> set = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> set = new HashSet<>();
         set.add( ResultCodeEnum.BUSY );
         set.add( ResultCodeEnum.OTHER );
         set.add( ResultCodeEnum.SUCCESS );
@@ -1043,7 +1011,7 @@ public enum ResultCodeEnum
 
     static
     {
-        Set<ResultCodeEnum> set = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> set = new HashSet<>();
         set.add( ResultCodeEnum.BUSY );
         set.add( ResultCodeEnum.OTHER );
         set.add( ResultCodeEnum.SUCCESS );
@@ -1097,7 +1065,7 @@ public enum ResultCodeEnum
 
     static
     {
-        Set<ResultCodeEnum> set = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> set = new HashSet<>();
         set.add( ResultCodeEnum.BUSY );
         set.add( ResultCodeEnum.OTHER );
         set.add( ResultCodeEnum.SUCCESS );
@@ -1154,7 +1122,7 @@ public enum ResultCodeEnum
 
     static
     {
-        Set<ResultCodeEnum> set = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> set = new HashSet<>();
         set.add( ResultCodeEnum.OPERATIONS_ERROR );
         set.add( ResultCodeEnum.PROTOCOL_ERROR );
         set.add( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
@@ -1229,7 +1197,7 @@ public enum ResultCodeEnum
 
     static
     {
-        Set<ResultCodeEnum> set = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> set = new HashSet<>();
         set.add( ResultCodeEnum.SUCCESS );
         set.add( ResultCodeEnum.OPERATIONS_ERROR );
         set.add( ResultCodeEnum.PROTOCOL_ERROR );
@@ -1272,124 +1240,6 @@ public enum ResultCodeEnum
         set.add( ResultCodeEnum.CANCELED );
         EXTENDED_CODES = Collections.unmodifiableSet( set );
     }
-
-
-    /**
-     * @return The integer associated with the result code
-     */
-    public int getResultCode()
-    {
-        return value;
-    }
-
-
-    /**
-     * Gets the ResultCode enum from its integer value
-     * 
-     * @param value the ResultCode numneric value
-     * @return The integer associated with the result code
-     */
-    public static ResultCodeEnum getResultCode( int value )
-    {
-        switch ( value )
-        {
-            case 0:
-                return SUCCESS;
-            case 1:
-                return OPERATIONS_ERROR;
-            case 2:
-                return PROTOCOL_ERROR;
-            case 3:
-                return TIME_LIMIT_EXCEEDED;
-            case 4:
-                return SIZE_LIMIT_EXCEEDED;
-            case 5:
-                return COMPARE_FALSE;
-            case 6:
-                return COMPARE_TRUE;
-            case 7:
-                return AUTH_METHOD_NOT_SUPPORTED;
-            case 8:
-                return STRONG_AUTH_REQUIRED;
-            case 9:
-                return PARTIAL_RESULTS;
-            case 10:
-                return REFERRAL;
-            case 11:
-                return ADMIN_LIMIT_EXCEEDED;
-            case 12:
-                return UNAVAILABLE_CRITICAL_EXTENSION;
-            case 13:
-                return CONFIDENTIALITY_REQUIRED;
-            case 14:
-                return SASL_BIND_IN_PROGRESS;
-            case 16:
-                return NO_SUCH_ATTRIBUTE;
-            case 17:
-                return UNDEFINED_ATTRIBUTE_TYPE;
-            case 18:
-                return INAPPROPRIATE_MATCHING;
-            case 19:
-                return CONSTRAINT_VIOLATION;
-            case 20:
-                return ATTRIBUTE_OR_VALUE_EXISTS;
-            case 21:
-                return INVALID_ATTRIBUTE_SYNTAX;
-            case 32:
-                return NO_SUCH_OBJECT;
-            case 33:
-                return ALIAS_PROBLEM;
-            case 34:
-                return INVALID_DN_SYNTAX;
-            case 35:
-                return UNKNOWN;
-            case 36:
-                return ALIAS_DEREFERENCING_PROBLEM;
-            case 48:
-                return INAPPROPRIATE_AUTHENTICATION;
-            case 49:
-                return INVALID_CREDENTIALS;
-            case 50:
-                return INSUFFICIENT_ACCESS_RIGHTS;
-            case 51:
-                return BUSY;
-            case 52:
-                return UNAVAILABLE;
-            case 53:
-                return UNWILLING_TO_PERFORM;
-            case 54:
-                return LOOP_DETECT;
-            case 64:
-                return NAMING_VIOLATION;
-            case 65:
-                return OBJECT_CLASS_VIOLATION;
-            case 66:
-                return NOT_ALLOWED_ON_NON_LEAF;
-            case 67:
-                return NOT_ALLOWED_ON_RDN;
-            case 68:
-                return ENTRY_ALREADY_EXISTS;
-            case 69:
-                return OBJECT_CLASS_MODS_PROHIBITED;
-            case 71:
-                return AFFECTS_MULTIPLE_DSAS;
-            case 80:
-                return OTHER;
-            case 118:
-                return CANCELED;
-            case 119:
-                return NO_SUCH_OPERATION;
-            case 120:
-                return TOO_LATE;
-            case 121:
-                return CANNOT_CANCEL;
-            case 4096:
-                return E_SYNC_REFRESH_REQUIRED;
-            default:
-                return UNKNOWN;
-        }
-    }
-
     // ------------------------------------------------------------------------
     // Getting Result Code Enumeration Object Using Integer Values
     // ------------------------------------------------------------------------
@@ -1412,7 +1262,7 @@ public enum ResultCodeEnum
 
     static
     {
-        Set<ResultCodeEnum> set = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> set = new HashSet<>();
         set.add( ResultCodeEnum.OPERATIONS_ERROR );
         set.add( ResultCodeEnum.ALIAS_PROBLEM );
         set.add( ResultCodeEnum.ALIAS_DEREFERENCING_PROBLEM );
@@ -1437,7 +1287,7 @@ public enum ResultCodeEnum
 
     static
     {
-        Set<ResultCodeEnum> set = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> set = new HashSet<>();
         set.add( ResultCodeEnum.AUTH_METHOD_NOT_SUPPORTED );
         set.add( ResultCodeEnum.STRONG_AUTH_REQUIRED );
         set.add( ResultCodeEnum.CONFIDENTIALITY_REQUIRED );
@@ -1457,7 +1307,7 @@ public enum ResultCodeEnum
 
     static
     {
-        Set<ResultCodeEnum> set = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> set = new HashSet<>();
         set.add( ResultCodeEnum.BUSY );
         set.add( ResultCodeEnum.UNAVAILABLE );
         SERVICE_UNAVAILABLE_CODES = Collections.unmodifiableSet( set );
@@ -1475,12 +1325,13 @@ public enum ResultCodeEnum
 
     static
     {
-        Set<ResultCodeEnum> set = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> set = new HashSet<>();
         set.add( ResultCodeEnum.CONSTRAINT_VIOLATION );
         set.add( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
         INVALID_ATTRIBUTE_VALUE_EXCEPTION_CODES = Collections.unmodifiableSet( set );
     }
 
+    
     /**
      * A set of ResultCodes containing those that may correspond to a
      * {@link Exception}.
@@ -1493,7 +1344,7 @@ public enum ResultCodeEnum
 
     static
     {
-        Set<ResultCodeEnum> set = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> set = new HashSet<>();
         set.add( ResultCodeEnum.PARTIAL_RESULTS );
         set.add( ResultCodeEnum.REFERRAL );
         PARTIAL_RESULTS_EXCEPTION_CODES = Collections.unmodifiableSet( set );
@@ -1511,7 +1362,7 @@ public enum ResultCodeEnum
 
     static
     {
-        Set<ResultCodeEnum> set = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> set = new HashSet<>();
         set.add( ResultCodeEnum.REFERRAL );
         set.add( ResultCodeEnum.ADMIN_LIMIT_EXCEEDED );
         LIMIT_EXCEEDED_EXCEPTION_CODES = Collections.unmodifiableSet( set );
@@ -1530,7 +1381,7 @@ public enum ResultCodeEnum
 
     static
     {
-        Set<ResultCodeEnum> set = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> set = new HashSet<>();
         set.add( ResultCodeEnum.UNAVAILABLE_CRITICAL_EXTENSION );
         set.add( ResultCodeEnum.UNWILLING_TO_PERFORM );
         OPERATION_NOT_SUPPORTED_EXCEPTION_CODES = Collections.unmodifiableSet( set );
@@ -1548,7 +1399,7 @@ public enum ResultCodeEnum
 
     static
     {
-        Set<ResultCodeEnum> set = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> set = new HashSet<>();
         set.add( ResultCodeEnum.INVALID_DN_SYNTAX );
         set.add( ResultCodeEnum.NAMING_VIOLATION );
         INVALID_NAME_EXCEPTION_CODES = Collections.unmodifiableSet( set );
@@ -1567,7 +1418,7 @@ public enum ResultCodeEnum
 
     static
     {
-        Set<ResultCodeEnum> set = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> set = new HashSet<>();
         set.add( ResultCodeEnum.OBJECT_CLASS_VIOLATION );
         set.add( ResultCodeEnum.NOT_ALLOWED_ON_RDN );
         set.add( ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED );
@@ -1576,6 +1427,156 @@ public enum ResultCodeEnum
 
 
     /**
+     * Private construct so no other instances can be created other than the
+     * public static constants in this class.
+     * 
+     * @param value the integer value of the enumeration.
+     * @param message the description of the enumeration.
+     */
+    ResultCodeEnum( int value, String message )
+    {
+        this.value = value;
+        this.message = message;
+    }
+
+
+    /**
+     * @return The integer associated with the result code
+     */
+    public int getResultCode()
+    {
+        return value;
+    }
+
+
+    /**
+     * Gets the ResultCode enum from its integer value
+     * 
+     * @param value the ResultCode numneric value
+     * @return The integer associated with the result code
+     */
+    public static ResultCodeEnum getResultCode( int value )
+    {
+        switch ( value )
+        {
+            case 0:
+                return SUCCESS;
+            case 1:
+                return OPERATIONS_ERROR;
+            case 2:
+                return PROTOCOL_ERROR;
+            case 3:
+                return TIME_LIMIT_EXCEEDED;
+            case 4:
+                return SIZE_LIMIT_EXCEEDED;
+            case 5:
+                return COMPARE_FALSE;
+            case 6:
+                return COMPARE_TRUE;
+            case 7:
+                return AUTH_METHOD_NOT_SUPPORTED;
+            case 8:
+                return STRONG_AUTH_REQUIRED;
+            case 9:
+                return PARTIAL_RESULTS;
+            case 10:
+                return REFERRAL;
+            case 11:
+                return ADMIN_LIMIT_EXCEEDED;
+            case 12:
+                return UNAVAILABLE_CRITICAL_EXTENSION;
+            case 13:
+                return CONFIDENTIALITY_REQUIRED;
+            case 14:
+                return SASL_BIND_IN_PROGRESS;
+            case 16:
+                return NO_SUCH_ATTRIBUTE;
+            case 17:
+                return UNDEFINED_ATTRIBUTE_TYPE;
+            case 18:
+                return INAPPROPRIATE_MATCHING;
+            case 19:
+                return CONSTRAINT_VIOLATION;
+            case 20:
+                return ATTRIBUTE_OR_VALUE_EXISTS;
+            case 21:
+                return INVALID_ATTRIBUTE_SYNTAX;
+            case 32:
+                return NO_SUCH_OBJECT;
+            case 33:
+                return ALIAS_PROBLEM;
+            case 34:
+                return INVALID_DN_SYNTAX;
+            case 35:
+                return UNKNOWN;
+            case 36:
+                return ALIAS_DEREFERENCING_PROBLEM;
+            case 48:
+                return INAPPROPRIATE_AUTHENTICATION;
+            case 49:
+                return INVALID_CREDENTIALS;
+            case 50:
+                return INSUFFICIENT_ACCESS_RIGHTS;
+            case 51:
+                return BUSY;
+            case 52:
+                return UNAVAILABLE;
+            case 53:
+                return UNWILLING_TO_PERFORM;
+            case 54:
+                return LOOP_DETECT;
+            case 64:
+                return NAMING_VIOLATION;
+            case 65:
+                return OBJECT_CLASS_VIOLATION;
+            case 66:
+                return NOT_ALLOWED_ON_NON_LEAF;
+            case 67:
+                return NOT_ALLOWED_ON_RDN;
+            case 68:
+                return ENTRY_ALREADY_EXISTS;
+            case 69:
+                return OBJECT_CLASS_MODS_PROHIBITED;
+            case 71:
+                return AFFECTS_MULTIPLE_DSAS;
+            case 80:
+                return OTHER;
+            case 118:
+                return CANCELED;
+            case 119:
+                return NO_SUCH_OPERATION;
+            case 120:
+                return TOO_LATE;
+            case 121:
+                return CANNOT_CANCEL;
+            case 4096:
+                return E_SYNC_REFRESH_REQUIRED;
+            default:
+                return UNKNOWN;
+        }
+    }
+
+
+
+    /**
+     * @return The value associated with the current element.
+     */
+    public int getValue()
+    {
+        return value;
+    }
+
+
+    /**
+     * @return The description associated with the current element.
+     */
+    public String getMessage()
+    {
+        return message;
+    }
+
+
+    /**
      * Takes a guess at the result code to use if it cannot figure it out from
      * known Throwable to result code mappings. Some however are ambiguous
      * mapping the same Throwable to multiple codes. If no code can be resolved
@@ -1603,7 +1604,7 @@ public enum ResultCodeEnum
 
         if ( type == null )
         {
-            Set<ResultCodeEnum> tmp = new HashSet<ResultCodeEnum>();
+            Set<ResultCodeEnum> tmp = new HashSet<>();
             tmp.addAll( set );
             tmp.removeAll( NON_ERRONEOUS_CODES );
 
@@ -1615,7 +1616,7 @@ public enum ResultCodeEnum
             return tmp.iterator().next();
         }
 
-        Set<ResultCodeEnum> candidates = EMPTY_RESULT_CODE_SET;
+        Set<ResultCodeEnum> candidates;
 
         switch ( type )
         {
@@ -1721,10 +1722,10 @@ public enum ResultCodeEnum
     {
         if ( s1.isEmpty() || s2.isEmpty() )
         {
-            return new HashSet<ResultCodeEnum>();
+            return new HashSet<>();
         }
 
-        Set<ResultCodeEnum> intersection = new HashSet<ResultCodeEnum>();
+        Set<ResultCodeEnum> intersection = new HashSet<>();
 
         if ( s1.size() <= s2.size() )
         {

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchParams.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchParams.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchParams.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchParams.java Tue Nov 29 10:48:26 2016
@@ -1,5 +1,5 @@
 /*
- *  Licensed to the Apache Software Foundation (ASF) under one
+< *  Licensed to the Apache Software Foundation (ASF) under one
  *  or more contributor license agreements.  See the NOTICE file
  *  distributed with this work for additional information
  *  regarding copyright ownership.  The ASF licenses this file
@@ -76,9 +76,9 @@ public class SearchParams
      */
     public SearchParams()
     {
-        returningAttributes = new HashSet<AttributeTypeOptions>();
-        returningAttributesStr = new HashSet<String>();
-        controls = new HashSet<Control>();
+        returningAttributes = new HashSet<>();
+        returningAttributesStr = new HashSet<>();
+        controls = new HashSet<>();
     }
 
 
@@ -303,6 +303,7 @@ public class SearchParams
     /**
      * {@inheritDoc}
      */
+    @Override
     public String toString()
     {
         StringBuilder sb = new StringBuilder();
@@ -312,7 +313,7 @@ public class SearchParams
         sb.append( "    Alias dereferencing : " ).append( aliasDerefMode ).append( "\n" );
         sb.append( "    types only : " ).append( typesOnly ).append( "\n" );
 
-        if ( returningAttributesStr.size() != 0 )
+        if ( !returningAttributesStr.isEmpty() )
         {
             sb.append( "    returning attributes : " ).append( Strings.setToString( returningAttributesStr ) )
                 .append( "\n" );
@@ -336,7 +337,7 @@ public class SearchParams
             sb.append( "    no sizeLimit\n" );
         }
 
-        if ( controls.size() != 0 )
+        if ( !controls.isEmpty() )
         {
             for ( Control control : controls )
             {

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchRequest.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchRequest.java Tue Nov 29 10:48:26 2016
@@ -58,6 +58,7 @@ public interface SearchRequest extends M
      * @return the RESPONSE_TYPES array
      * @see #RESPONSE_TYPES
      */
+    @Override
     MessageTypeEnum[] getResponseTypes();
 
 
@@ -252,24 +253,28 @@ public interface SearchRequest extends M
     /**
      * {@inheritDoc}
      */
+    @Override
     SearchRequest setMessageId( int messageId );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     SearchRequest addControl( Control control );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     SearchRequest addAllControls( Control[] controls );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     SearchRequest removeControl( Control control );
     
     

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchRequestImpl.java?rev=1771880&r1=1771879&r2=1771880&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchRequestImpl.java Tue Nov 29 10:48:26 2016
@@ -66,7 +66,7 @@ public class SearchRequestImpl extends A
     private AliasDerefMode aliasDerefMode = AliasDerefMode.DEREF_ALWAYS;
 
     /** Attributes to return */
-    private List<String> attributes = new ArrayList<String>();
+    private List<String> attributes = new ArrayList<>();
 
     /** The final result containing SearchResponseDone response */
     private SearchResultDone response;
@@ -95,6 +95,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public List<String> getAttributes()
     {
         return Collections.unmodifiableList( attributes );
@@ -106,6 +107,7 @@ public class SearchRequestImpl extends A
      * 
      * @return the search base
      */
+    @Override
     public Dn getBase()
     {
         return baseDn;
@@ -115,6 +117,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchRequest setBase( Dn base )
     {
         baseDn = base;
@@ -126,6 +129,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public AliasDerefMode getDerefAliases()
     {
         return aliasDerefMode;
@@ -135,6 +139,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchRequest setDerefAliases( AliasDerefMode aliasDerefAliases )
     {
         this.aliasDerefMode = aliasDerefAliases;
@@ -146,6 +151,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public ExprNode getFilter()
     {
         return filterNode;
@@ -155,6 +161,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchRequest setFilter( ExprNode filter )
     {
         this.filterNode = filter;
@@ -165,6 +172,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchRequest setFilter( String filter ) throws LdapException
     {
         try
@@ -184,6 +192,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public MessageTypeEnum[] getResponseTypes()
     {
         return RESPONSE_TYPES.clone();
@@ -193,6 +202,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchScope getScope()
     {
         return scope;
@@ -202,6 +212,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchRequest setScope( SearchScope scope )
     {
         this.scope = scope;
@@ -213,6 +224,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public long getSizeLimit()
     {
         return sizeLimit;
@@ -222,6 +234,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchRequest setSizeLimit( long entriesMax )
     {
         sizeLimit = entriesMax;
@@ -233,6 +246,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public int getTimeLimit()
     {
         return timeLimit;
@@ -242,6 +256,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchRequest setTimeLimit( int secondsMax )
     {
         timeLimit = secondsMax;
@@ -253,6 +268,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean getTypesOnly()
     {
         return typesOnly;
@@ -262,6 +278,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchRequest setTypesOnly( boolean typesOnly )
     {
         this.typesOnly = typesOnly;
@@ -273,6 +290,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchRequest addAttributes( String... attributesToAdd )
     {
         this.attributes.addAll( Arrays.asList( attributesToAdd ) );
@@ -284,6 +302,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchRequest removeAttribute( String attribute )
     {
         attributes.remove( attribute );
@@ -295,6 +314,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchResultDone getResultResponse()
     {
         if ( response == null )
@@ -309,6 +329,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchRequest setMessageId( int messageId )
     {
         super.setMessageId( messageId );
@@ -320,6 +341,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchRequest addControl( Control control )
     {
         return ( SearchRequest ) super.addControl( control );
@@ -329,6 +351,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchRequest addAllControls( Control[] controls )
     {
         return ( SearchRequest ) super.addAllControls( controls );
@@ -338,6 +361,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchRequest removeControl( Control control )
     {
         return ( SearchRequest ) super.removeControl( control );
@@ -398,6 +422,7 @@ public class SearchRequestImpl extends A
      * @return true if the obj is a SearchRequest and equals this SearchRequest,
      *         false otherwise
      */
+    @Override
     public boolean equals( Object obj )
     {
         if ( obj == this )
@@ -442,12 +467,12 @@ public class SearchRequestImpl extends A
             return false;
         }
 
-        if ( req.getAttributes() == null && attributes != null && attributes.size() > 0 )
+        if ( req.getAttributes() == null && attributes != null && !attributes.isEmpty() )
         {
             return false;
         }
 
-        if ( req.getAttributes() != null && attributes == null && req.getAttributes().size() > 0 )
+        if ( req.getAttributes() != null && attributes == null && !req.getAttributes().isEmpty() )
         {
             return false;
         }
@@ -483,6 +508,7 @@ public class SearchRequestImpl extends A
      * Return a string the represent a SearchRequest
      * {@inheritDoc}
      */
+    @Override
     public String toString()
     {
         StringBuilder sb = new StringBuilder();
@@ -605,6 +631,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean isFollowReferrals()
     {
         return referralHandling == ReferralsPolicyEnum.FOLLOW;
@@ -614,6 +641,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchRequest followReferrals()
     {
         referralHandling = ReferralsPolicyEnum.FOLLOW;
@@ -625,6 +653,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean isIgnoreReferrals()
     {
         return referralHandling == ReferralsPolicyEnum.IGNORE;
@@ -634,6 +663,7 @@ public class SearchRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchRequest ignoreReferrals()
     {
         referralHandling = ReferralsPolicyEnum.IGNORE;




Mime
View raw message