directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r487348 - in /directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap: codec/ codec/actions/ codec/add/ codec/bind/ codec/extended/ codec/extended/operations/ codec/modify/ codec/search/ codec/search/controls/ codec/util...
Date Thu, 14 Dec 2006 20:56:14 GMT
Author: elecharny
Date: Thu Dec 14 12:56:13 2006
New Revision: 487348

URL: http://svn.apache.org/viewvc?view=rev&rev=487348
Log:
Removing lot of warnings

Modified:
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessage.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixEncoder.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ControlValueAction.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindResponse.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequest.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectGrammar.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownGrammar.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedure.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureGrammar.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/NotFilter.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequest.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SubstringFilter.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlGrammar.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlGrammar.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlGrammar.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURL.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapServiceUnavailableException.java
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessage.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessage.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessage.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessage.java
Thu Dec 14 12:56:13 2006
@@ -109,7 +109,7 @@
      */
     public Control getControls( int i )
     {
-        return ( Control ) controls.get( i );
+        return controls.get( i );
     }
 
 

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
Thu Dec 14 12:56:13 2006
@@ -123,10 +123,10 @@
     // -----------------------------------------------------------------
 
     /** The logger */
-    private static final Logger log = LoggerFactory.getLogger( LdapMessageGrammar.class );
+    static final Logger log = LoggerFactory.getLogger( LdapMessageGrammar.class );
 
     /** A speedup for logger */
-    private static final boolean IS_DEBUG = log.isDebugEnabled();
+    static final boolean IS_DEBUG = log.isDebugEnabled();
     
     /** The instance of grammar. LdapMessageGrammar is a singleton */
     private static IGrammar instance = new LdapMessageGrammar();
@@ -593,12 +593,12 @@
                     }
                     else
                     {
-                        LdapDN name = LdapDN.EMPTY_LDAPDN;
+                        LdapDN dn = LdapDN.EMPTY_LDAPDN;
                         byte[] dnBytes = tlv.getValue().getData();
 
                         try
                         {
-                            name = new LdapDN( dnBytes );
+                            dn = new LdapDN( dnBytes );
                         }
                         catch ( InvalidNameException ine )
                         {
@@ -612,7 +612,7 @@
                             throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX,
LdapDN.EMPTY_LDAPDN, ine );
                         }
 
-                        bindRequestMessage.setName( name );
+                        bindRequestMessage.setName( dn );
                     }
 
                     if ( IS_DEBUG )
