directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r655480 [10/11] - in /directory: apacheds/trunk/apacheds-jdbm/src/examples/ apacheds/trunk/apacheds-jdbm/src/main/java/jdbm/btree/ apacheds/trunk/bootstrap-extract/src/main/java/org/apache/directory/server/schema/bootstrap/partition/ apache...
Date Mon, 12 May 2008 11:49:46 GMT
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java Mon May 12 04:49:35 2008
@@ -45,7 +45,7 @@
  */
 public class LdifUtils
 {
-	/** The array that will be used to match the first char.*/
+    /** The array that will be used to match the first char.*/
     private static boolean[] LDIF_SAFE_STARTING_CHAR_ALPHABET = new boolean[128];
     
     /** The array that will be used to match the other chars.*/
@@ -56,28 +56,28 @@
     
     static
     {
-    	// Initialization of the array that will be used to match the first char.
-    	for (int i = 0; i < 128; i++) 
+        // Initialization of the array that will be used to match the first char.
+        for (int i = 0; i < 128; i++) 
         {
-    		LDIF_SAFE_STARTING_CHAR_ALPHABET[i] = true;
-		}
-    	
+            LDIF_SAFE_STARTING_CHAR_ALPHABET[i] = true;
+        }
+        
         LDIF_SAFE_STARTING_CHAR_ALPHABET[0] = false; // 0 (NUL)
-    	LDIF_SAFE_STARTING_CHAR_ALPHABET[10] = false; // 10 (LF)
-    	LDIF_SAFE_STARTING_CHAR_ALPHABET[13] = false; // 13 (CR)
-    	LDIF_SAFE_STARTING_CHAR_ALPHABET[32] = false; // 32 (SPACE)
-    	LDIF_SAFE_STARTING_CHAR_ALPHABET[58] = false; // 58 (:)
-    	LDIF_SAFE_STARTING_CHAR_ALPHABET[60] = false; // 60 (>)
-    	
-    	// Initialization of the array that will be used to match the other chars.
-    	for (int i = 0; i < 128; i++) 
-        {
-    		LDIF_SAFE_OTHER_CHARS_ALPHABET[i] = true;
-		}
-    	
+        LDIF_SAFE_STARTING_CHAR_ALPHABET[10] = false; // 10 (LF)
+        LDIF_SAFE_STARTING_CHAR_ALPHABET[13] = false; // 13 (CR)
+        LDIF_SAFE_STARTING_CHAR_ALPHABET[32] = false; // 32 (SPACE)
+        LDIF_SAFE_STARTING_CHAR_ALPHABET[58] = false; // 58 (:)
+        LDIF_SAFE_STARTING_CHAR_ALPHABET[60] = false; // 60 (>)
+        
+        // Initialization of the array that will be used to match the other chars.
+        for (int i = 0; i < 128; i++) 
+        {
+            LDIF_SAFE_OTHER_CHARS_ALPHABET[i] = true;
+        }
+        
         LDIF_SAFE_OTHER_CHARS_ALPHABET[0] = false; // 0 (NUL)
-    	LDIF_SAFE_OTHER_CHARS_ALPHABET[10] = false; // 10 (LF)
-    	LDIF_SAFE_OTHER_CHARS_ALPHABET[13] = false; // 13 (CR)
+        LDIF_SAFE_OTHER_CHARS_ALPHABET[10] = false; // 10 (LF)
+        LDIF_SAFE_OTHER_CHARS_ALPHABET[13] = false; // 13 (CR)
     }
 
     /**
@@ -87,19 +87,19 @@
      * The data does not need to be encoded if all the following are true:
      * 
      * The data cannot start with the following char values:
-     * 		00 (NUL)
-     * 		10 (LF)
-     * 		13 (CR)
-     * 		32 (SPACE)
-     * 		58 (:)
-     * 		60 (<)
-     * 		Any character with value greater than 127
+     *         00 (NUL)
+     *         10 (LF)
+     *         13 (CR)
+     *         32 (SPACE)
+     *         58 (:)
+     *         60 (<)
+     *         Any character with value greater than 127
      * 
      * The data cannot contain any of the following char values:
-     * 		00 (NUL)
-     * 		10 (LF)
-     * 		13 (CR)
-     * 		Any character with value greater than 127
+     *         00 (NUL)
+     *         10 (LF)
+     *         13 (CR)
+     *         Any character with value greater than 127
      * 
      * The data cannot end with a space.
      * 
@@ -108,27 +108,27 @@
      */
     public static boolean isLDIFSafe( String str )
     {
-    	// Checking the first char
-    	char currentChar = str.charAt(0);
+        // Checking the first char
+        char currentChar = str.charAt(0);
         
-    	if ( ( currentChar > 127 ) || !LDIF_SAFE_STARTING_CHAR_ALPHABET[currentChar] )
-    	{
-    		return false;
-    	}
-    	
-    	// Checking the other chars
-    	for (int i = 1; i < str.length(); i++)
-    	{
-        	currentChar = str.charAt(i);
-        	
-        	if ( ( currentChar > 127 ) || !LDIF_SAFE_OTHER_CHARS_ALPHABET[currentChar] )
-        	{
-        		return false;
-        	}
-		}
-    	
-    	// The String cannot end with a space
-    	return ( currentChar != ' ' );
+        if ( ( currentChar > 127 ) || !LDIF_SAFE_STARTING_CHAR_ALPHABET[currentChar] )
+        {
+            return false;
+        }
+        
+        // Checking the other chars
+        for (int i = 1; i < str.length(); i++)
+        {
+            currentChar = str.charAt(i);
+            
+            if ( ( currentChar > 127 ) || !LDIF_SAFE_OTHER_CHARS_ALPHABET[currentChar] )
+            {
+                return false;
+            }
+        }
+        
+        // The String cannot end with a space
+        return ( currentChar != ' ' );
     }
     
     /**
@@ -165,22 +165,22 @@
      */
     public static String convertToLdif( Attributes attrs, int length ) throws NamingException
     {
-		StringBuilder sb = new StringBuilder();
-		
-		NamingEnumeration<? extends Attribute> ne = attrs.getAll();
-		
-		while ( ne.hasMore() )
-		{
-			Object attribute = ne.next();
+        StringBuilder sb = new StringBuilder();
+        
+        NamingEnumeration<? extends Attribute> ne = attrs.getAll();
+        
+        while ( ne.hasMore() )
+        {
+            Object attribute = ne.next();
             
-			if ( attribute instanceof Attribute ) 
+            if ( attribute instanceof Attribute ) 
             {
-				sb.append( convertToLdif( (Attribute) attribute, length ) );
-			}			
-		}
-		
-		return sb.toString();
-	}
+                sb.append( convertToLdif( (Attribute) attribute, length ) );
+            }            
+        }
+        
+        return sb.toString();
+    }
     
     /**
      * Convert an Entry to LDIF
@@ -356,74 +356,74 @@
      * @return the corresponding LDIF code as a String
      * @throws NamingException If a naming exception is encountered.
      */
