directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1746258 [4/9] - in /directory/shared/branches/shared-value: asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/ asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/ asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/gr...
Date Tue, 31 May 2016 09:32:13 GMT
Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchResultReferenceImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchResultReferenceImpl.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchResultReferenceImpl.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchResultReferenceImpl.java Tue May 31 09:32:09 2016
@@ -64,6 +64,7 @@ public class SearchResultReferenceImpl e
      * 
      * @return the sequence of LdapUrls
      */
+    @Override
     public Referral getReferral()
     {
         return this.referral;
@@ -75,6 +76,7 @@ public class SearchResultReferenceImpl e
      * 
      * @param referral the sequence of LdapUrls
      */
+    @Override
     public void setReferral( Referral referral )
     {
         this.referral = referral;
@@ -105,6 +107,7 @@ public class SearchResultReferenceImpl e
      *            the object to compare to this response stub
      * @return true if the objects are equivalent false otherwise
      */
+    @Override
     public boolean equals( Object obj )
     {
         if ( obj == this )
@@ -119,17 +122,12 @@ public class SearchResultReferenceImpl e
 
         SearchResultReference resp = ( SearchResultReference ) obj;
 
-        if ( this.referral != null && resp.getReferral() == null )
-        {
-            return false;
-        }
-
-        if ( this.referral == null && resp.getReferral() != null )
+        if ( referral == null )
         {
-            return false;
+            return resp.getReferral() == null;
         }
-
-        return ( this.referral == null || resp.getReferral() == null || this.referral.equals( resp.getReferral() ) );
+        
+        return referral.equals( resp.getReferral() );
     }
 
 
@@ -138,6 +136,7 @@ public class SearchResultReferenceImpl e
      * 
      * @return The Search Result Reference string
      */
+    @Override
     public String toString()
     {
 
@@ -145,7 +144,7 @@ public class SearchResultReferenceImpl e
 
         sb.append( "    Search Result Reference\n" );
 
-        if ( ( referral == null ) || ( referral.getLdapUrls() == null ) || ( referral.getLdapUrls().size() == 0 ) )
+        if ( ( referral == null ) || ( referral.getLdapUrls() == null ) || referral.getLdapUrls().isEmpty() )
         {
             sb.append( "        No Reference\n" );
         }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchScope.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchScope.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchScope.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchScope.java Tue May 31 09:32:09 2016
@@ -170,6 +170,7 @@ public enum SearchScope
     /**
      * {@inheritDoc}
      */
+    @Override
     public String toString()
     {
         return ldapUrlValue;

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/UnbindRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/UnbindRequest.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/UnbindRequest.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/UnbindRequest.java Tue May 31 09:32:09 2016
@@ -30,23 +30,27 @@ public interface UnbindRequest extends R
     /**
      * {@inheritDoc}
      */
+    @Override
     UnbindRequest setMessageId( int messageId );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     UnbindRequest addControl( Control control );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     UnbindRequest addAllControls( Control[] controls );
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     UnbindRequest removeControl( Control control );
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/UnbindRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/UnbindRequestImpl.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/UnbindRequestImpl.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/UnbindRequestImpl.java Tue May 31 09:32:09 2016
@@ -59,6 +59,7 @@ public class UnbindRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public UnbindRequest setMessageId( int messageId )
     {
         super.setMessageId( messageId );
@@ -70,6 +71,7 @@ public class UnbindRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public UnbindRequest addControl( Control control )
     {
         return ( UnbindRequest ) super.addControl( control );
@@ -79,6 +81,7 @@ public class UnbindRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public UnbindRequest addAllControls( Control[] controls )
     {
         return ( UnbindRequest ) super.addAllControls( controls );
@@ -88,6 +91,7 @@ public class UnbindRequestImpl extends A
     /**
      * {@inheritDoc}
      */
+    @Override
     public UnbindRequest removeControl( Control control )
     {
         return ( UnbindRequest ) super.removeControl( control );
@@ -99,6 +103,7 @@ public class UnbindRequestImpl extends A
      * 
      * @return A UnBindRequest String
      */
+    @Override
     public String toString()
     {
         StringBuilder sb = new StringBuilder();

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/AbstractControl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/AbstractControl.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/AbstractControl.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/AbstractControl.java Tue May 31 09:32:09 2016
@@ -69,6 +69,7 @@ public abstract class AbstractControl im
      * 
      * @return A string which represent the control oid
      */
+    @Override
     public String getOid()
     {
         return oid == null ? "" : oid;
@@ -80,6 +81,7 @@ public abstract class AbstractControl im
      * 
      * @return <code>true</code> if the criticality flag is true.
      */
+    @Override
     public boolean isCritical()
     {
         return criticality;
@@ -91,6 +93,7 @@ public abstract class AbstractControl im
      * 
      * @param criticality The criticality value
      */
+    @Override
     public void setCritical( boolean criticality )
     {
         this.criticality = criticality;
@@ -100,6 +103,7 @@ public abstract class AbstractControl im
     /**
      * @see Object#hashCode()
      */
+    @Override
     public int hashCode()
     {
         int h = 17;
@@ -113,6 +117,7 @@ public abstract class AbstractControl im
     /**
      * @see Object#equals(Object)
      */
+    @Override
     public boolean equals( Object o )
     {
         if ( o == this )
@@ -144,9 +149,10 @@ public abstract class AbstractControl im
     /**
      * Return a String representing a Control
      */
+    @Override
     public String toString()
     {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         sb.append( "    " ).append( getClass().getSimpleName() ).append( " " );
         sb.append( "Control\n" );

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/ChangeType.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/ChangeType.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/ChangeType.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/ChangeType.java Tue May 31 09:32:09 2016
@@ -98,14 +98,18 @@ public enum ChangeType
     {
         switch ( value )
         {
-            case ( 1 ):
+            case 1 :
                 return ADD;
-            case ( 2 ):
+            
+            case 2 :
                 return DELETE;
-            case ( 4 ):
+            
+            case 4 :
                 return MODIFY;
-            case ( 8 ):
+            
+            case 8 :
                 return MODDN;
+                
             default:
                 throw new IllegalArgumentException( I18n.err( I18n.ERR_04055, value ) );
         }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/EntryChangeImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/EntryChangeImpl.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/EntryChangeImpl.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/EntryChangeImpl.java Tue May 31 09:32:09 2016
@@ -50,36 +50,42 @@ public class EntryChangeImpl extends Abs
     }
 
 
+    @Override
     public ChangeType getChangeType()
     {
         return changeType;
     }
 
 
+    @Override
     public void setChangeType( ChangeType changeType )
     {
         this.changeType = changeType;
     }
 
 
+    @Override
     public Dn getPreviousDn()
     {
         return previousDn;
     }
 
 
+    @Override
     public void setPreviousDn( Dn previousDn )
     {
         this.previousDn = previousDn;
     }
 
 
+    @Override
     public long getChangeNumber()
     {
         return changeNumber;
     }
 
 
+    @Override
     public void setChangeNumber( long changeNumber )
     {
         this.changeNumber = changeNumber;
@@ -89,11 +95,12 @@ public class EntryChangeImpl extends Abs
     /**
      * @see Object#hashCode()
      */
+    @Override
     public int hashCode()
     {
         int h = super.hashCode();
 
-        h = h * 37 + Long.valueOf( changeNumber ).intValue();
+        h = h * 37 + ( int ) changeNumber;
         h = h * 37 + ( changeType == null ? 0 : changeType.hashCode() );
         h = h * 37 + ( previousDn == null ? 0 : previousDn.hashCode() );
 
@@ -122,9 +129,10 @@ public class EntryChangeImpl extends Abs
     /**
      * Return a String representing this EntryChangeControl.
      */
+    @Override
     public String toString()
     {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         sb.append( "    Entry Change Control\n" );
         sb.append( "        oid : " ).append( getOid() ).append( '\n' );

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/PagedResultsImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/PagedResultsImpl.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/PagedResultsImpl.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/PagedResultsImpl.java Tue May 31 09:32:09 2016
@@ -75,30 +75,35 @@ public class PagedResultsImpl extends Ab
     }
 
 
+    @Override
     public int getSize()
     {
         return size;
     }
 
 
+    @Override
     public void setSize( int size )
     {
         this.size = size;
     }
 
 
+    @Override
     public byte[] getCookie()
     {
         return cookie;
     }
 
 
+    @Override
     public void setCookie( byte[] cookie )
     {
         this.cookie = cookie;
     }
 
 
+    @Override
     public int getCookieValue()
     {
         int value = 0;
@@ -172,9 +177,10 @@ public class PagedResultsImpl extends Ab
     /**
      * Return a String representing this PagedSearchControl.
      */
+    @Override
     public String toString()
     {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         sb.append( "    Paged Search Control\n" );
         sb.append( "        oid : " ).append( getOid() ).append( '\n' );

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/PersistentSearchImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/PersistentSearchImpl.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/PersistentSearchImpl.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/PersistentSearchImpl.java Tue May 31 09:32:09 2016
@@ -64,48 +64,56 @@ public class PersistentSearchImpl extend
     }
 
 
-    public void setChangesOnly( boolean changesOnly )
+    @Override
+public void setChangesOnly( boolean changesOnly )
     {
         this.changesOnly = changesOnly;
     }
 
 
+    @Override
     public boolean isChangesOnly()
     {
         return changesOnly;
     }
 
 
+    @Override
     public void setReturnECs( boolean returnECs )
     {
         this.returnECs = returnECs;
     }
 
 
+    @Override
     public boolean isReturnECs()
     {
         return returnECs;
     }
 
 
+    @Override
     public void setChangeTypes( int changeTypes )
     {
         this.changeTypes = changeTypes;
     }
 
 
+    @Override
     public int getChangeTypes()
     {
         return changeTypes;
     }
 
 
+    @Override
     public boolean isNotificationEnabled( ChangeType changeType )
     {
         return ( changeType.getValue() & changeTypes ) > 0;
     }
 
 
+    @Override
     public void enableNotification( ChangeType changeType )
     {
         changeTypes |= changeType.getValue();
@@ -115,9 +123,10 @@ public class PersistentSearchImpl extend
     /**
      * Return a String representing this PSearchControl.
      */
+    @Override
     public String toString()
     {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         sb.append( "    Persistant Search Control\n" );
         sb.append( "        oid : " ).append( getOid() ).append( '\n' );

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/ProxiedAuthzImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/ProxiedAuthzImpl.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/ProxiedAuthzImpl.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/ProxiedAuthzImpl.java Tue May 31 09:32:09 2016
@@ -52,7 +52,8 @@ public class ProxiedAuthzImpl extends Ab
     /**
      * @return the authzId
      */
-    public String getAuthzId()
+    @Override
+public String getAuthzId()
     {
         return authzId;
     }
@@ -70,6 +71,7 @@ public class ProxiedAuthzImpl extends Ab
      * </pre>
      * @param authzId the authzId to set
      */
+    @Override
     public void setAuthzId( String authzId )
     {
         // We should have a valid authzId
@@ -139,9 +141,10 @@ public class ProxiedAuthzImpl extends Ab
     /**
      * Return a String representing this PagedSearchControl.
      */
+    @Override
     public String toString()
     {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         sb.append( "    Proxied Authz Control\n" );
         sb.append( "        oid : " ).append( getOid() ).append( '\n' );

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SortKey.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SortKey.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SortKey.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SortKey.java Tue May 31 09:32:09 2016
@@ -139,6 +139,7 @@ public class SortKey
     /**
      * @see String#toString()
      */
+    @Override
     public String toString()
     {
         StringBuilder sb = new StringBuilder();

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SortRequestControlImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SortRequestControlImpl.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SortRequestControlImpl.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SortRequestControlImpl.java Tue May 31 09:32:09 2016
@@ -46,6 +46,7 @@ public class SortRequestControlImpl exte
     /**
      * @return the sortKeys
      */
+    @Override
     public List<SortKey> getSortKeys()
     {
         return sortKeys;
@@ -55,17 +56,19 @@ public class SortRequestControlImpl exte
     /**
      * @param sortKeys the sortKeys to set
      */
+    @Override
     public void setSortKeys( List<SortKey> sortKeys )
     {
         this.sortKeys = sortKeys;
     }
 
 
+    @Override
     public void addSortKey( SortKey skey )
     {
         if ( sortKeys == null )
         {
-            sortKeys = new ArrayList<SortKey>();
+            sortKeys = new ArrayList<>();
         }
 
         sortKeys.add( skey );

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SortResponseControlImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SortResponseControlImpl.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SortResponseControlImpl.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SortResponseControlImpl.java Tue May 31 09:32:09 2016
@@ -89,7 +89,7 @@ public class SortResponseControlImpl ext
         
         if ( attributeName != null )
         {
-            return ( attributeName.equalsIgnoreCase( that.getAttributeName() ) );
+            return attributeName.equalsIgnoreCase( that.getAttributeName() );
         }
         else if ( that.getAttributeName() == null )
         {

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SubentriesImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SubentriesImpl.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SubentriesImpl.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SubentriesImpl.java Tue May 31 09:32:09 2016
@@ -69,6 +69,7 @@ public class SubentriesImpl extends Abst
     /**
      * returns Tells if the Subentry values are visible or not
      */
+    @Override
     public boolean isVisible()
     {
         return visibility;
@@ -78,6 +79,7 @@ public class SubentriesImpl extends Abst
     /**
      * @param visibility Set the visibility flag
      */
+    @Override
     public void setVisibility( boolean visibility )
     {
         this.visibility = visibility;
@@ -101,6 +103,7 @@ public class SubentriesImpl extends Abst
     /**
      * @see Object#equals(Object)
      */
+    @Override
     public boolean equals( Object o )
     {
         if ( !super.equals( o ) )
@@ -110,16 +113,17 @@ public class SubentriesImpl extends Abst
 
         Subentries otherDecorator = ( Subentries ) o;
 
-        return ( visibility == otherDecorator.isVisible() );
+        return visibility == otherDecorator.isVisible();
     }
 
 
     /**
      * Return a String representing this EntryChangeControl.
      */
+    @Override
     public String toString()
     {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         sb.append( "    Subentries Control\n" );
         sb.append( "        oid : " ).append( getOid() ).append( '\n' );

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ExtendedNoDResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ExtendedNoDResponse.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ExtendedNoDResponse.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ExtendedNoDResponse.java Tue May 31 09:32:09 2016
@@ -99,6 +99,7 @@ public final class ExtendedNoDResponse e
      * 
      * @return the OID of the extended response type.
      */
+    @Override
     public String getResponseName()
     {
         return EXTENSION_OID;

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/NoticeOfDisconnect.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/NoticeOfDisconnect.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/NoticeOfDisconnect.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/NoticeOfDisconnect.java Tue May 31 09:32:09 2016
@@ -179,6 +179,7 @@ public final class NoticeOfDisconnect ex
      * 
      * @return the OID of the extended response type.
      */
+    @Override
     public String getResponseName()
     {
         return EXTENSION_OID;
@@ -192,6 +193,7 @@ public final class NoticeOfDisconnect ex
      * @param oid
      *            the OID of the extended response type.
      */
+    @Override
     public void setResponseName( String oid )
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_04168, EXTENSION_OID ) );
@@ -223,6 +225,6 @@ public final class NoticeOfDisconnect ex
             return true;
         }
 
-        return ( obj instanceof NoticeOfDisconnect );
+        return obj instanceof NoticeOfDisconnect;
     }
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Ava.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Ava.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Ava.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Ava.java Tue May 31 09:32:09 2016
@@ -1538,6 +1538,11 @@ public class Ava implements Externalizab
                     return true;
                 }
 
+                if ( attributeType == null )
+                {
+                    attributeType = schemaManager.getAttributeType( normType );
+                }
+                
                 MatchingRule equalityMatchingRule = attributeType.getEquality();
 
                 if ( equalityMatchingRule != null )

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/password/PasswordUtil.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/password/PasswordUtil.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/password/PasswordUtil.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/password/PasswordUtil.java Tue May 31 09:32:09 2016
@@ -46,7 +46,6 @@ import org.apache.directory.api.util.Str
  */
 public final class PasswordUtil
 {
-
     /** The SHA1 hash length */
     public static final int SHA1_LENGTH = 20;
 
@@ -77,6 +76,8 @@ public final class PasswordUtil
     /** The CRYPT (SHA-512) hash length */
     public static final int CRYPT_SHA512_LENGTH = 86;
 
+    private static final byte[] CRYPT_SALT_CHARS = Strings
+        .getBytesUtf8( "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" );
 
     private PasswordUtil()
     {
@@ -206,7 +207,7 @@ public final class PasswordUtil
         }
 
         byte[] hashedPassword = encryptPassword( credentials, algorithm, salt );
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         sb.append( '{' ).append( Strings.upperCase( algorithm.getPrefix() ) ).append( '}' );
 
@@ -471,7 +472,7 @@ public final class PasswordUtil
         }
 
         int algoLength = algorithm.getPrefix().length() + 2;
-        byte[] password = null;
+        byte[] password;
 
         switch ( algorithm )
         {
@@ -640,10 +641,6 @@ public final class PasswordUtil
     }
 
 
-    private static final byte[] CRYPT_SALT_CHARS = Strings
-        .getBytesUtf8( "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" );
-
-
     private static byte[] generateCryptSalt( int length )
     {
         byte[] salt = new byte[length];

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/AttributeType.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/AttributeType.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/AttributeType.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/AttributeType.java Tue May 31 09:32:09 2016
@@ -561,6 +561,7 @@ public class AttributeType extends Abstr
     /**
      * {@inheritDoc}
      */
+    @Override
     public String toString()
     {
         return SchemaObjectRenderer.OPEN_LDAP_SCHEMA_RENDERER.render( this );
@@ -570,6 +571,7 @@ public class AttributeType extends Abstr
     /**
      * {@inheritDoc}
      */
+    @Override
     public AttributeType copy()
     {
         MutableAttributeType copy = new MutableAttributeType( oid );
@@ -622,6 +624,7 @@ public class AttributeType extends Abstr
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean equals( Object o )
     {
         if ( this == o )

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/AttributeTypeOptions.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/AttributeTypeOptions.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/AttributeTypeOptions.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/AttributeTypeOptions.java Tue May 31 09:32:09 2016
@@ -93,7 +93,7 @@ public class AttributeTypeOptions
      */
     public boolean hasOption()
     {
-        return ( options != null ) && ( options.size() != 0 );
+        return ( options != null ) && !options.isEmpty();
     }
 
 
@@ -123,7 +123,7 @@ public class AttributeTypeOptions
     {
         if ( options == null )
         {
-            options = new HashSet<String>();
+            options = new HashSet<>();
         }
 
         options.add( Strings.toLowerCaseAscii( Strings.trim( option ) ) );
@@ -151,6 +151,7 @@ public class AttributeTypeOptions
     /**
      * @see Object#hashCode()
      */
+    @Override
     public int hashCode()
     {
         return attributeType.hashCode();
@@ -160,6 +161,7 @@ public class AttributeTypeOptions
     /**
      * @see Object#equals(Object)
      */
+    @Override
     public boolean equals( Object o )
     {
         // Short circuit
@@ -181,6 +183,7 @@ public class AttributeTypeOptions
     /**
      * {@inheritDoc}
      */
+    @Override
     public String toString()
     {
         StringBuilder sb = new StringBuilder();

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/AttributesFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/AttributesFactory.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/AttributesFactory.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/AttributesFactory.java Tue May 31 09:32:09 2016
@@ -334,10 +334,10 @@ public class AttributesFactory
         entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
 
         injectCommon( objectClass, entry, schemaManager );
-        Attribute attr = null;
+        Attribute attr;
 
         // handle the superior objectClasses
-        if ( objectClass.getSuperiorOids() != null && objectClass.getSuperiorOids().size() != 0 )
+        if ( ( objectClass.getSuperiorOids() != null ) && !objectClass.getSuperiorOids().isEmpty() )
         {
             if ( schemaManager != null )
             {
@@ -358,7 +358,7 @@ public class AttributesFactory
         }
 
         // add the must list
-        if ( objectClass.getMustAttributeTypeOids() != null && objectClass.getMustAttributeTypeOids().size() != 0 )
+        if ( ( objectClass.getMustAttributeTypeOids() != null ) && !objectClass.getMustAttributeTypeOids().isEmpty() )
         {
             if ( schemaManager != null )
             {
@@ -378,7 +378,7 @@ public class AttributesFactory
         }
 
         // add the may list
-        if ( objectClass.getMayAttributeTypeOids() != null && objectClass.getMayAttributeTypeOids().size() != 0 )
+        if ( ( objectClass.getMayAttributeTypeOids() != null ) && !objectClass.getMayAttributeTypeOids().isEmpty() )
         {
             if ( schemaManager != null )
             {
@@ -434,12 +434,12 @@ public class AttributesFactory
 
     private void injectNames( List<String> names, Entry entry, SchemaManager schemaManager ) throws LdapException
     {
-        if ( ( names == null ) || ( names.size() == 0 ) )
+        if ( ( names == null ) || names.isEmpty() )
         {
             return;
         }
 
-        Attribute attr = null;
+        Attribute attr;
 
         if ( schemaManager != null )
         {

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/DescriptionUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/DescriptionUtils.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/DescriptionUtils.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/DescriptionUtils.java Tue May 31 09:32:09 2016
@@ -138,7 +138,7 @@ public final class DescriptionUtils
 
             List<String> values = extension.getValue();
 
-            if ( ( values != null ) && ( values.size() != 0 ) )
+            if ( ( values != null ) && !values.isEmpty() )
             {
                 if ( values.size() == 1 )
                 {

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/DitContentRule.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/DitContentRule.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/DitContentRule.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/DitContentRule.java Tue May 31 09:32:09 2016
@@ -150,15 +150,15 @@ public class DitContentRule extends Abst
     {
         super( SchemaObjectType.DIT_CONTENT_RULE, oid );
 
-        mayAttributeTypeOids = new ArrayList<String>();
-        mustAttributeTypeOids = new ArrayList<String>();
-        notAttributeTypeOids = new ArrayList<String>();
-        auxObjectClassOids = new ArrayList<String>();
-
-        mayAttributeTypes = new ArrayList<AttributeType>();
-        mustAttributeTypes = new ArrayList<AttributeType>();
-        notAttributeTypes = new ArrayList<AttributeType>();
-        auxObjectClasses = new ArrayList<ObjectClass>();
+        mayAttributeTypeOids = new ArrayList<>();
+        mustAttributeTypeOids = new ArrayList<>();
+        notAttributeTypeOids = new ArrayList<>();
+        auxObjectClassOids = new ArrayList<>();
+
+        mayAttributeTypes = new ArrayList<>();
+        mustAttributeTypes = new ArrayList<>();
+        notAttributeTypes = new ArrayList<>();
+        auxObjectClasses = new ArrayList<>();
     }
 
 
@@ -567,6 +567,7 @@ public class DitContentRule extends Abst
     /**
      * @see Object#toString()
      */
+    @Override
     public String toString()
     {
         return SchemaObjectRenderer.OPEN_LDAP_SCHEMA_RENDERER.render( this );
@@ -576,6 +577,7 @@ public class DitContentRule extends Abst
     /**
      * Copy a DitContentRule
      */
+    @Override
     public DitContentRule copy()
     {
         DitContentRule copy = new DitContentRule( oid );
@@ -584,7 +586,7 @@ public class DitContentRule extends Abst
         copy.copy( this );
 
         // copy the AUX ObjectClasses OIDs
-        copy.auxObjectClassOids = new ArrayList<String>();
+        copy.auxObjectClassOids = new ArrayList<>();
 
         for ( String oid : auxObjectClassOids )
         {
@@ -592,10 +594,10 @@ public class DitContentRule extends Abst
         }
 
         // copy the AUX ObjectClasses ( will be empty )
-        copy.auxObjectClasses = new ArrayList<ObjectClass>();
+        copy.auxObjectClasses = new ArrayList<>();
 
         // Clone the MAY AttributeTypes OIDs
-        copy.mayAttributeTypeOids = new ArrayList<String>();
+        copy.mayAttributeTypeOids = new ArrayList<>();
 
         for ( String oid : mayAttributeTypeOids )
         {
@@ -603,10 +605,10 @@ public class DitContentRule extends Abst
         }
 
         // Clone the MAY AttributeTypes ( will be empty )
-        copy.mayAttributeTypes = new ArrayList<AttributeType>();
+        copy.mayAttributeTypes = new ArrayList<>();
 
         // Clone the MUST AttributeTypes OIDs
-        copy.mustAttributeTypeOids = new ArrayList<String>();
+        copy.mustAttributeTypeOids = new ArrayList<>();
 
         for ( String oid : mustAttributeTypeOids )
         {
@@ -614,10 +616,10 @@ public class DitContentRule extends Abst
         }
 
         // Clone the MUST AttributeTypes ( will be empty )
-        copy.mustAttributeTypes = new ArrayList<AttributeType>();
+        copy.mustAttributeTypes = new ArrayList<>();
 
         // Clone the NOT AttributeTypes OIDs
-        copy.notAttributeTypeOids = new ArrayList<String>();
+        copy.notAttributeTypeOids = new ArrayList<>();
 
         for ( String oid : notAttributeTypeOids )
         {
@@ -625,7 +627,7 @@ public class DitContentRule extends Abst
         }
 
         // Clone the NOT AttributeTypes ( will be empty )
-        copy.notAttributeTypes = new ArrayList<AttributeType>();
+        copy.notAttributeTypes = new ArrayList<>();
 
         return copy;
     }
@@ -658,6 +660,7 @@ public class DitContentRule extends Abst
     /**
      * {@inheritDoc}
      */
+    @Override
     public void clear()
     {
         // Clear the common elements

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/DitStructureRule.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/DitStructureRule.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/DitStructureRule.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/DitStructureRule.java Tue May 31 09:32:09 2016
@@ -102,7 +102,7 @@ public class DitStructureRule extends Ab
         super( SchemaObjectType.DIT_STRUCTURE_RULE, null );
         this.ruleId = ruleId;
         form = null;
-        superRules = new ArrayList<Integer>();
+        superRules = new ArrayList<>();
     }
 
 
@@ -232,6 +232,7 @@ public class DitStructureRule extends Ab
     /**
      * {@inheritDoc}
      */
+    @Override
     public DitStructureRule copy()
     {
         DitStructureRule copy = new DitStructureRule( ruleId );
@@ -240,7 +241,7 @@ public class DitStructureRule extends Ab
         copy.copy( this );
 
         // Copy the Superiors rules
-        copy.superRules = new ArrayList<Integer>();
+        copy.superRules = new ArrayList<>();
 
         // Copy the form
         copy.form = form;
@@ -281,6 +282,7 @@ public class DitStructureRule extends Ab
     /**
      * {@inheritDoc}
      */
+    @Override
     public void clear()
     {
         // Clear the common elements

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/LdapSyntax.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/LdapSyntax.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/LdapSyntax.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/LdapSyntax.java Tue May 31 09:32:09 2016
@@ -139,7 +139,7 @@ public class LdapSyntax extends Abstract
         {
             List<String> values = getExtension( MetaSchemaConstants.X_NOT_HUMAN_READABLE_AT );
 
-            if ( ( values == null ) || ( values.size() == 0 ) )
+            if ( ( values == null ) || values.isEmpty() )
             {
                 // Default to String if the flag is not set
                 return true;
@@ -149,7 +149,7 @@ public class LdapSyntax extends Abstract
                 String value = values.get( 0 );
                 hasHumanReadableFlag = true;
 
-                if ( value.equalsIgnoreCase( "FALSE" ) )
+                if ( "FALSE".equalsIgnoreCase( value ) )
                 {
                     isHumanReadable = true;
                     return true;
@@ -244,6 +244,7 @@ public class LdapSyntax extends Abstract
     /**
      * {@inheritDoc}
      */
+    @Override
     public LdapSyntax copy()
     {
         LdapSyntax copy = new LdapSyntax( oid );
@@ -308,6 +309,7 @@ public class LdapSyntax extends Abstract
     /**
      * {@inheritDoc}
      */
+    @Override
     public void clear()
     {
         // Clear the common elements

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/LoadableSchemaObject.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/LoadableSchemaObject.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/LoadableSchemaObject.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/LoadableSchemaObject.java Tue May 31 09:32:09 2016
@@ -131,6 +131,7 @@ public abstract class LoadableSchemaObje
     /**
      * {@inheritDoc}
      */
+    @Override
     public LoadableSchemaObject copy()
     {
         return null;

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MatchingRule.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MatchingRule.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MatchingRule.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MatchingRule.java Tue May 31 09:32:09 2016
@@ -150,6 +150,7 @@ public class MatchingRule extends Abstra
     /**
      * @see Object#toString()
      */
+    @Override
     public String toString()
     {
         return SchemaObjectRenderer.OPEN_LDAP_SCHEMA_RENDERER.render( this );
@@ -159,6 +160,7 @@ public class MatchingRule extends Abstra
     /**
      * Copy an MatchingRule
      */
+    @Override
     public MatchingRule copy()
     {
         MatchingRule copy = new MutableMatchingRule( oid );

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MatchingRuleUse.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MatchingRuleUse.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MatchingRuleUse.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MatchingRuleUse.java Tue May 31 09:32:09 2016
@@ -100,8 +100,8 @@ public class MatchingRuleUse extends Abs
     {
         super( SchemaObjectType.MATCHING_RULE_USE, oid );
 
-        applicableAttributeOids = new ArrayList<String>();
-        applicableAttributes = new ArrayList<AttributeType>();
+        applicableAttributeOids = new ArrayList<>();
+        applicableAttributes = new ArrayList<>();
     }
 
 
@@ -211,7 +211,8 @@ public class MatchingRuleUse extends Abs
     /**
      * @see Object#toString()
      */
-    public String toString()
+    @Override
+public String toString()
     {
         return SchemaObjectRenderer.OPEN_LDAP_SCHEMA_RENDERER.render( this );
     }
@@ -220,6 +221,7 @@ public class MatchingRuleUse extends Abs
     /**
      * Copy an MatchingRuleUse
      */
+    @Override
     public MatchingRuleUse copy()
     {
         MatchingRuleUse copy = new MatchingRuleUse( oid );
@@ -228,7 +230,7 @@ public class MatchingRuleUse extends Abs
         copy.copy( this );
 
         // Clone the APPLY AttributeTypes
-        copy.applicableAttributeOids = new ArrayList<String>();
+        copy.applicableAttributeOids = new ArrayList<>();
 
         // Copy the APPLIES oid list
         for ( String oid : applicableAttributeOids )
@@ -237,7 +239,7 @@ public class MatchingRuleUse extends Abs
         }
 
         // Copy the APPLIES list (will be empty)
-        copy.applicableAttributes = new ArrayList<AttributeType>();
+        copy.applicableAttributes = new ArrayList<>();
 
         return copy;
     }
@@ -270,6 +272,7 @@ public class MatchingRuleUse extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public void clear()
     {
         // Clear the common elements

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableAttributeType.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableAttributeType.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableAttributeType.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableAttributeType.java Tue May 31 09:32:09 2016
@@ -589,6 +589,7 @@ public class MutableAttributeType extend
     /**
      * {@inheritDoc}
      */
+    @Override
     public void clear()
     {
         // Clear the common elements

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableMatchingRule.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableMatchingRule.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableMatchingRule.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableMatchingRule.java Tue May 31 09:32:09 2016
@@ -221,6 +221,7 @@ public class MutableMatchingRule extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public void clear()
     {
         // Clear the common elements

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableObjectClass.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableObjectClass.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableObjectClass.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableObjectClass.java Tue May 31 09:32:09 2016
@@ -447,6 +447,7 @@ public class MutableObjectClass extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public void clear()
     {
         // Clear the common elements

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/NameForm.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/NameForm.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/NameForm.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/NameForm.java Tue May 31 09:32:09 2016
@@ -124,11 +124,11 @@ public class NameForm extends AbstractSc
     {
         super( SchemaObjectType.NAME_FORM, oid );
 
-        mustAttributeTypeOids = new ArrayList<String>();
-        mayAttributeTypeOids = new ArrayList<String>();
+        mustAttributeTypeOids = new ArrayList<>();
+        mayAttributeTypeOids = new ArrayList<>();
 
-        mustAttributeTypes = new ArrayList<AttributeType>();
-        mayAttributeTypes = new ArrayList<AttributeType>();
+        mustAttributeTypes = new ArrayList<>();
+        mayAttributeTypes = new ArrayList<>();
     }
 
 
@@ -420,6 +420,7 @@ public class NameForm extends AbstractSc
     /**
      * @see Object#toString()
      */
+    @Override
     public String toString()
     {
         return SchemaObjectRenderer.OPEN_LDAP_SCHEMA_RENDERER.render( this );
@@ -429,6 +430,7 @@ public class NameForm extends AbstractSc
     /**
      * Copy a NameForm
      */
+    @Override
     public NameForm copy()
     {
         NameForm copy = new NameForm( oid );
@@ -437,7 +439,7 @@ public class NameForm extends AbstractSc
         copy.copy( this );
 
         // Copy the MAY AttributeTypes OIDs
-        copy.mayAttributeTypeOids = new ArrayList<String>();
+        copy.mayAttributeTypeOids = new ArrayList<>();
 
         for ( String oid : mayAttributeTypeOids )
         {
@@ -445,10 +447,10 @@ public class NameForm extends AbstractSc
         }
 
         // Copy the MAY AttributeTypes (will be empty)
-        copy.mayAttributeTypes = new ArrayList<AttributeType>();
+        copy.mayAttributeTypes = new ArrayList<>();
 
         // Copy the MUST AttributeTypes OIDs
-        copy.mustAttributeTypeOids = new ArrayList<String>();
+        copy.mustAttributeTypeOids = new ArrayList<>();
 
         for ( String oid : mustAttributeTypeOids )
         {
@@ -456,7 +458,7 @@ public class NameForm extends AbstractSc
         }
 
         // Copy the MUST AttributeTypes ( will be empty )
-        copy.mustAttributeTypes = new ArrayList<AttributeType>();
+        copy.mustAttributeTypes = new ArrayList<>();
 
         // Copy the Structural ObjectClass OID
         copy.structuralObjectClassOid = structuralObjectClassOid;
@@ -495,6 +497,7 @@ public class NameForm extends AbstractSc
     /**
      * {@inheritDoc}
      */
+    @Override
     public void clear()
     {
         // Clear the common elements

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/ObjectClassTypeEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/ObjectClassTypeEnum.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/ObjectClassTypeEnum.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/ObjectClassTypeEnum.java Tue May 31 09:32:09 2016
@@ -95,15 +95,15 @@ public enum ObjectClassTypeEnum
     {
         String upperCase = Strings.upperCase( name.trim() );
 
-        if ( upperCase.equals( "STRUCTURAL" ) )
+        if ( "STRUCTURAL".equals( upperCase ) )
         {
             return STRUCTURAL;
         }
-        else if ( upperCase.equals( "AUXILIARY" ) )
+        else if ( "AUXILIARY".equals( upperCase ) )
         {
             return AUXILIARY;
         }
-        else if ( upperCase.equals( "ABSTRACT" ) )
+        else if ( "ABSTRACT".equals( upperCase ) )
         {
             return ABSTRACT;
         }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/PrepareString.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/PrepareString.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/PrepareString.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/PrepareString.java Tue May 31 09:32:09 2016
@@ -3588,9 +3588,7 @@ public final class PrepareString
         }
 
         // create the resulting String
-        String result = new String( target, 0, newPos );
-
-        return result;
+        return new String( target, 0, newPos );
     }
     
     
@@ -3812,9 +3810,7 @@ public final class PrepareString
         }
 
         // create the resulting String
-        String result = new String( target, 0, newPos );
-
-        return result;
+        return new String( target, 0, newPos );
     }
 
     
@@ -4038,9 +4034,7 @@ public final class PrepareString
         }
 
         // create the resulting String
-        String result = new String( target, 0, newPos );
-
-        return result;
+        return new String( target, 0, newPos );
     }
     
     
@@ -4256,9 +4250,7 @@ public final class PrepareString
         }
 
         // create the resulting String
-        String result = new String( target, 0, newPos );
-
-        return result;
+        return new String( target, 0, newPos );
     }
 
     

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObject.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObject.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObject.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObject.java Tue May 31 09:32:09 2016
@@ -298,12 +298,14 @@ public interface SchemaObject
     /**
      * {@inheritDoc}
      */
+    @Override
     int hashCode();
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     boolean equals( Object o1 );
 
 
@@ -333,8 +335,6 @@ public interface SchemaObject
 
     /**
      * Transform the SchemaObject to an immutable object
-     * TODO locked.
-     *
      */
     void lock();
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectRenderer.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectRenderer.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectRenderer.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectRenderer.java Tue May 31 09:32:09 2016
@@ -452,7 +452,7 @@ public final class SchemaObjectRenderer
 
         List<String> applies = mru.getApplicableAttributeOids();
 
-        if ( ( applies != null ) && ( applies.size() > 0 ) )
+        if ( ( applies != null ) && !applies.isEmpty() )
         {
             prettyPrintIndent( buf );
             buf.append( "APPLIES " );
@@ -581,7 +581,7 @@ public final class SchemaObjectRenderer
     {
         List<String> names = so.getNames();
 
-        if ( ( names != null ) && ( names.size() > 0 ) )
+        if ( ( names != null ) && !names.isEmpty() )
         {
             buf.append( " NAME " );
             renderQDescrs( buf, names );
@@ -651,7 +651,7 @@ public final class SchemaObjectRenderer
      */
     private StringBuilder renderQDescrs( StringBuilder buf, List<String> qdescrs )
     {
-        if ( ( qdescrs == null ) || ( qdescrs.size() == 0 ) )
+        if ( ( qdescrs == null ) || qdescrs.isEmpty() )
         {
             return buf;
         }
@@ -678,7 +678,7 @@ public final class SchemaObjectRenderer
 
     private void renderOids( StringBuilder buf, String prefix, List<String> oids )
     {
-        if ( ( oids != null ) && ( oids.size() > 0 ) )
+        if ( ( oids != null ) && !oids.isEmpty() )
         {
             prettyPrintIndent( buf );
             buf.append( prefix ).append( ' ' );
@@ -767,7 +767,7 @@ public final class SchemaObjectRenderer
 
     private StringBuilder renderRuleIds( StringBuilder buf, List<Integer> ruleIds )
     {
-        if ( ( ruleIds != null ) && ( ruleIds.size() > 0 ) )
+        if ( ( ruleIds != null ) && !ruleIds.isEmpty() )
         {
             prettyPrintIndent( buf );
             buf.append( "SUP " );
@@ -821,15 +821,12 @@ public final class SchemaObjectRenderer
 
     private void renderClose( StringBuilder buf )
     {
-        if ( style.prettyPrint )
+        if ( ( style.prettyPrint ) &&  ( buf.charAt( buf.length() - 1 ) == '\n' ) )
         {
-            if ( buf.charAt( buf.length() - 1 ) == '\n' )
-            {
-                buf.deleteCharAt( buf.length() - 1 );
-                buf.append( " " );
-            }
+            buf.deleteCharAt( buf.length() - 1 );
+            buf.append( " " );
         }
+
         buf.append( ")" );
     }
-
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorter.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorter.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorter.java Tue May 31 09:32:09 2016
@@ -52,7 +52,7 @@ public final class SchemaObjectSorter
      */
     public static Iterable<AttributeType> hierarchicalOrdered( List<AttributeType> attributeTypes )
     {
-        return new SchemaObjectIterable<AttributeType>( attributeTypes, new ReferenceCallback<AttributeType>()
+        return new SchemaObjectIterable<>( attributeTypes, new ReferenceCallback<AttributeType>()
         {
             @Override
             public Collection<String> getSuperiorOids( AttributeType at )
@@ -71,7 +71,7 @@ public final class SchemaObjectSorter
      */
     public static Iterable<ObjectClass> sortObjectClasses( List<ObjectClass> objectClasses )
     {
-        return new SchemaObjectIterable<ObjectClass>( objectClasses, new ReferenceCallback<ObjectClass>()
+        return new SchemaObjectIterable<>( objectClasses, new ReferenceCallback<ObjectClass>()
         {
             @Override
             public Collection<String> getSuperiorOids( ObjectClass oc )
@@ -105,7 +105,7 @@ public final class SchemaObjectSorter
         @Override
         public Iterator<T> iterator()
         {
-            return new SchemaObjectIterator<T>( schemaObjects, callback );
+            return new SchemaObjectIterator<>( schemaObjects, callback );
         }
 
     }
@@ -127,8 +127,8 @@ public final class SchemaObjectSorter
             this.schemaObjects = schemaObjects;
             this.callback = callback;
 
-            this.oid2numericOid = new HashMap<String, String>();
-            this.numericOid2schemaObject = new TreeMap<String, T>();
+            this.oid2numericOid = new HashMap<>();
+            this.numericOid2schemaObject = new TreeMap<>();
             this.loopCount = 0;
 
             for ( T schemaObject : schemaObjects )

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectType.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectType.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectType.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectType.java Tue May 31 09:32:09 2016
@@ -71,7 +71,7 @@ public enum SchemaObjectType
      */
     public String getRdn()
     {
-        String schemaObjectPath = null;
+        String schemaObjectPath;
 
         switch ( this )
         {

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectWrapper.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectWrapper.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectWrapper.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectWrapper.java Tue May 31 09:32:09 2016
@@ -49,6 +49,7 @@ public class SchemaObjectWrapper
      * Compute the hash code for this wrapper. We only use the object type
      * and its oid.
      */
+    @Override
     public int hashCode()
     {
         int h = 37;
@@ -66,6 +67,7 @@ public class SchemaObjectWrapper
     /**
      * @see Object#equals(Object)
      */
+    @Override
     public boolean equals( Object o )
     {
         if ( o == this )
@@ -90,7 +92,7 @@ public class SchemaObjectWrapper
         // If both OID are null, instances are equals
         if ( that.getOid() == null )
         {
-            return ( current.getOid() == null );
+            return current.getOid() == null;
         }
 
         // The that'oid will never be null, we don't really care if current.oid is null here.
@@ -110,6 +112,7 @@ public class SchemaObjectWrapper
     /**
      * @see Object#toString()
      */
+    @Override
     public String toString()
     {
         return "<" + schemaObject.getObjectType() + "," + schemaObject.getOid() + ">";

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaUtils.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaUtils.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaUtils.java Tue May 31 09:32:09 2016
@@ -140,9 +140,9 @@ public final class SchemaUtils
      *            the quoted description strings to render
      * @return the same string buffer that was given for call chaining
      */
-    public static StringBuffer render( StringBuffer buf, List<String> qdescrs )
+    public static StringBuilder render( StringBuilder buf, List<String> qdescrs )
     {
-        if ( ( qdescrs == null ) || ( qdescrs.size() == 0 ) )
+        if ( ( qdescrs == null ) || qdescrs.isEmpty() )
         {
             return buf;
         }
@@ -176,9 +176,9 @@ public final class SchemaUtils
      * @param qdescrs the quoted description strings to render
      * @return the string buffer the qdescrs are rendered into
      */
-    /* No qualifier */static StringBuffer renderQDescrs( StringBuffer buf, List<String> qdescrs )
+    /* No qualifier */static StringBuilder renderQDescrs( StringBuilder buf, List<String> qdescrs )
     {
-        if ( ( qdescrs == null ) || ( qdescrs.size() == 0 ) )
+        if ( ( qdescrs == null ) || qdescrs.isEmpty() )
         {
             return buf;
         }
@@ -209,7 +209,7 @@ public final class SchemaUtils
      * @param qdescrs the quoted description strings to render
      * @return the string buffer the qdescrs are rendered into
      */
-    private static StringBuffer renderQDString( StringBuffer buf, String qdString )
+    private static StringBuilder renderQDString( StringBuilder buf, String qdString )
     {
         buf.append( '\'' );
 
@@ -249,9 +249,9 @@ public final class SchemaUtils
      *            the objectClasses to list
      * @return a buffer which contains the rendered list
      */
-    public static StringBuffer render( ObjectClass[] ocs )
+    public static StringBuilder render( ObjectClass[] ocs )
     {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
 
         return render( buf, ocs );
     }
@@ -267,7 +267,7 @@ public final class SchemaUtils
      *            the objectClasses to list
      * @return a buffer which contains the rendered list
      */
-    public static StringBuffer render( StringBuffer buf, ObjectClass[] ocs )
+    public static StringBuilder render( StringBuilder buf, ObjectClass[] ocs )
     {
         if ( ocs == null || ocs.length == 0 )
         {
@@ -312,9 +312,9 @@ public final class SchemaUtils
      *            the attributeTypes to list
      * @return a buffer which contains the rendered list
      */
-    public static StringBuffer render( AttributeType[] ats )
+    public static StringBuilder render( AttributeType[] ats )
     {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         return render( buf, ats );
     }
 
@@ -329,7 +329,7 @@ public final class SchemaUtils
      *            the attributeTypes to list
      * @return a buffer which contains the rendered list
      */
-    public static StringBuffer render( StringBuffer buf, AttributeType[] ats )
+    public static StringBuilder render( StringBuilder buf, AttributeType[] ats )
     {
         if ( ats == null || ats.length == 0 )
         {
@@ -365,14 +365,14 @@ public final class SchemaUtils
     // ------------------------------------------------------------------------
 
     /**
-     * Renders the schema extensions into a new StringBuffer.
+     * Renders the schema extensions into a new StringBuilder.
      *
      * @param extensions the schema extensions map with key and values
-     * @return a StringBuffer with the extensions component of a syntax description
+     * @return a StringBuilder with the extensions component of a syntax description
      */
-    public static StringBuffer render( Map<String, List<String>> extensions )
+    public static StringBuilder render( Map<String, List<String>> extensions )
     {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
 
         if ( extensions.isEmpty() )
         {
@@ -427,7 +427,7 @@ public final class SchemaUtils
      */
     public static String render( LoadableSchemaObject description )
     {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append( "( " ).append( description.getOid() );
 
         if ( description.getDescription() != null )
@@ -455,7 +455,7 @@ public final class SchemaUtils
     {
         List<String> values = desc.getExtension( MetaSchemaConstants.X_SCHEMA_AT );
 
-        if ( values == null || values.size() == 0 )
+        if ( values == null || values.isEmpty() )
         {
             return MetaSchemaConstants.SCHEMA_OTHER;
         }
@@ -502,7 +502,7 @@ public final class SchemaUtils
 
         if ( optionsPos != -1 )
         {
-            Set<String> options = new HashSet<String>();
+            Set<String> options = new HashSet<>();
 
             String[] res = attributeId.substring( optionsPos + 1 ).split( ";" );
 
@@ -587,7 +587,7 @@ public final class SchemaUtils
         }
         
         // Check the first char which must be ALPHA or DIGIT
-        boolean descr = false;
+        boolean descr;
         boolean zero = false;
         boolean dot = false;
         

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SyntaxChecker.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SyntaxChecker.java Tue May 31 09:32:09 2016
@@ -32,6 +32,8 @@ public abstract class SyntaxChecker exte
     /** The mandatory serialVersionUID */
     public static final long serialVersionUID = 1L;
 
+    /** A constant used for the loggers */
+    public static final String INVALID_SYNTAX_FOR = "Syntax invalid for '{}'";
 
     /**
      * The SyntaxChecker base constructor

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/UsageEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/UsageEnum.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/UsageEnum.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/UsageEnum.java Tue May 31 09:32:09 2016
@@ -82,9 +82,7 @@ public enum UsageEnum
     {
         try
         {
-            UsageEnum result = valueOf( usage );
-
-            return result;
+            return valueOf( usage );
         }
         catch ( IllegalArgumentException iae )
         {

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/BitStringComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/BitStringComparator.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/BitStringComparator.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/BitStringComparator.java Tue May 31 09:32:09 2016
@@ -69,7 +69,7 @@ public class BitStringComparator extends
         // have been caught by the previous test
         if ( ( bs1 == null ) || ( bs2 == null ) )
         {
-            return ( bs1 == null ? -1 : 1 );
+            return bs1 == null ? -1 : 1;
         }
 
         // We have to get rid of 0 from left of each BitString

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/BooleanComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/BooleanComparator.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/BooleanComparator.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/BooleanComparator.java Tue May 31 09:32:09 2016
@@ -69,7 +69,7 @@ public class BooleanComparator extends L
         // have been catched by the previous test
         if ( ( b1 == null ) || ( b2 == null ) )
         {
-            return ( b1 == null ? -1 : 1 );
+            return b1 == null ? -1 : 1;
         }
 
         // The boolean should have been stored as 'TRUE' or 'FALSE'
@@ -77,14 +77,14 @@ public class BooleanComparator extends L
         // with normalized booleans, so no need to upper case them.
         // We don't need to check the assertion value, because we
         // are dealing with booleans.
-        boolean boolean1 = Boolean.valueOf( b1 );
-        boolean boolean2 = Boolean.valueOf( b2 );
+        boolean boolean1 = Boolean.parseBoolean( b1 );
+        boolean boolean2 = Boolean.parseBoolean( b2 );
 
         if ( boolean1 == boolean2 )
         {
             return 0;
         }
 
-        return ( boolean1 ? 1 : -1 );
+        return boolean1 ? 1 : -1;
     }
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/ComparableComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/ComparableComparator.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/ComparableComparator.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/ComparableComparator.java Tue May 31 09:32:09 2016
@@ -76,7 +76,7 @@ public class ComparableComparator<T> ext
             }
             else
             {
-                return -11;
+                return -1;
             }
         }
 

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/CsnComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/CsnComparator.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/CsnComparator.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/CsnComparator.java Tue May 31 09:32:09 2016
@@ -59,6 +59,7 @@ public class CsnComparator extends LdapC
     /**
      * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
      */
+    @Override
     public int compare( Object csnObj1, Object csnObj2 )
     {
         LOG.debug( "comparing CSN objects '{}' with '{}'", csnObj1, csnObj2 );
@@ -73,7 +74,7 @@ public class CsnComparator extends LdapC
         // -------------------------------------------------------------------
         if ( csnObj1 == null )
         {
-            return ( csnObj2 == null ) ? 0 : -1;
+            return -1;
         }
 
         if ( csnObj2 == null )
@@ -81,8 +82,8 @@ public class CsnComparator extends LdapC
             return 1;
         }
 
-        String csnStr1 = null;
-        String csnStr2 = null;
+        String csnStr1;
+        String csnStr2;
 
         if ( csnObj1 instanceof Value )
         {

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/CsnSidComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/CsnSidComparator.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/CsnSidComparator.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/CsnSidComparator.java Tue May 31 09:32:09 2016
@@ -72,7 +72,7 @@ public class CsnSidComparator extends Ld
         }
 
         int sid1 = 0;
-        int sid2 = 0;
+        int sid2;
 
         try
         {

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DeepTrimComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DeepTrimComparator.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DeepTrimComparator.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DeepTrimComparator.java Tue May 31 09:32:09 2016
@@ -22,7 +22,6 @@ package org.apache.directory.api.ldap.mo
 
 import org.apache.directory.api.ldap.model.exception.LdapException;
 import org.apache.directory.api.ldap.model.schema.LdapComparator;
-import org.apache.directory.api.ldap.model.schema.Normalizer;
 import org.apache.directory.api.ldap.model.schema.normalizers.DeepTrimNormalizer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -41,16 +40,13 @@ public class DeepTrimComparator extends
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( DeepTrimComparator.class );
     
-    /** The associated normalizer */
-    private Normalizer normalizer = new DeepTrimNormalizer();
-
-
     /**
      * The NormalizingComparator constructor. Its OID is the  matching rule OID.
      */
     public DeepTrimComparator( String oid )
     {
         super( oid );
+        normalizer = new DeepTrimNormalizer();
     }
 
 
@@ -61,7 +57,7 @@ public class DeepTrimComparator extends
     public int compare( String o1, String o2 )
     {
         String n1 = o1;
-        String n2 = o2;
+        String n2;
 
         try
         {
@@ -85,17 +81,4 @@ public class DeepTrimComparator extends
 
         return n1.compareTo( n2 );
     }
-
-
-    /**
-     * {@inheritDoc}
-     * 
-     * This implementation makes sure we update the oid property of the contained normalizer and 
-     * comparator.
-     */
-    @Override
-    public void setOid( String oid )
-    {
-        super.setOid( oid );
-    }
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DeepTrimToLowerComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DeepTrimToLowerComparator.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DeepTrimToLowerComparator.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DeepTrimToLowerComparator.java Tue May 31 09:32:09 2016
@@ -22,7 +22,6 @@ package org.apache.directory.api.ldap.mo
 
 import org.apache.directory.api.ldap.model.exception.LdapException;
 import org.apache.directory.api.ldap.model.schema.LdapComparator;
-import org.apache.directory.api.ldap.model.schema.Normalizer;
 import org.apache.directory.api.ldap.model.schema.normalizers.DeepTrimToLowerNormalizer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -40,9 +39,6 @@ public class DeepTrimToLowerComparator e
 
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( DeepTrimToLowerComparator.class );
-    
-    /** The associated normalizer */
-    private Normalizer normalizer = new DeepTrimToLowerNormalizer();
 
 
     /**
@@ -51,6 +47,7 @@ public class DeepTrimToLowerComparator e
     public DeepTrimToLowerComparator( String oid )
     {
         super( oid );
+        normalizer = new DeepTrimToLowerNormalizer();
     }
 
 
@@ -74,14 +71,4 @@ public class DeepTrimToLowerComparator e
 
         return key.compareTo( normalizedValue );
     }
-    
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Normalizer getNormalizer()
-    {
-        return normalizer;
-    }
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DnComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DnComparator.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DnComparator.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DnComparator.java Tue May 31 09:32:09 2016
@@ -39,7 +39,7 @@ public class DnComparator extends LdapCo
     private static final long serialVersionUID = 2L;
 
     /** A reference to the schema manager */
-    private SchemaManager schemaManager;
+    private transient SchemaManager schemaManager;
 
     public DnComparator( String oid )
     {
@@ -50,6 +50,7 @@ public class DnComparator extends LdapCo
     /**
      * {@inheritDoc}
      */
+    @Override
     public int compare( Object obj0, Object obj1 )
     {
         Dn dn0 = null;
@@ -100,13 +101,13 @@ public class DnComparator extends LdapCo
 
     private Dn getDn( Object obj ) throws LdapInvalidDnException
     {
-        Dn dn = null;
+        Dn dn;
 
         if ( obj instanceof Dn )
         {
             dn = ( Dn ) obj;
 
-            dn = ( dn.isSchemaAware() ? dn : new Dn( schemaManager, dn ) );
+            dn = dn.isSchemaAware() ? dn : new Dn( schemaManager, dn );
         }
         else if ( obj instanceof String )
         {
@@ -114,7 +115,7 @@ public class DnComparator extends LdapCo
         }
         else
         {
-            throw new IllegalStateException( I18n.err( I18n.ERR_04218, ( obj == null ? null : obj.getClass() ) ) );
+            throw new IllegalStateException( I18n.err( I18n.ERR_04218, obj == null ? null : obj.getClass() ) );
         }
 
         return dn;
@@ -124,6 +125,7 @@ public class DnComparator extends LdapCo
     /**
      * {@inheritDoc}
      */
+    @Override
     public void setSchemaManager( SchemaManager schemaManager )
     {
         this.schemaManager = schemaManager;

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/GeneralizedTimeComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/GeneralizedTimeComparator.java?rev=1746258&r1=1746257&r2=1746258&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/GeneralizedTimeComparator.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/GeneralizedTimeComparator.java Tue May 31 09:32:09 2016
@@ -73,7 +73,7 @@ public class GeneralizedTimeComparator e
         // have been caught by the previous test
         if ( ( backendValue == null ) || ( assertValue == null ) )
         {
-            return ( backendValue == null ? -1 : 1 );
+            return backendValue == null ? -1 : 1;
         }
 
         // Both objects must be stored as String for generalized tim.




Mime
View raw message