@@ -2315,7 +2315,7 @@
                         try
                         {
                             LdapDN dn = new LdapDN( dnBytes );
-                            newRdn = ( ( LdapDN ) dn ).getRdn( 0 );
+                            newRdn = dn.getRdn( 0 );
                         }
                         catch ( InvalidNameException ine )
                         {

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixEncoder.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixEncoder.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixEncoder.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixEncoder.java
Thu Dec 14 12:56:13 2006
@@ -53,7 +53,7 @@
     private static final boolean IS_DEBUG = log.isDebugEnabled();
     
     /** The associated Provider */
-    private final Provider provider;
+    final Provider provider;
 
     /** The callback to call when the encoding is done */
     private EncoderCallback encodeCallback;

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
Thu Dec 14 12:56:13 2006
@@ -394,15 +394,15 @@
 
                 if ( twixFilter instanceof AndFilter )
                 {
-                    branch = new BranchNode( BranchNode.AND );
+                    branch = new BranchNode( AbstractExprNode.AND );
                 }
                 else if ( twixFilter instanceof OrFilter )
                 {
-                    branch = new BranchNode( BranchNode.OR );
+                    branch = new BranchNode( AbstractExprNode.OR );
                 }
                 else if ( twixFilter instanceof NotFilter )
                 {
-                    branch = new BranchNode( BranchNode.NOT );
+                    branch = new BranchNode( AbstractExprNode.NOT );
                 }
 
                 List<Filter> filtersSet = ( ( ConnectorFilter ) twixFilter ).getFilterSet();

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ControlValueAction.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ControlValueAction.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ControlValueAction.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ControlValueAction.java
Thu Dec 14 12:56:13 2006
@@ -87,7 +87,7 @@
         Control control = message.getCurrentControl();
         Value value = tlv.getValue();
 
-        ControlDecoder decoder = ( ControlDecoder ) controlDecoders.get( control.getControlType()
);
+        ControlDecoder decoder = controlDecoders.get( control.getControlType() );
 
         // Store the value - have to handle the special case of a 0 length value
         if ( tlv.getLength() == 0 )

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
Thu Dec 14 12:56:13 2006
@@ -372,7 +372,7 @@
 
                     // The attributes list sequence
                     buffer.put( UniversalTag.SEQUENCE_TAG );
-                    int localAttributeLength = ( ( Integer ) attributeLength.get( attributeNumber
) ).intValue();
+                    int localAttributeLength = attributeLength.get( attributeNumber );
                     buffer.put( TLV.getBytes( localAttributeLength ) );
 
                     // The attribute type
@@ -380,7 +380,7 @@
 
                     // The values
                     buffer.put( UniversalTag.SET_TAG );
-                    int localValuesLength = ( ( Integer ) valuesLength.get( attributeNumber
) ).intValue();
+                    int localValuesLength = valuesLength.get( attributeNumber );
                     buffer.put( TLV.getBytes( localValuesLength ) );
 
                     try

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindResponse.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindResponse.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindResponse.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindResponse.java
Thu Dec 14 12:56:13 2006
@@ -120,8 +120,8 @@
 
         if ( serverSaslCreds != null )
         {
-            bindResponseLength += 1 + TLV.getNbBytes( ( ( byte[] ) serverSaslCreds ).length
)
-                + ( ( byte[] ) serverSaslCreds ).length;
+            bindResponseLength += 1 + TLV.getNbBytes( serverSaslCreds.length )
+                + serverSaslCreds.length;
         }
 
         return 1 + TLV.getNbBytes( bindResponseLength ) + bindResponseLength;
@@ -156,11 +156,11 @@
             {
                 buffer.put( ( byte ) LdapConstants.SERVER_SASL_CREDENTIAL_TAG );
 
-                buffer.put( TLV.getBytes( ( ( byte[] ) serverSaslCreds ).length ) );
+                buffer.put( TLV.getBytes( serverSaslCreds.length ) );
 
-                if ( ( ( byte[] ) serverSaslCreds ).length != 0 )
+                if ( serverSaslCreds.length != 0 )
                 {
-                    buffer.put( ( byte[] ) serverSaslCreds );
+                    buffer.put( serverSaslCreds );
                 }
             }
         }

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequest.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequest.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequest.java
Thu Dec 14 12:56:13 2006
@@ -149,8 +149,8 @@
 
         if ( requestValue != null )
         {
-            extendedRequestLength += 1 + TLV.getNbBytes( ( ( byte[] ) requestValue ).length
)
-                + ( ( byte[] ) requestValue ).length;
+            extendedRequestLength += 1 + TLV.getNbBytes( requestValue.length )
+                + requestValue.length;
         }
 
         return 1 + TLV.getNbBytes( extendedRequestLength ) + extendedRequestLength;

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectGrammar.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectGrammar.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectGrammar.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectGrammar.java
Thu Dec 14 12:56:13 2006
@@ -25,6 +25,7 @@
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.grammar.GrammarTransition;
 import org.apache.directory.shared.asn1.ber.grammar.IGrammar;