-	public static String convertToLdif( Attribute attr, int length ) throws NamingException
-	{
-		StringBuilder sb = new StringBuilder();
-		
-		// iterating on the attribute's values
-		for ( int i = 0; i < attr.size(); i++ )
+    public static String convertToLdif( Attribute attr, int length ) throws NamingException
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        // iterating on the attribute's values
+        for ( int i = 0; i < attr.size(); i++ )
         {
-			StringBuilder lineBuffer = new StringBuilder();
-			
+            StringBuilder lineBuffer = new StringBuilder();
+            
             lineBuffer.append( attr.getID() );
-			
-			Object value = attr.get( i );
             
-			// First, deal with null value (which is valid)
-			if ( value == null )
-			{
+            Object value = attr.get( i );
+            
+            // First, deal with null value (which is valid)
+            if ( value == null )
+            {
                 lineBuffer.append( ':' );
-			}
-			else if ( value instanceof byte[] )
+            }
+            else if ( value instanceof byte[] )
             {
-            	// It is binary, so we have to encode it using Base64 before adding it
-            	char[] encoded = Base64.encode( ( byte[] ) value );
-            	
-            	lineBuffer.append( ":: " + new String( encoded ) );                        	
+                // It is binary, so we have to encode it using Base64 before adding it
+                char[] encoded = Base64.encode( ( byte[] ) value );
+                
+                lineBuffer.append( ":: " + new String( encoded ) );                            
             }
             else if ( value instanceof String )
             {
-            	// It's a String but, we have to check if encoding isn't required
-            	String str = (String) value;
+                // It's a String but, we have to check if encoding isn't required
+                String str = (String) value;
                 
-            	if ( !LdifUtils.isLDIFSafe( str ) )
-            	{
+                if ( !LdifUtils.isLDIFSafe( str ) )
+                {
                     lineBuffer.append( ":: " + encodeBase64( (String)value ) );
-            	}
-            	else
-            	{
-            		lineBuffer.append( ": " + value );
-            	}
+                }
+                else
+                {
+                    lineBuffer.append( ": " + value );
+                }
             }
             
             lineBuffer.append( "\n" );
             sb.append( stripLineToNChars( lineBuffer.toString(), length ) );
         }
-		
-		return sb.toString();
-	}
-	
-	
-	/**
-	 * Strips the String every n specified characters
-	 * @param str the string to strip
-	 * @param nbChars the number of characters
-	 * @return the stripped String
-	 */
-	public static String stripLineToNChars( String str, int nbChars)
-	{
+        
+        return sb.toString();
+    }
+    
+    
+    /**
+     * Strips the String every n specified characters
+     * @param str the string to strip
+     * @param nbChars the number of characters
+     * @return the stripped String
+     */
+    public static String stripLineToNChars( String str, int nbChars)
+    {
         int strLength = str.length();
 
         if ( strLength <= nbChars )
-		{
-			return str;
-		}
+        {
+            return str;
+        }
         
         if ( nbChars < 2 )
         {
             throw new IllegalArgumentException( "The length of each line must be at least 2 chars long" );
         }
-		
+        
         // We will first compute the new size of the LDIF result
         // It's at least nbChars chars plus one for \n
         int charsPerLine = nbChars - 1;
@@ -460,9 +460,9 @@
         System.arraycopy( orig, posSrc, buffer, posDst, remaining == 0 ? charsPerLine : remaining );
         
         return new String( buffer );
-	}
-	
-	
+    }
+    
+    
     /**
      * Compute a reverse LDIF of an AddRequest. It's simply a delete request
      * of the added entry

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/MessageDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/MessageDecoder.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/MessageDecoder.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/MessageDecoder.java Mon May 12 04:49:35 2008
@@ -76,14 +76,14 @@
         {
             public void decodeOccurred( StatefulDecoder decoder, Object decoded )
             {
-            	if ( decoded instanceof Asn1Object )
-            	{
-            		cb.decodeOccurred( decoder, transformer.transform( decoded ) );
-            	}
-            	else
-            	{
-            		cb.decodeOccurred( decoder, decoded );
-            	}
+                if ( decoded instanceof Asn1Object )
+                {
+                    cb.decodeOccurred( decoder, transformer.transform( decoded ) );
+                }
+                else
+                {
+                    cb.decodeOccurred( decoder, decoded );
+                }
             }
         } );
     }
@@ -161,8 +161,8 @@
             }
             else
             {
-            	// TODO : this is certainly not the way we should handle such an exception !
-            	throw new ResponseCarryingMessageException( e.getMessage() );
+                // TODO : this is certainly not the way we should handle such an exception !
+                throw new ResponseCarryingMessageException( e.getMessage() );
             }
         }
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java Mon May 12 04:49:35 2008
@@ -98,9 +98,9 @@
     public ExtendedResponse createExtendedResponse( String id, byte[] berValue, int offset, int length )
         throws NamingException
     {
-    	StoredProcedureResponse resp = ( StoredProcedureResponse ) getResultResponse();
-    	resp.setResponse( berValue );
-    	resp.setOid( id );
+        StoredProcedureResponse resp = ( StoredProcedureResponse ) getResultResponse();
+        resp.setResponse( berValue );
+        resp.setOid( id );
         return resp;
     }
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValue.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValue.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValue.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValue.java Mon May 12 04:49:35 2008
@@ -608,7 +608,7 @@
     {
         if ( normValue instanceof String )
         {
-        	// The result will be gathered in a stringBuilder
+            // The result will be gathered in a stringBuilder
             StringBuilder sb = new StringBuilder();
             
             // First, store the type and the '=' char
@@ -620,93 +620,93 @@
             
             if ( normalizedValue.length() > 0 )
             {
-            	char[] chars = normalizedValue.toCharArray();
+                char[] chars = normalizedValue.toCharArray();
 
-            	// Loop first assuming the DN won't contain any
-            	// char needing to be escaped. This is the case
-            	// for 99.99% of all DN (blind bet, of course ...) 
-            	for ( char c:chars )
-            	{
+                // Loop first assuming the DN won't contain any
+                // char needing to be escaped. This is the case
+                // for 99.99% of all DN (blind bet, of course ...) 
+                for ( char c:chars )
+                {
                     if ( ( c < 0) || ( c > 128 ) )
                     {
-                    	escaped = true;
-                    	break;
+                        escaped = true;
+                        break;
                     }
                     else if ( DN_ESCAPED_CHARS[ c ] )
                     {
-                    	escaped = true;
-                    	break;
+                        escaped = true;
+                        break;
                     }
-            	}
+                }
 
-            	// Here, we have a char to escape. Start again the loop...
-            	if ( escaped )
-            	{
-	                for ( int i = 0; i < valueLength; i++ )
-	                {
-	                    char c = chars[i];
-	                    
-	                    if ( ( c < 0) || ( c > 128 ) )
-	                    {
-		                    // For chars which are not ASCII, use their hexa value prefixed by an '\'
-	                        byte[] bb = StringTools.getBytesUtf8( normalizedValue.substring( i, i + 1 ) );
-	                        
-	                        for ( byte b:bb )
-	                        {
-	                            sb.append( '\\' ).
-	                                append( StringTools.dumpHex( (byte)(( b & 0x00F0 ) >> 4) ) ).
-	                                append( StringTools.dumpHex( b ) );
-	                        }
-	                    }
-	                    else if ( DN_ESCAPED_CHARS[ c ] ) 
-	                    {
-	                    	// Some chars need to be escaped even if they are US ASCII
-	                    	// Just prefix them with a '\'
-	                    	// Special cases are ' ' (space), '#') which need a special
-	                    	// treatment.
-	                        if ( c == ' ' )
-	                        {
-	                            if ( ( i == 0 ) || ( i == valueLength - 1 ) )
-	                            {
-	                                sb.append( '\\' ).append(  c  );
-	                            }
-	                            else
-	                            {
-	                                sb.append( ' ' );
-	                            }
-	
-	                            continue;
-	                        }
-	                        else if ( c == '#' )
-	                        {
-	                            if ( i == 0 )
-	                            {
-	                                sb.append( "\\#" );
-	                                continue;
-	                            }
-	                            else
-	                            {
-	                                sb.append( '#' );
-	                            }
-	                            
-	                            continue;
-	                        }
-	
-	                        sb.append( '\\' ).append( c );
-	                    }
-	                    else
-	                    {
-	                    	// Standard ASCII chars are just appended
-	                        sb.append( c );
-	                    }
-	                }
-	            }
-            	else
-            	{
-            		// The String does not contain any escaped char : 
-            		// just append it. 
-            		sb.append( normalizedValue );
-            	}
+                // Here, we have a char to escape. Start again the loop...
+                if ( escaped )
+                {
+                    for ( int i = 0; i < valueLength; i++ )
+                    {
+                        char c = chars[i];
+                        
+                        if ( ( c < 0) || ( c > 128 ) )
+                        {
+                            // For chars which are not ASCII, use their hexa value prefixed by an '\'
+                            byte[] bb = StringTools.getBytesUtf8( normalizedValue.substring( i, i + 1 ) );
+                            
+                            for ( byte b:bb )
+                            {
+                                sb.append( '\\' ).
+                                    append( StringTools.dumpHex( (byte)(( b & 0x00F0 ) >> 4) ) ).
+                                    append( StringTools.dumpHex( b ) );
+                            }
+                        }
+                        else if ( DN_ESCAPED_CHARS[ c ] ) 
+                        {
+                            // Some chars need to be escaped even if they are US ASCII
+                            // Just prefix them with a '\'
+                            // Special cases are ' ' (space), '#') which need a special
+                            // treatment.
+                            if ( c == ' ' )
+                            {
+                                if ( ( i == 0 ) || ( i == valueLength - 1 ) )
+                                {
+                                    sb.append( '\\' ).append(  c  );
+                                }
+                                else
+                                {
+                                    sb.append( ' ' );
+                                }
+    
+                                continue;
+                            }
+                            else if ( c == '#' )
+                            {
+                                if ( i == 0 )
+                                {
+                                    sb.append( "\\#" );
+                                    continue;
+                                }
+                                else
+                                {
+                                    sb.append( '#' );
+                                }
+                                
+                                continue;
+                            }
+    
+                            sb.append( '\\' ).append( c );
+                        }
+                        else
+                        {
+                            // Standard ASCII chars are just appended
+                            sb.append( c );
+                        }
+                    }
+                }
+                else
+                {
+                    // The String does not contain any escaped char : 
+                    // just append it. 
+                    sb.append( normalizedValue );
+                }
             }
             
             return sb.toString();

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DefaultStringNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DefaultStringNormalizer.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DefaultStringNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DefaultStringNormalizer.java Mon May 12 04:49:35 2008
@@ -35,7 +35,7 @@
  */
 public class DefaultStringNormalizer implements Normalizer
 {
-    public static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
     
     private static final DefaultStringNormalizer NORMALIZER = new DefaultStringNormalizer();
     

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java Mon May 12 04:49:35 2008
@@ -1216,13 +1216,13 @@
         // RDN normalized name. The very same for upName.
         if (rdns.size() == 1 )
         {
-        	normName = newRdn.toString();
-        	upName = newRdn.getUpName();
+            normName = newRdn.toString();
+            upName = newRdn.getUpName();
         }
         else
         {
-        	normName = newRdn + "," + normName;
-        	upName = newRdn.getUpName() + "," + upName;
+            normName = newRdn + "," + normName;
+            upName = newRdn.getUpName() + "," + upName;
         }
         
         bytes = StringTools.getBytesUtf8( normName );
@@ -1450,8 +1450,8 @@
                 if ( oidNormalizer != null )
                 {
                     return new AttributeTypeAndValue( atav.getUpType(), oidNormalizer.getAttributeTypeOid(), 
-                    		atav.getUpValue(),
-                    		oidNormalizer.getNormalizer().normalize( atav.getNormValue() ) );
+                            atav.getUpValue(),
+                            oidNormalizer.getNormalizer().normalize( atav.getNormValue() ) );
 
                 }
                 else
@@ -1513,7 +1513,7 @@
 
             while ( atavs.hasNext() )
             {
-            	AttributeTypeAndValue val = atavs.next();
+                AttributeTypeAndValue val = atavs.next();
                 AttributeTypeAndValue newAtav = atavOidToName( val, oidsMap );
                 rdn.addAttributeTypeAndValue( val.getUpType(), newAtav.getNormType(), val.getUpValue(), newAtav.getNormValue() );
             }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java Mon May 12 04:49:35 2008
@@ -789,7 +789,7 @@
                                int result = atavLocal.compareTo( atavParam );
                                if ( result != 0 )
                                {
-                            	   return result;
+                                   return result;
                                }
                            }
                            else

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/RdnParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/RdnParser.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/RdnParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/RdnParser.java Mon May 12 04:49:35 2008
@@ -907,11 +907,11 @@
      */
     public static int parse( byte[] dn, Position pos, Rdn rdn ) throws InvalidNameException
     {
-    	if ( rdn == null )
-    	{
-    		throw new InvalidNameException( "Cannot feed a null RDN structure" );
-    	}
-    	
+        if ( rdn == null )
+        {
+            throw new InvalidNameException( "Cannot feed a null RDN structure" );
+        }
+        
         String type = null;
         Object value = null;
         int start = pos.start;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DeepTrimToLowerNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DeepTrimToLowerNormalizer.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DeepTrimToLowerNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DeepTrimToLowerNormalizer.java Mon May 12 04:49:35 2008
@@ -38,7 +38,7 @@
  */
 public class DeepTrimToLowerNormalizer implements Normalizer
 {
-    public static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
     public Object normalize( Object value ) throws NamingException
     {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DefaultObjectClass.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DefaultObjectClass.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DefaultObjectClass.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DefaultObjectClass.java Mon May 12 04:49:35 2008
@@ -109,19 +109,19 @@
 
     public boolean isStructural()
     {
-    	return type == ObjectClassTypeEnum.STRUCTURAL;
+        return type == ObjectClassTypeEnum.STRUCTURAL;
     }
 
 
     public boolean isAbstract()
     {
-    	return type == ObjectClassTypeEnum.ABSTRACT;
+        return type == ObjectClassTypeEnum.ABSTRACT;
     }
 
     
     public boolean isAuxiliary()
     {
-    	return type == ObjectClassTypeEnum.AUXILIARY;
+        return type == ObjectClassTypeEnum.AUXILIARY;
     }
 
     

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectIdentifierNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectIdentifierNormalizer.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectIdentifierNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectIdentifierNormalizer.java Mon May 12 04:49:35 2008
@@ -31,7 +31,7 @@
  */
 public class ObjectIdentifierNormalizer implements Normalizer
 {
-    public static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
     public Object normalize( Object value ) throws NamingException
     {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/RegexNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/RegexNormalizer.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/RegexNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/RegexNormalizer.java Mon May 12 04:49:35 2008
@@ -32,7 +32,7 @@
  */
 public class RegexNormalizer implements Normalizer
 {
-    public static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
     
     /** the perl 5 regex engine */
     private final Pattern[] regexes;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/UsageEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/UsageEnum.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/UsageEnum.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/UsageEnum.java Mon May 12 04:49:35 2008
@@ -86,26 +86,26 @@
         }
         catch( IllegalArgumentException iae )
         {
-        	if ( "directoryOperation".equals( usage ) )
-        	{
-        		return DIRECTORY_OPERATION;
-        	}
-        	else if ( "distributedOperation".equals( usage ) )
-        	{
-        		return DISTRIBUTED_OPERATION;
-        	}
-        	else if ( "dSAOperation".equals( usage ) )
-        	{
-        		return DSA_OPERATION;	
-        	}
-        	else if ( "userApplications".equals( usage ) ) 
-        	{
-        		return USER_APPLICATIONS;
-        	}
-        	else 
-        	{
-        		return null;
-        	}
+            if ( "directoryOperation".equals( usage ) )
+            {
+                return DIRECTORY_OPERATION;
+            }
+            else if ( "distributedOperation".equals( usage ) )
+            {
+                return DISTRIBUTED_OPERATION;
+            }
+            else if ( "dSAOperation".equals( usage ) )
+            {
+                return DSA_OPERATION;    
+            }
+            else if ( "userApplications".equals( usage ) ) 
+            {
+                return USER_APPLICATIONS;
+            }
+            else 
+            {
+                return null;
+            }
         }
     }
     

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/AttributeTypeDescriptionSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/AttributeTypeDescriptionSyntaxChecker.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/AttributeTypeDescriptionSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/AttributeTypeDescriptionSyntaxChecker.java Mon May 12 04:49:35 2008
@@ -74,7 +74,7 @@
     /** The Syntax OID, according to RFC 4517, par. 3.3.1 */
     private static final String SC_OID = "1.3.6.1.4.1.1466.115.121.1.3";
 
-	/** The schema parser used to parse the AttributeTypeDescription Syntax */
+    /** The schema parser used to parse the AttributeTypeDescription Syntax */
     private AttributeTypeDescriptionSchemaParser schemaParser = new AttributeTypeDescriptionSchemaParser();
 
     /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/LdapSyntaxDescriptionSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/LdapSyntaxDescriptionSyntaxChecker.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/LdapSyntaxDescriptionSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/LdapSyntaxDescriptionSyntaxChecker.java Mon May 12 04:49:35 2008
@@ -46,7 +46,7 @@
     /** The Syntax OID, according to RFC 4517, par. 3.3.18 */
     private static final String SC_OID = "1.3.6.1.4.1.1466.115.121.1.54";
 
-	/** The schema parser used to parse the LdapSyntaxDescription Syntax */
+    /** The schema parser used to parse the LdapSyntaxDescription Syntax */
     private LdapSyntaxDescriptionSchemaParser schemaParser = new LdapSyntaxDescriptionSchemaParser();
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/MatchingRuleDescriptionSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/MatchingRuleDescriptionSyntaxChecker.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/MatchingRuleDescriptionSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/MatchingRuleDescriptionSyntaxChecker.java Mon May 12 04:49:35 2008
@@ -53,7 +53,7 @@
     /** The Syntax OID, according to RFC 4517, par. 3.3.19 */
     private static final String SC_OID = "1.3.6.1.4.1.1466.115.121.1.30";
 
-	/** The schema parser used to parse the MatchingRuleDescription Syntax */
+    /** The schema parser used to parse the MatchingRuleDescription Syntax */
     private MatchingRuleDescriptionSchemaParser schemaParser = new MatchingRuleDescriptionSchemaParser();
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/MatchingRuleUseDescriptionSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/MatchingRuleUseDescriptionSyntaxChecker.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/MatchingRuleUseDescriptionSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/MatchingRuleUseDescriptionSyntaxChecker.java Mon May 12 04:49:35 2008
@@ -50,7 +50,7 @@
     /** The Syntax OID, according to RFC 4517, par. 3.3.20 */
     private static final String SC_OID = "1.3.6.1.4.1.1466.115.121.1.31";
 
-	/** The schema parser used to parse the MatchingRuleUseDescription Syntax */
+    /** The schema parser used to parse the MatchingRuleUseDescription Syntax */
     private MatchingRuleUseDescriptionSchemaParser schemaParser = new MatchingRuleUseDescriptionSchemaParser();
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/ObjectClassDescriptionSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/ObjectClassDescriptionSyntaxChecker.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/ObjectClassDescriptionSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/ObjectClassDescriptionSyntaxChecker.java Mon May 12 04:49:35 2008
@@ -57,7 +57,7 @@
     /** The Syntax OID, according to RFC 4517, par. 3.3.24 */
     private static final String SC_OID = "1.3.6.1.4.1.1466.115.121.1.37";
 
-	/** The schema parser used to parse the ObjectClassDescription Syntax */
+    /** The schema parser used to parse the ObjectClassDescription Syntax */
     private ObjectClassDescriptionSchemaParser schemaParser = new ObjectClassDescriptionSchemaParser();
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/BaseSubtreeSpecification.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/BaseSubtreeSpecification.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/BaseSubtreeSpecification.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/BaseSubtreeSpecification.java Mon May 12 04:49:35 2008
@@ -333,7 +333,7 @@
                 // Must use a tempBuffer here because the 
                 // exception could occur after some characters
                 // were added to the buffer.
-            	StringBuilder tempBuffer = new StringBuilder();
+                StringBuilder tempBuffer = new StringBuilder();
                 refinement.printRefinementToBuffer( tempBuffer );
                 buffer.append( tempBuffer );
             }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerSpecification.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerSpecification.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerSpecification.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerSpecification.java Mon May 12 04:49:35 2008
@@ -51,7 +51,7 @@
         }
         if ( spSpecs.size() == 0 )
         {
-        	throw new IllegalArgumentException( "TriggerSpecification cannot be initialized with emtpy SPSPec list." );
+            throw new IllegalArgumentException( "TriggerSpecification cannot be initialized with emtpy SPSPec list." );
         }
         this.ldapOperation = ldapOperation;
         this.actionTime = actionTime;
@@ -69,72 +69,72 @@
     }
 
     public List<SPSpec> getSPSpecs() {
-		return spSpecs;
-	}
+        return spSpecs;
+    }
     
     public static class SPSpec
     {
-    	private String name;
+        private String name;
         
         private List<StoredProcedureOption> options;
         
         private List<StoredProcedureParameter> parameters;
 
         public SPSpec(String name, List<StoredProcedureOption> options, List<StoredProcedureParameter> parameters) {
-			super();
-			this.name = name;
-			this.options = options;
-			this.parameters = parameters;
-		}
+            super();
+            this.name = name;
+            this.options = options;
+            this.parameters = parameters;
+        }
         