+import org.apache.directory.shared.asn1.ber.grammar.IStates;
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.DecoderException;
@@ -61,10 +62,10 @@
 public class GracefulDisconnectGrammar extends AbstractGrammar implements IGrammar
 {
     /** The logger */
-    private static final Logger log = LoggerFactory.getLogger( GracefulDisconnectGrammar.class
);
+    static final Logger log = LoggerFactory.getLogger( GracefulDisconnectGrammar.class );
 
     /** Speedup for logs */
-    private static final boolean IS_DEBUG = log.isDebugEnabled();
+    static final boolean IS_DEBUG = log.isDebugEnabled();
 
     /** The instance of grammar. GracefulDisconnectnGrammar is a singleton */
     private static IGrammar instance = new GracefulDisconnectGrammar();
@@ -182,8 +183,8 @@
          * 
          * Creates the GracefulDisconnect object
          */
-        super.transitions[GracefulDisconnectStatesEnum.INIT_GRAMMAR_STATE][UniversalTag.SEQUENCE_TAG]
= 
-            new GrammarTransition( GracefulDisconnectStatesEnum.INIT_GRAMMAR_STATE,
+        super.transitions[IStates.INIT_GRAMMAR_STATE][UniversalTag.SEQUENCE_TAG] = 
+            new GrammarTransition( IStates.INIT_GRAMMAR_STATE,
                                     GracefulDisconnectStatesEnum.GRACEFUL_DISCONNECT_SEQUENCE_STATE,

                                     UniversalTag.SEQUENCE_TAG,
                 new GrammarAction(

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownGrammar.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownGrammar.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownGrammar.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownGrammar.java
Thu Dec 14 12:56:13 2006
@@ -25,6 +25,7 @@
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.grammar.GrammarTransition;
 import org.apache.directory.shared.asn1.ber.grammar.IGrammar;
+import org.apache.directory.shared.asn1.ber.grammar.IStates;
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.DecoderException;
@@ -52,10 +53,10 @@
 public class GracefulShutdownGrammar extends AbstractGrammar implements IGrammar
 {
     /** The logger */
-    private static final Logger log = LoggerFactory.getLogger( GracefulShutdownGrammar.class
);
+    static final Logger log = LoggerFactory.getLogger( GracefulShutdownGrammar.class );
 
     /** Speedup for logs */
-    private static final boolean IS_DEBUG = log.isDebugEnabled();
+    static final boolean IS_DEBUG = log.isDebugEnabled();
 
     /** The instance of grammar. GracefulShutdownGrammar is a singleton */
     private static IGrammar instance = new GracefulShutdownGrammar();
@@ -80,8 +81,8 @@
          *     
          * Creates the GracefulShutdown object
          */
-        super.transitions[GracefulShutdownStatesEnum.INIT_GRAMMAR_STATE][UniversalTag.SEQUENCE_TAG]
= 
-            new GrammarTransition( GracefulShutdownStatesEnum.INIT_GRAMMAR_STATE, GracefulShutdownStatesEnum.GRACEFUL_SHUTDOWN_SEQUENCE_STATE,
UniversalTag.SEQUENCE_TAG,
+        super.transitions[IStates.INIT_GRAMMAR_STATE][UniversalTag.SEQUENCE_TAG] = 
+            new GrammarTransition( IStates.INIT_GRAMMAR_STATE, GracefulShutdownStatesEnum.GRACEFUL_SHUTDOWN_SEQUENCE_STATE,
UniversalTag.SEQUENCE_TAG,
                 new GrammarAction( "Init GracefulShutdown" )
             {
                 public void action( IAsn1Container container )

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedure.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedure.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedure.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedure.java
Thu Dec 14 12:56:13 2006
@@ -119,9 +119,9 @@
      */
     public static class StoredProcedureParameter
     {
-        private byte[] type;
+        byte[] type;
 
-        private byte[] value;
+        byte[] value;
 
 
         public byte[] getType()
@@ -261,7 +261,7 @@
 
                     // The parameter sequence
                     bb.put( UniversalTag.SEQUENCE_TAG );
-                    int localParameterLength = ( ( Integer ) parameterLength.get( parameterNumber
) ).intValue();
+                    int localParameterLength = parameterLength.get( parameterNumber );
                     bb.put( TLV.getBytes( localParameterLength ) );
 
                     // The parameter type

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureGrammar.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureGrammar.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureGrammar.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureGrammar.java
Thu Dec 14 12:56:13 2006
@@ -45,7 +45,7 @@
 
     /** The logger */
     //private static final Logger log = LoggerFactory.getLogger( StoredProcedureGrammar.class
);
-    private static final Logger log = Logger.getLogger( StoredProcedureGrammar.class );
+    static final Logger log = Logger.getLogger( StoredProcedureGrammar.class );
 
     /** The instance of grammar. StoredProcedureGrammar is a singleton. */
     private static IGrammar instance = new StoredProcedureGrammar();

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java
Thu Dec 14 12:56:13 2006
@@ -452,8 +452,8 @@
 
                     // The modification sequence
                     buffer.put( UniversalTag.SEQUENCE_TAG );
-                    int localModificationSequenceLength = ( ( Integer ) modificationSequenceLength
-                        .get( modificationNumber ) ).intValue();
+                    int localModificationSequenceLength = modificationSequenceLength
+                        .get( modificationNumber );
                     buffer.put( TLV.getBytes( localModificationSequenceLength ) );
 
                     // The operation. The value has to be changed, it's not
@@ -479,8 +479,7 @@
 
                     // The modification
                     buffer.put( UniversalTag.SEQUENCE_TAG );
-                    int localModificationLength = ( ( Integer ) modificationLength.get( modificationNumber
) )
-                        .intValue();
+                    int localModificationLength = modificationLength.get( modificationNumber
);
                     buffer.put( TLV.getBytes( localModificationLength ) );
 
                     // The modification type
@@ -488,7 +487,7 @@
 
                     // The values
                     buffer.put( UniversalTag.SET_TAG );
-                    int localValuesLength = ( ( Integer ) valuesLength.get( modificationNumber
) ).intValue();
+                    int localValuesLength = valuesLength.get( modificationNumber );
                     buffer.put( TLV.getBytes( localValuesLength ) );
 
                     try

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/NotFilter.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/NotFilter.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/NotFilter.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/NotFilter.java
Thu Dec 14 12:56:13 2006
@@ -71,7 +71,7 @@
      */
     public Filter getNotFilter()
     {
-        return ( Filter ) filterSet.get( 0 );
+        return filterSet.get( 0 );
     }
 
 

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequest.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequest.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequest.java
Thu Dec 14 12:56:13 2006
@@ -352,26 +352,26 @@
      * 
      * @param filter The filter to set.
      */
-    public void addCurrentFilter( Filter filter ) throws DecoderException
+    public void addCurrentFilter( Filter localFilter ) throws DecoderException
     {
         if ( currentFilter != null )
         {
             // Ok, we have a parent. The new Filter will be added to
             // this parent, and will become the currentFilter if it's a connector.
-            ( ( ConnectorFilter ) currentFilter ).addFilter( filter );
-            filter.setParent( currentFilter );
+            ( ( ConnectorFilter ) currentFilter ).addFilter( localFilter );
+            localFilter.setParent( currentFilter );
             
-            if ( filter instanceof ConnectorFilter )
+            if ( localFilter instanceof ConnectorFilter )
             {
-                currentFilter = filter;
+                currentFilter = localFilter;
             }
         }
         else
         {
             // No parent. This Filter will become the root.
-            currentFilter = filter;
+            currentFilter = localFilter;
             currentFilter.setParent( this );
-            this.filter = filter;
+            this.filter = localFilter;
         }
     }
 
@@ -380,7 +380,7 @@
      * 
      * @param filter The filter to set.
      */
-    public void setCurrentFilter( Filter filter ) throws DecoderException
+    public void setCurrentFilter( Filter filter )
     {
         currentFilter = filter;
     }
@@ -394,22 +394,22 @@
      * 
      * @param container The container being decoded
      */
-    public void unstackFilters( IAsn1Container container ) throws DecoderException
+    public void unstackFilters( IAsn1Container container )
     {
         LdapMessageContainer ldapMessageContainer = ( LdapMessageContainer ) container;
 
         TLV tlv = ldapMessageContainer.getCurrentTLV();
-        TLV parent = tlv.getParent();
-        Filter filter = terminalFilter;
+        TLV localParent = tlv.getParent();
+        Filter localFilter = terminalFilter;
 
         // The parent has been completed, so fold it
-        while ( ( parent != null ) && ( parent.getExpectedLength() == 0 ) )
+        while ( ( localParent != null ) && ( localParent.getExpectedLength() == 0
) )
         {
-            Asn1Object filterParent = filter.getParent();
+            Asn1Object filterParent = localFilter.getParent();
             
             // We have a special case with PresentFilter, which has not been 
             // pushed on the stack, so we need to get its parent's parent
-            if ( filter instanceof PresentFilter )
+            if ( localFilter instanceof PresentFilter )
             {
                 filterParent = filterParent.getParent();
             }
@@ -419,8 +419,8 @@
                 // The parent is a filter ; it will become the new currentFilter
                 // and we will loop again. 
                 currentFilter = (Filter)filterParent;
-                filter = currentFilter;
-                parent = parent.getParent();
+                localFilter = currentFilter;
+                localParent = localParent.getParent();
             }
             else
             {

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java
Thu Dec 14 12:56:13 2006
@@ -159,7 +159,7 @@
      */
     public void setPartialAttributeList( Attributes partialAttributeList )
     {
-        this.partialAttributeList = ( Attributes ) partialAttributeList;
+        this.partialAttributeList = partialAttributeList;
     }
 
 
@@ -268,7 +268,7 @@
 
                             while ( values.hasMoreElements() )
                             {
-                                Object value = ( Object ) values.next();
+                                Object value = values.next();
 
                                 if ( value instanceof String )
                                 {

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SubstringFilter.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SubstringFilter.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SubstringFilter.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SubstringFilter.java
Thu Dec 14 12:56:13 2006
@@ -112,9 +112,9 @@
      * 
      * @param anySubstrings The anySubstrings to set.
      */
-    public void addAnySubstrings( String anySubstrings )
+    public void addAnySubstrings( String any )
     {
-        this.anySubstrings.add( anySubstrings );
+        this.anySubstrings.add( any );
     }
 
 

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlGrammar.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlGrammar.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlGrammar.java
Thu Dec 14 12:56:13 2006
@@ -47,10 +47,10 @@
 public class EntryChangeControlGrammar extends AbstractGrammar implements IGrammar
 {
     /** The logger */
-    private static final Logger log = LoggerFactory.getLogger( EntryChangeControlGrammar.class
);
+    static final Logger log = LoggerFactory.getLogger( EntryChangeControlGrammar.class );
 
     /** Speedup for logs */
-    private static final boolean IS_DEBUG = log.isDebugEnabled();
+    static final boolean IS_DEBUG = log.isDebugEnabled();
 
     /** The instance of grammar. EntryChangeControlGrammar is a singleton */
     private static IGrammar instance = new EntryChangeControlGrammar();

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlGrammar.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlGrammar.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlGrammar.java
Thu Dec 14 12:56:13 2006
@@ -25,6 +25,7 @@
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.grammar.GrammarTransition;
 import org.apache.directory.shared.asn1.ber.grammar.IGrammar;
+import org.apache.directory.shared.asn1.ber.grammar.IStates;
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.DecoderException;
@@ -59,10 +60,10 @@
 public class PSearchControlGrammar extends AbstractGrammar implements IGrammar
 {
     /** The logger */
-    private static final Logger log = LoggerFactory.getLogger( PSearchControlGrammar.class
);
+    static final Logger log = LoggerFactory.getLogger( PSearchControlGrammar.class );
 
     /** Speedup for logs */
-    private static final boolean IS_DEBUG = log.isDebugEnabled();
+    static final boolean IS_DEBUG = log.isDebugEnabled();
 
     /** The instance of grammar. PSearchControlGrammar is a singleton */
     private static IGrammar instance = new PSearchControlGrammar();
@@ -86,8 +87,8 @@
          *     
          * Initialize the persistence search object
          */
-        super.transitions[PSearchControlStatesEnum.INIT_GRAMMAR_STATE][UniversalTag.SEQUENCE_TAG]
= 
-            new GrammarTransition( PSearchControlStatesEnum.INIT_GRAMMAR_STATE, 
+        super.transitions[IStates.INIT_GRAMMAR_STATE][UniversalTag.SEQUENCE_TAG] = 
+            new GrammarTransition( IStates.INIT_GRAMMAR_STATE, 
                                     PSearchControlStatesEnum.PSEARCH_SEQUENCE_STATE, 
                                     UniversalTag.SEQUENCE_TAG, 
                 new GrammarAction( "Init PSearchControl" )

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlGrammar.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlGrammar.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlGrammar.java
Thu Dec 14 12:56:13 2006
@@ -45,7 +45,7 @@
 public class SubEntryControlGrammar extends AbstractGrammar implements IGrammar
 {
     /** The logger */
-    private static final Logger log = LoggerFactory.getLogger( SubEntryControlGrammar.class
);
+    static final Logger log = LoggerFactory.getLogger( SubEntryControlGrammar.class );
 
     /** The instance of grammar. SubEntryControlGrammar is a singleton */
     private static IGrammar instance = new SubEntryControlGrammar();

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURL.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURL.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURL.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURL.java
Thu Dec 14 12:56:13 2006
@@ -1153,13 +1153,13 @@
      * @param doubleEncode Set if we need to encode the comma
      * @return An encoded string
      */
-    private String urlEncode( String string, boolean doubleEncode )
+    private String urlEncode( String url, boolean doubleEncode )
     {
         StringBuffer sb = new StringBuffer();
 
-        for ( int i = 0; i < string.length(); i++ )
+        for ( int i = 0; i < url.length(); i++ )
         {
-            char c = string.charAt( i );
+            char c = url.charAt( i );
 
             switch ( c )
             {

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapServiceUnavailableException.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapServiceUnavailableException.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapServiceUnavailableException.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapServiceUnavailableException.java
Thu Dec 14 12:56:13 2006
@@ -87,9 +87,9 @@
      *             if the result code is not within the set
      *             {@link ResultCodeEnum#SERVICEUNAVAILABLE_CODES}.
      */
-    private void checkResultCode( ResultCodeEnum resultCode )
+    private void checkResultCode( ResultCodeEnum result )
     {
-        if ( !ResultCodeEnum.getServiceCodes().contains( resultCode ) )
+        if ( !ResultCodeEnum.getServiceCodes().contains( result ) )
         {
             String msg = "Only the following LDAP result codes can be used: " + ResultCodeEnum.getSearchCodes();
             throw new IllegalArgumentException( msg );

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java?view=diff&rev=487348&r1=487347&r2=487348
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
Thu Dec 14 12:56:13 2006
@@ -235,9 +235,9 @@
         version = DEFAULT_VERSION;
     }
 
-    private void init( BufferedReader in ) throws NamingException
+    private void init( BufferedReader inf ) throws NamingException
     {
-        this.in = in;
+        this.in = inf;
         lines = new ArrayList<String>();
         position = new Position();
         version = DEFAULT_VERSION;
@@ -258,28 +258,28 @@
      */
     public LdifReader( String ldifFileName ) throws NamingException
     {
-        File in = new File( ldifFileName );
+        File inf = new File( ldifFileName );
 
-        if ( in.exists() == false )
+        if ( inf.exists() == false )
         {
-            log.error( "File {} cannot be found", in.getAbsoluteFile() );
-            throw new NamingException( "Cannot find file " + in.getAbsoluteFile() );
+            log.error( "File {} cannot be found", inf.getAbsoluteFile() );
+            throw new NamingException( "Cannot find file " + inf.getAbsoluteFile() );
         }
 
-        if ( in.canRead() == false )
+        if ( inf.canRead() == false )
         {
-            log.error( "File {} cannot be read", in.getName() );
-            throw new NamingException( "Cannot read file " + in.getName() );
+            log.error( "File {} cannot be read", inf.getName() );
+            throw new NamingException( "Cannot read file " + inf.getName() );
         }
 
         try
         {
-            init( new BufferedReader( new FileReader( in ) ) );
+            init( new BufferedReader( new FileReader( inf ) ) );
         }
         catch (FileNotFoundException fnfe)
         {
-            log.error( "File {} cannot be found", in.getAbsoluteFile() );
-            throw new NamingException( "Cannot find file " + in.getAbsoluteFile() );
+            log.error( "File {} cannot be found", inf.getAbsoluteFile() );
+            throw new NamingException( "Cannot find file " + inf.getAbsoluteFile() );
         }
     }
 
@@ -628,8 +628,8 @@
 
                                 try
                                 {
-                                    DataInputStream in = new DataInputStream( new FileInputStream(
file ) );
-                                    in.read( data );
+                                    DataInputStream inf = new DataInputStream( new FileInputStream(
file ) );
+                                    inf.read( data );
 
                                     return data;
                                 }
@@ -1314,7 +1314,7 @@
      */
     private int parseVersion() throws NamingException
     {
-        int version = DEFAULT_VERSION;
+        int ver = DEFAULT_VERSION;
 
         // First, read a list of lines
         readLines();
@@ -1322,7 +1322,7 @@
         if ( lines.size() == 0 )
         {
             log.warn( "The ldif file is empty" );
-            return version;
+            return ver;
         }
 
         // get the first line
@@ -1349,7 +1349,7 @@
 
             try
             {
-                version = Integer.parseInt( versionNumber );
+                ver = Integer.parseInt( versionNumber );
             }
             catch (NumberFormatException nfe)
             {
@@ -1367,7 +1367,7 @@
             log.warn( "No version information : assuming version: 1" );
         }
 
-        return version;
+        return ver;
     }
 
     /**
@@ -1507,11 +1507,11 @@
         }
 
         // Open the file and then get a channel from the stream
-        BufferedReader in;
+        BufferedReader inf;
 
         try
         {
-            in = new BufferedReader( new InputStreamReader( new FileInputStream( file ),
Charset.forName( encoding ) ) );
+            inf = new BufferedReader( new InputStreamReader( new FileInputStream( file ),
Charset.forName( encoding ) ) );
         }
         catch (FileNotFoundException fnfe)
         {
@@ -1519,7 +1519,7 @@
             throw new NamingException( "Filename " + fileName + " not found." );
         }
 
-        return parseLdif( in );
+        return parseLdif( inf );
     }
 
     /**
@@ -1541,11 +1541,11 @@
         }
 
         StringReader strIn = new StringReader( ldif );
-        BufferedReader in = new BufferedReader( strIn );
+        BufferedReader inf = new BufferedReader( strIn );
 
         try
         {
-            List entries = parseLdif( in );
+            List entries = parseLdif( inf );
 
             if ( log.isDebugEnabled() )
             {
@@ -1656,12 +1656,12 @@
      * @throws NamingException
      *             If something went wrong
      */
-    public List<Entry> parseLdif( BufferedReader in ) throws NamingException
+    public List<Entry> parseLdif( BufferedReader inf ) throws NamingException
     {
         // Create a list that will contain the read entries
         List<Entry> entries = new ArrayList<Entry>();
 
-        this.in = in;
+        this.in = inf;
 
         // First get the version - if any -
         version = parseVersion();



Mime
View raw message