-		public String getName() {
-			return name;
-		}
-
-		public List<StoredProcedureOption> getOptions() {
-			return options;
-		}
-
-		public List<StoredProcedureParameter> getParameters() {
-			return parameters;
-		}
-
-		@Override
-		public int hashCode() {
-			int h = 37;
-			
-			h = h*17 + ((name == null) ? 0 : name.hashCode());
-			h = h*17 + ((options == null) ? 0 : options.hashCode());
-			h = h*17 + ((parameters == null) ? 0 : parameters.hashCode());
-			return h;
-		}
-
-		@Override
-		public boolean equals(Object obj) {
-			if (this == obj)
-				return true;
-			if (obj == null)
-				return false;
-			if (getClass() != obj.getClass())
-				return false;
-			final SPSpec other = (SPSpec) obj;
-			if (name == null) {
-				if (other.name != null)
-					return false;
-			} else if (!name.equals(other.name))
-				return false;
-			if (options == null) {
-				if (other.options != null)
-					return false;
-			} else if (!options.equals(other.options))
-				return false;
-			if (parameters == null) {
-				if (other.parameters != null)
-					return false;
-			} else if (!parameters.equals(other.parameters))
-				return false;
-			return true;
-		}
+        public String getName() {
+            return name;
+        }
+
+        public List<StoredProcedureOption> getOptions() {
+            return options;
+        }
+
+        public List<StoredProcedureParameter> getParameters() {
+            return parameters;
+        }
+
+        @Override
+        public int hashCode() {
+            int h = 37;
+            
+            h = h*17 + ((name == null) ? 0 : name.hashCode());
+            h = h*17 + ((options == null) ? 0 : options.hashCode());
+            h = h*17 + ((parameters == null) ? 0 : parameters.hashCode());
+            return h;
+        }
+
+        @Override
+        public boolean equals(Object obj) {
+            if (this == obj)
+                return true;
+            if (obj == null)
+                return false;
+            if (getClass() != obj.getClass())
+                return false;
+            final SPSpec other = (SPSpec) obj;
+            if (name == null) {
+                if (other.name != null)
+                    return false;
+            } else if (!name.equals(other.name))
+                return false;
+            if (options == null) {
+                if (other.options != null)
+                    return false;
+            } else if (!options.equals(other.options))
+                return false;
+            if (parameters == null) {
+                if (other.parameters != null)
+                    return false;
+            } else if (!parameters.equals(other.parameters))
+                return false;
+            return true;
+        }
 
     }
     

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeSerializerUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeSerializerUtils.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeSerializerUtils.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeSerializerUtils.java Mon May 12 04:49:35 2008
@@ -39,8 +39,6 @@
  */
 public class AttributeSerializerUtils
 {
-    private static final long serialVersionUID = -3756830073760754086L;
-  
     static final byte[] EMPTY_BYTE_ARRAY = new byte[0];
 
     /** value for type parameter for string (non-binary) attributes */
@@ -50,38 +48,6 @@
     static final byte BYTE_ARRAY_TYPE = 0x01;
     
     /*
-    private class ExtensibleByteArray
-    {
-    	private static final int EXTENSION = 2048;
-    	private List<byte[]> array;
-    	private byte[] currentData;
-    	private int pos = 0;
-    	private int limit = EXTENSION;
-    	
-    	private ExtensibleByteArray()
-    	{
-    		array = new ArrayList<byte[]>();
-    		currentData = new byte[EXTENSION];
-    		array.add( currentData );
-    	}
-    	
-    	private void extend()
-    	{
-    		limit += EXTENSION;
-    		array.add( new byte[EXTENSION] );
-    	}
-    	
-    	private void put( byte b )
-    	{
-    		if ( pos == limit )
-    		{
-    			extend();
-    			currentData = 
-    		}
-    		
-    		
-    	}
-    }*/
     
 
     // -----------------------------------------------------------------------

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java Mon May 12 04:49:35 2008
@@ -20,13 +20,10 @@
 package org.apache.directory.shared.ldap.util;
 
 
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
-import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.schema.MatchingRule;
-import org.apache.directory.shared.ldap.schema.NoOpNormalizer;
-import org.apache.directory.shared.ldap.schema.Normalizer;
+import java.text.ParseException;
+
+import java.util.Arrays;
+import java.util.List;
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
@@ -35,9 +32,14 @@
 import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.ModificationItem;
-import java.text.ParseException;
-import java.util.Arrays;
-import java.util.List;
+
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
+import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.MatchingRule;
+import org.apache.directory.shared.ldap.schema.NoOpNormalizer;
+import org.apache.directory.shared.ldap.schema.Normalizer;
 
 
 /**
@@ -54,17 +56,19 @@
      * @param type the attributeType of the attribute to remove
      * @param entry the entry to remove the attribute from 
      * @return the Attribute that is removed
-     * @throws NamingException if there are problems accessing the attribute
      */
     public static Attribute removeAttribute( AttributeType type, Attributes entry )
     {
         Attribute attr = entry.get( type.getOid() );
+        
         if ( attr == null )
         {
             String[] aliases = type.getNames();
-            for ( int ii = 0; ii < aliases.length; ii++ )
+            
+            for ( String alias:aliases )
             {
-                attr = entry.get( aliases[ii] );
+                attr = entry.get( alias );
+
                 if ( attr != null )
                 {
                     return entry.remove( attr.getID() );
@@ -410,6 +414,7 @@
                             pos++;
                             
                             state = 1;
+                            break;
                     }
                 }
             }
@@ -444,7 +449,6 @@
      * @param attr The attribute to check
      * @param value The value to look for
      * @return true if the value is present in the attribute
-     * @throws NamingException
      */
     public static boolean containsValueCaseIgnore( Attribute attr, Object value )
     {
@@ -509,9 +513,9 @@
         throws NamingException
     {
         // quick bypass test
-        for ( int ii = 0; ii < compared.length; ii++ )
+        for ( Object object:compared )
         {
-            if ( attr.contains( compared ) )
+            if ( attr.contains( object ) )
             {
                 return true;
             }
@@ -521,12 +525,14 @@
 
         if ( type.getSyntax().isHumanReadable() )
         {
-            for ( int jj = 0; jj < compared.length; jj++ )
+            for ( Object object:compared )
             {
-                String comparedStr = ( String ) normalizer.normalize( compared[jj] );
+                String comparedStr = ( String ) normalizer.normalize( object );
+                
                 for ( int ii = attr.size(); ii >= 0; ii-- )
                 {
                     String value = ( String ) attr.get( ii );
+                    
                     if ( comparedStr.equals( normalizer.normalize( value ) ) )
                     {
                         return true;
@@ -536,9 +542,10 @@
         }
         else
         {
-            for ( int jj = 0; jj < compared.length; jj++ )
+            for ( Object object:compared )
             {
-                byte[] comparedBytes = ( byte[] ) compared[jj];
+                byte[] comparedBytes = ( byte[] )object;
+                
                 for ( int ii = attr.size(); ii >= 0; ii-- )
                 {
                     if ( ArrayUtils.isEquals( comparedBytes, attr.get( ii ) ) )
@@ -572,7 +579,7 @@
     {
         String id;
 
-        if ( attr0 == null && attr1 == null )
+        if ( ( attr0 == null ) && ( attr1 == null ) )
         {
             throw new IllegalArgumentException( "Cannot figure out attribute ID if both args are null" );
         }
@@ -595,20 +602,14 @@
 
         Attribute attr = new AttributeImpl( id );
 
-        if ( attr0 != null )
+        for ( int ii = 0; ii < attr0.size(); ii++ )
         {
-            for ( int ii = 0; ii < attr0.size(); ii++ )
-            {
-                attr.add( attr0.get( ii ) );
-            }
+            attr.add( attr0.get( ii ) );
         }
 
-        if ( attr1 != null )
+        for ( int ii = 0; ii < attr1.size(); ii++ )
         {
-            for ( int ii = 0; ii < attr1.size(); ii++ )
-            {
-                attr.remove( attr1.get( ii ) );
-            }
+            attr.remove( attr1.get( ii ) );
         }
 
         return attr;
@@ -924,14 +925,14 @@
         parseNumber( str, pos );
         
         // We must have at least one '.' number
-        if ( StringTools.isCharASCII( str, pos.start, '.' ) == false )
+        if ( !StringTools.isCharASCII( str, pos.start, '.' ) )
         {
             throw new ParseException( "Invalid OID, missing '.'", pos.start );
         }
         
         pos.start++;
         
-        if ( parseNumber( str, pos ) == false )
+        if ( !parseNumber( str, pos ) )
         {
             throw new ParseException( "Invalid OID, missing a number after a '.'", pos.start );
         }
@@ -939,14 +940,14 @@
         while ( true )
         {
             // Break if we get something which is not a '.'
-            if ( StringTools.isCharASCII( str, pos.start, '.' ) == false )
+            if ( !StringTools.isCharASCII( str, pos.start, '.' ) )
             {
                 break;
             }
             
             pos.start++;
             
-            if ( parseNumber( str, pos ) == false )
+            if ( !parseNumber( str, pos ) )
             {
                 throw new ParseException( "Invalid OID, missing a number after a '.'", pos.start );
             }
@@ -1230,6 +1231,7 @@
                             pos++;
 
                             state = 1;
+                            break;
                     }
                 }
             }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/Base64.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/Base64.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/Base64.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/Base64.java Mon May 12 04:49:35 2008
@@ -89,7 +89,7 @@
      *            data to decode.
      * @return the decoded binary data.
      */
-    public static byte[] decode( char[] a_data )
+    public static byte[] decode( char[] data )
     {
         // as our input could contain non-BASE64 data (newlines,
         // whitespace of any sort, whatever) we must first adjust
@@ -98,12 +98,13 @@
         // (b) think that we miscalculated our data length
         // just because of extraneous throw-away junk
 
-        int l_tempLen = a_data.length;
-        for ( int ii = 0; ii < a_data.length; ii++ )
+        int tempLen = data.length;
+        
+        for ( char c:data)
         {
-            if ( ( a_data[ii] > 255 ) || s_codes[a_data[ii]] < 0 )
+            if ( ( c > 255 ) || s_codes[c] < 0 )
             {
-                --l_tempLen; // ignore non-valid chars and padding
+                --tempLen; // ignore non-valid chars and padding
             }
         }
         // calculate required length:
@@ -111,14 +112,14 @@
         // -- plus 2 bytes if there are 3 extra base64 chars,
         // or plus 1 byte if there are 2 extra.
 
-        int l_len = ( l_tempLen / 4 ) * 3;
+        int l_len = ( tempLen / 4 ) * 3;
 
-        if ( ( l_tempLen % 4 ) == 3 )
+        if ( ( tempLen % 4 ) == 3 )
         {
             l_len += 2;
         }
 
-        if ( ( l_tempLen % 4 ) == 2 )
+        if ( ( tempLen % 4 ) == 2 )
         {
             l_len += 1;
         }
@@ -130,9 +131,9 @@
         int l_index = 0;
 
         // we now go through the entire array (NOT using the 'tempLen' value)
-        for ( int ii = 0; ii < a_data.length; ii++ )
+        for ( char c:data )
         {
-            int l_value = ( a_data[ii] > 255 ) ? -1 : s_codes[a_data[ii]];
+            int l_value = ( c > 255 ) ? -1 : s_codes[c];
 
             if ( l_value >= 0 ) // skip over non-code
             {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/LongComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/LongComparator.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/LongComparator.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/LongComparator.java Mon May 12 04:49:35 2008
@@ -49,22 +49,22 @@
      */
     public int compare( Object obj1, Object obj2 )
     {
-    	try
-    	{
+        try
+        {
             Long long1 = (Long)obj1;
             Long long2 = (Long)obj2;
             return long1.compareTo( long2 );
-    	}
-    	catch ( NullPointerException npe )
-    	{
-	        if ( obj1 == null )
-	        {
-	            throw new IllegalArgumentException( "Argument 'obj1' is null" );
-	        }
-	        else
-	        {
-	            throw new IllegalArgumentException( "Argument 'obj2' is null" );
-	        }
-    	}
+        }
+        catch ( NullPointerException npe )
+        {
+            if ( obj1 == null )
+            {
+                throw new IllegalArgumentException( "Argument 'obj1' is null" );
+            }
+            else
+            {
+                throw new IllegalArgumentException( "Argument 'obj2' is null" );
+            }
+        }
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/PropertiesUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/PropertiesUtils.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/PropertiesUtils.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/PropertiesUtils.java Mon May 12 04:49:35 2008
@@ -589,7 +589,7 @@
         
         if ( entry != null )
         {
-        	values = entry.getAttributes();
+            values = entry.getAttributes();
         }
         return values;
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java Mon May 12 04:49:35 2008
@@ -48,8 +48,8 @@
 public class StringTools
 {
     /** The default charset, because it's not provided by JDK 1.5 */
-	static String defaultCharset = null;
-	
+    static String defaultCharset = null;
+    
 
     
     // ~ Static fields/initializers
@@ -313,38 +313,38 @@
     
     private static final char[] TO_LOWER_CASE =
     {
-    	0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-    	0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
-    	0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
-    	0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,
-    	' ',  0x21, 0x22, 0x23, 0x24, 0x25, 0x26, '\'',
-    	'(',  ')',  0x2A, '+',  ',',  '-',  '.',  '/',
-    	'0',  '1',  '2',  '3',  '4',  '5',  '6',  '7',  
-    	'8',  '9',  ':',  0x3B, 0x3C, '=',  0x3E, '?',
-    	0x40, 'a',  'b',  'c',  'd',  'e',  'f',  'g', 
-    	'h',  'i',  'j',  'k',  'l',  'm',  'n',  'o',
-    	'p',  'q',  'r',  's',  't',  'u',  'v',  'w',
-    	'x',  'y',  'z',  0x5B, 0x5C, 0x5D, 0x5E, 0x5F,
-    	0x60, 'a',  'b',  'c',  'd',  'e',  'f',  'g',
-    	'h',  'i',  'j',  'k',  'l',  'm',  'n',  'o',
-    	'p',  'q',  'r',  's',  't',  'u',  'v',  'w',
-    	'x',  'y',  'z',  0x7B, 0x7C, 0x7D, 0x7E, 0x7F,
-    	0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
-    	0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F,
-    	0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
-    	0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F,
-    	0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7,
-    	0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF,
-    	0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7,
-    	0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF,
-    	0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7,
-    	0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF,
-    	0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7,
-    	0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF,
-    	0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
-    	0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
-    	0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
-    	0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF,
+        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+        0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
+        0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+        0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,
+        ' ',  0x21, 0x22, 0x23, 0x24, 0x25, 0x26, '\'',
+        '(',  ')',  0x2A, '+',  ',',  '-',  '.',  '/',
+        '0',  '1',  '2',  '3',  '4',  '5',  '6',  '7',  
+        '8',  '9',  ':',  0x3B, 0x3C, '=',  0x3E, '?',
+        0x40, 'a',  'b',  'c',  'd',  'e',  'f',  'g', 
+        'h',  'i',  'j',  'k',  'l',  'm',  'n',  'o',
+        'p',  'q',  'r',  's',  't',  'u',  'v',  'w',
+        'x',  'y',  'z',  0x5B, 0x5C, 0x5D, 0x5E, 0x5F,
+        0x60, 'a',  'b',  'c',  'd',  'e',  'f',  'g',
+        'h',  'i',  'j',  'k',  'l',  'm',  'n',  'o',
+        'p',  'q',  'r',  's',  't',  'u',  'v',  'w',
+        'x',  'y',  'z',  0x7B, 0x7C, 0x7D, 0x7E, 0x7F,
+        0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
+        0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F,
+        0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
+        0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F,
+        0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7,
+        0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF,
+        0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7,
+        0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF,
+        0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7,
+        0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF,
+        0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7,
+        0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF,
+        0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
+        0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
+        0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
+        0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF,
     };
     
 
@@ -1535,7 +1535,7 @@
         }
         else
         {
-        	return string.substring( index ).startsWith( text );
+            return string.substring( index ).startsWith( text );
         }
     }
     
@@ -3025,7 +3025,7 @@
         
         for ( char c:chars )
         {
-        	chars[pos++] = TO_LOWER_CASE[c];
+            chars[pos++] = TO_LOWER_CASE[c];
         }
         
         return new String( chars );
@@ -3301,22 +3301,22 @@
      */
     public static final String getDefaultCharsetName()
     {
-    	if ( null == defaultCharset ) 
-    	{
-    		try 
-    		{
-    			// Try with jdk 1.5 method, if we are using a 1.5 jdk :)
-    			Method method = Charset.class.getMethod( "defaultCharset", new Class[0] );
-    			defaultCharset = ((Charset) method.invoke( null, new Object[0]) ).name();
-    		} 
-    		catch (Exception e) 
-    		{
-    			// fall back to old method
-    			defaultCharset = new OutputStreamWriter( new ByteArrayOutputStream() ).getEncoding();
-    		}
-    	}
+        if ( null == defaultCharset ) 
+        {
+            try 
+            {
+                // Try with jdk 1.5 method, if we are using a 1.5 jdk :)
+                Method method = Charset.class.getMethod( "defaultCharset", new Class[0] );
+                defaultCharset = ((Charset) method.invoke( null, new Object[0]) ).name();
+            } 
+            catch (Exception e) 
+            {
+                // fall back to old method
+                defaultCharset = new OutputStreamWriter( new ByteArrayOutputStream() ).getEncoding();
+            }
+        }
 
-    	return defaultCharset;
+        return defaultCharset;
     }
     
     
@@ -3473,17 +3473,17 @@
      */
     public static String getType( byte[] bytes)
     {
-    	if ( bytes == null )
-    	{
-    		return null;
-    	}
-    	
-    	char[] chars = new char[bytes.length];
+        if ( bytes == null )
+        {
+            return null;
+        }
+        
+        char[] chars = new char[bytes.length];
         int pos = 0;
         
         for ( byte b:bytes )
         {
-        	chars[pos++] = TO_LOWER_CASE[b];
+            chars[pos++] = TO_LOWER_CASE[b];
         }
         
         return new String( chars );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/UnixCrypt.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/UnixCrypt.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/UnixCrypt.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/UnixCrypt.java Mon May 12 04:49:35 2008
@@ -19,7 +19,7 @@
  */
 
 /*
- * @(#)UnixCrypt.java	0.9 96/11/25
+ * @(#)UnixCrypt.java    0.9 96/11/25
  *
  * Copyright (c) 1996 Aki Yoshida. All rights reserved.
  *
@@ -32,8 +32,8 @@
 /**
  * Unix crypt(3C) utility
  *
- * @version 	0.9, 11/25/96
- * @author 	Aki Yoshida
+ * @version     0.9, 11/25/96
+ * @author     Aki Yoshida
  */
 
 /**

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValueTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValueTest.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValueTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValueTest.java Mon May 12 04:49:35 2008
@@ -51,7 +51,7 @@
     
     private static final Normalizer BINARY_NORMALIZER = new Normalizer()
     {
-        public static final long serialVersionUID = 1L;
+        private static final long serialVersionUID = 1L;
         
         public Object normalize( Object value ) throws NamingException
         {

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java Mon May 12 04:49:35 2008
@@ -139,7 +139,7 @@
             " is is still a comment\n" + 
             "\n" + 
             "version:\n" + 
-	    " 1\n" + 
+            " 1\n" + 
             "# end";
 
         LdifReader reader = new LdifReader();

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifUtilsTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifUtilsTest.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifUtilsTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifUtilsTest.java Mon May 12 04:49:35 2008
@@ -53,8 +53,8 @@
  */
 public class LdifUtilsTest
 {
-	private String testString = "this is a test";
-	
+    private String testString = "this is a test";
+    
     /**
      * Helper method to build a basic entry used by the Modify tests
      */
@@ -75,181 +75,181 @@
     }
 
     
-	/**
-	 * Tests the method IsLdifSafe with a String starting with the
-	 * char NUL (ASCII code 0)
-	 */
-	@Test
-	public void testIsLdifSafeStartingWithNUL()
+    /**
+     * Tests the method IsLdifSafe with a String starting with the
+     * char NUL (ASCII code 0)
+     */
+    @Test
+    public void testIsLdifSafeStartingWithNUL()
     {
-		char c = ( char ) 0;
-		
-		assertFalse( LdifUtils.isLDIFSafe( c + testString ) );
+        char c = ( char ) 0;
+        
+        assertFalse( LdifUtils.isLDIFSafe( c + testString ) );
     }
-	
-	/**
-	 * Tests the method IsLdifSafe with a String starting with the
-	 * char LF (ASCII code 10)
-	 */
+    
+    /**
+     * Tests the method IsLdifSafe with a String starting with the
+     * char LF (ASCII code 10)
+     */
     @Test
-	public void testIsLdifSafeStartingWithLF()
+    public void testIsLdifSafeStartingWithLF()
     {
-		char c = ( char ) 10;
-		
-		assertFalse( LdifUtils.isLDIFSafe( c + testString ) );
+        char c = ( char ) 10;
+        
+        assertFalse( LdifUtils.isLDIFSafe( c + testString ) );
     }
 
-	/**
-	 * Tests the method IsLdifSafe with a String starting with the
-	 * char CR (ASCII code 13)
-	 */
+    /**
+     * Tests the method IsLdifSafe with a String starting with the
+     * char CR (ASCII code 13)
+     */
     @Test
-	public void testIsLdifSafeStartingWithCR()
+    public void testIsLdifSafeStartingWithCR()
     {
-		char c = ( char ) 13;
-		
-		assertFalse( LdifUtils.isLDIFSafe( c + testString ) );
+        char c = ( char ) 13;
+        
+        assertFalse( LdifUtils.isLDIFSafe( c + testString ) );
     }
 
-	/**
-	 * Tests the method IsLdifSafe with a String starting with the
-	 * char SPACE (ASCII code 32)
-	 */
+    /**
+     * Tests the method IsLdifSafe with a String starting with the
+     * char SPACE (ASCII code 32)
+     */
     @Test
-	public void testIsLdifSafeStartingWithSpace()
+    public void testIsLdifSafeStartingWithSpace()
     {
-		char c = ( char ) 32;
-		
-		assertFalse( LdifUtils.isLDIFSafe( c + testString ) );
+        char c = ( char ) 32;
+        
+        assertFalse( LdifUtils.isLDIFSafe( c + testString ) );
     }
-	
-	/**
-	 * Tests the method IsLdifSafe with a String starting with the
-	 * char COLON (:) (ASCII code 58)
-	 */
+    
+    /**
+     * Tests the method IsLdifSafe with a String starting with the
+     * char COLON (:) (ASCII code 58)
+     */
     @Test
-	public void testIsLdifSafeStartingWithColon()
+    public void testIsLdifSafeStartingWithColon()
     {
-		char c = ( char ) 58;
-		
-		assertFalse( LdifUtils.isLDIFSafe( c + testString ) );
+        char c = ( char ) 58;
+        
+        assertFalse( LdifUtils.isLDIFSafe( c + testString ) );
     }
-	
-	/**
-	 * Tests the method IsLdifSafe with a String starting with the
-	 * char LESS_THAN (<) (ASCII code 60)
-	 */
+    
+    /**
+     * Tests the method IsLdifSafe with a String starting with the
+     * char LESS_THAN (<) (ASCII code 60)
+     */
     @Test
-	public void testIsLdifSafeStartingWithLessThan()
+    public void testIsLdifSafeStartingWithLessThan()
     {
-		char c = ( char ) 60;
-		
-		assertFalse( LdifUtils.isLDIFSafe( c + testString ) );
+        char c = ( char ) 60;
+        
+        assertFalse( LdifUtils.isLDIFSafe( c + testString ) );
     }
-	
-	/**
-	 * Tests the method IsLdifSafe with a String starting with the
-	 * char with ASCII code 127
-	 */
+    
+    /**
+     * Tests the method IsLdifSafe with a String starting with the
+     * char with ASCII code 127
+     */
     @Test
-	public void testIsLdifSafeStartingWithCharGreaterThan127()
+    public void testIsLdifSafeStartingWithCharGreaterThan127()
     {
-		char c = ( char ) 127;
-		
-		assertTrue( LdifUtils.isLDIFSafe( c + testString ) );
+        char c = ( char ) 127;
+        
+        assertTrue( LdifUtils.isLDIFSafe( c + testString ) );
     }
-	
-	/**
-	 * Tests the method IsLdifSafe with a String starting with the
-	 * char with ASCII code greater than 127
-	 */
+    
+    /**
+     * Tests the method IsLdifSafe with a String starting with the
+     * char with ASCII code greater than 127
+     */
     @Test
-	public void testIsLdifSafeStartingWithCharGreaterThan127Bis()
+    public void testIsLdifSafeStartingWithCharGreaterThan127Bis()
     {
-		char c = ( char ) 222;
-		
-		assertFalse( LdifUtils.isLDIFSafe( c + testString ) );
+        char c = ( char ) 222;
+        
+        assertFalse( LdifUtils.isLDIFSafe( c + testString ) );
     }
-	
-	/**
-	 * Tests the method IsLdifSafe with a String containing the
-	 * char NUL (ASCII code 0)
-	 */
+    
+    /**
+     * Tests the method IsLdifSafe with a String containing the
+     * char NUL (ASCII code 0)
+     */
     @Test
-	public void testIsLdifSafeContainsNUL()
+    public void testIsLdifSafeContainsNUL()
     {
-		char c = ( char ) 0;
-		
-		assertFalse( LdifUtils.isLDIFSafe( testString + c + testString ) );
+        char c = ( char ) 0;
+        
+        assertFalse( LdifUtils.isLDIFSafe( testString + c + testString ) );
     }
-	
-	/**
-	 * Tests the method IsLdifSafe with a String containing the
-	 * char LF (ASCII code 10)
-	 */
+    
+    /**
+     * Tests the method IsLdifSafe with a String containing the
+     * char LF (ASCII code 10)
+     */
     @Test
-	public void testIsLdifSafeContainsLF()
+    public void testIsLdifSafeContainsLF()
     {
-		char c = ( char ) 10;
-		
-		assertFalse( LdifUtils.isLDIFSafe( testString + c + testString ) );
+        char c = ( char ) 10;
+        
+        assertFalse( LdifUtils.isLDIFSafe( testString + c + testString ) );
     }
-	
-	/**
-	 * Tests the method IsLdifSafe with a String containing the
-	 * char CR (ASCII code 13)
-	 */
+    
+    /**
+     * Tests the method IsLdifSafe with a String containing the
+     * char CR (ASCII code 13)
+     */
     @Test
-	public void testIsLdifSafeContainsCR()
+    public void testIsLdifSafeContainsCR()
     {
-		char c = ( char ) 13;
-		
-		assertFalse( LdifUtils.isLDIFSafe( testString + c + testString ) );
+        char c = ( char ) 13;
+        
+        assertFalse( LdifUtils.isLDIFSafe( testString + c + testString ) );
     }
-	
-	/**
-	 * Tests the method IsLdifSafe with a String containing the
-	 * char with ASCII code 127
-	 */
+    
+    /**
+     * Tests the method IsLdifSafe with a String containing the
+     * char with ASCII code 127
+     */
     @Test
-	public void testIsLdifSafeContainsCharGreaterThan127()
+    public void testIsLdifSafeContainsCharGreaterThan127()
     {
-		char c = ( char ) 127;
-		
-		assertTrue( LdifUtils.isLDIFSafe( testString + c + testString ) );
+        char c = ( char ) 127;
+        
+        assertTrue( LdifUtils.isLDIFSafe( testString + c + testString ) );
     }
-	
-	/**
-	 * Tests the method IsLdifSafe with a String containing a
-	 * char with ASCII code greater than 127
-	 */
+    
+    /**
+     * Tests the method IsLdifSafe with a String containing a
+     * char with ASCII code greater than 127
+     */
     @Test
-	public void testIsLdifSafeContainsCharGreaterThan127Bis()
+    public void testIsLdifSafeContainsCharGreaterThan127Bis()
     {
-		char c = ( char ) 328;
-		
-		assertFalse( LdifUtils.isLDIFSafe( testString + c + testString ) );
+        char c = ( char ) 328;
+        
+        assertFalse( LdifUtils.isLDIFSafe( testString + c + testString ) );
     }
-	
-	/**
-	 * Tests the method IsLdifSafe with a String ending with the
-	 * char SPACE (ASCII code 32)
-	 */
+    
+    /**
+     * Tests the method IsLdifSafe with a String ending with the
+     * char SPACE (ASCII code 32)
+     */
     @Test
-	public void testIsLdifSafeEndingWithSpace()
+    public void testIsLdifSafeEndingWithSpace()
     {
-		char c = ( char ) 32;
-		
-		assertFalse( LdifUtils.isLDIFSafe( testString  + c) );
+        char c = ( char ) 32;
+        
+        assertFalse( LdifUtils.isLDIFSafe( testString  + c) );
     }
-	
-	/**
-	 * Tests the method IsLdifSafe with a correct String
-	 */
+    
+    /**
+     * Tests the method IsLdifSafe with a correct String
+     */
     @Test
-	public void testIsLdifSafeCorrectString()
-    {		
-		assertTrue( LdifUtils.isLDIFSafe( testString ) );
+    public void testIsLdifSafeCorrectString()
+    {        
+        assertTrue( LdifUtils.isLDIFSafe( testString ) );
     }
     
     
@@ -1065,14 +1065,14 @@
     public void testReverseMultipleModifications() throws NamingException
     {
         String initialEntryLdif = 
-        		"dn: cn=test, ou=system\n" + 
-        		"objectclass: top\n" + 
-        		"objectclass: person\n" + 
-        		"cn: test\n" + 
-        		"sn: joe doe\n" + 
-        		"l: USA\n" + 
-        		"ou: apache\n" + 
-        		"ou: acme corp\n"; 
+                "dn: cn=test, ou=system\n" + 
+                "objectclass: top\n" + 
+                "objectclass: person\n" + 
+                "cn: test\n" + 
+                "sn: joe doe\n" + 
+                "l: USA\n" + 
+                "ou: apache\n" + 
+                "ou: acme corp\n"; 
         
         LdifReader reader = new LdifReader();
         List<LdifEntry> entries = reader.parseLdif( initialEntryLdif );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java Mon May 12 04:49:35 2008
@@ -48,8 +48,8 @@
  */
 public class AddRequestImplTest extends TestCase
 {
-	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
-	
+    private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
+    
     /**
      * Creates and populates a AttributeImpl with a specific id.
      * 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java Mon May 12 04:49:35 2008
@@ -36,7 +36,7 @@
  */
 public class ArrayNamingEnumerationTest extends TestCase
 {
-	/**
+    /**
      * Tests ArrayNamingEnumeration using an null array.
      */
     public void testUsingNullArray()

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java Mon May 12 04:49:35 2008
@@ -44,9 +44,9 @@
  */
 public class BindRequestImplTest extends TestCase
 {
-	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
+    private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
-	/**
+    /**
      * Tests the same object referrence for equality.
      */
     public void testEqualsSameObj()

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java Mon May 12 04:49:35 2008
@@ -45,9 +45,9 @@
  */
 public class CompareRequestImplTest extends TestCase
 {
-	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
+    private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
-	/**
+    /**
      * Tests the same object referrence for equality.
      */
     public void testEqualsSameObj()

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java Mon May 12 04:49:35 2008
@@ -45,9 +45,9 @@
  */
 public class DeleteRequestImplTest extends TestCase
 {
-	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
+    private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
-	/**
+    /**
      * Tests the same object referrence for equality.
      */
     public void testEqualsSameObj()

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java Mon May 12 04:49:35 2008
@@ -44,9 +44,9 @@
  */
 public class ExtendedRequestImplTest extends TestCase
 {
-	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
+    private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
-	/**
+    /**
      * Tests the same object referrence for equality.
      */
     public void testEqualsSameObj()

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java Mon May 12 04:49:35 2008
@@ -47,9 +47,9 @@
  */
 public class ExtendedResponseImplTest extends TestCase
 {
-	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
+    private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
-	/**
+    /**
      * Creates and populates a ExtendedResponseImpl stub for testing purposes.
      * 
      * @return a populated ExtendedResponseImpl stub

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java Mon May 12 04:49:35 2008
@@ -46,9 +46,9 @@
  */
 public class ModifyDnRequestImplTest extends TestCase
 {
-	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
+    private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
-	/**
+    /**
      * Constructs a ModifyDnrequest to test.
      * 
      * @return the request

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java Mon May 12 04:49:35 2008
@@ -51,9 +51,9 @@
  */
 public class ModifyRequestImplTest extends TestCase
 {
-	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
+    private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
-	/**
+    /**
      * Builds a ModifyRequest for testing purposes.
      * 
      * @return the ModifyRequest to use for tests

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java Mon May 12 04:49:35 2008
@@ -47,9 +47,9 @@
  */
 public class SearchResponseDoneImplTest extends TestCase
 {
-	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
+    private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
-	/**
+    /**
      * Creates and populates a SearchResponseDoneImpl stub for testing purposes.
      * 
      * @return a populated SearchResponseDoneImpl stub

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java Mon May 12 04:49:35 2008
@@ -46,9 +46,9 @@
  */
 public class SearchResponseEntryImplTest extends TestCase
 {
-	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
+    private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
-	/**
+    /**
      * Creates and populates a AttributeImpl with a specific id.
      * 
      * @param id

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java?rev=655480&r1=655479&r2=655480&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java Mon May 12 04:49:35 2008
@@ -43,9 +43,9 @@
  */
 public class SearchResponseReferenceImplTest extends TestCase
 {
-	private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
+    private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
 
-	/**
+    /**
      * Creates a baseline referral to test with and adds it to the supplied
      * response object.
      * 



Mime
View raw message