directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1692017 - in /directory/shared/trunk/ldap/codec: core/src/checkstyle/ core/src/main/java/org/apache/directory/api/ldap/codec/ core/src/main/java/org/apache/directory/api/ldap/codec/actions/extendedResponse/ core/src/main/java/org/apache/di...
Date Mon, 20 Jul 2015 20:02:15 GMT
Author: seelmann
Date: Mon Jul 20 20:02:15 2015
New Revision: 1692017

URL: http://svn.apache.org/r1692017
Log:
Fix checkstyle violations

Modified:
    directory/shared/trunk/ldap/codec/core/src/checkstyle/suppressions.xml
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/AttributeValueAssertion.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/extendedResponse/StoreExtendedResponseName.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/modifyRequest/StoreOperationType.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/StoreSearchRequestDerefAlias.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/StoreSearchRequestScope.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchResultReference/StoreReference.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapApiServiceFactory.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapDecoder.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/pagedSearch/PagedResultsDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortRequestGrammar.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortResponseGrammar.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/IntermediateResponseDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/ModifyRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/SearchRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/osgi/DefaultLdapCodecService.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/AttributeValueAssertionFilter.java
    directory/shared/trunk/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/CodecFactoryUtil.java

Modified: directory/shared/trunk/ldap/codec/core/src/checkstyle/suppressions.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/checkstyle/suppressions.xml?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/checkstyle/suppressions.xml (original)
+++ directory/shared/trunk/ldap/codec/core/src/checkstyle/suppressions.xml Mon Jul 20 20:02:15
2015
@@ -24,4 +24,7 @@
     "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
 
 <suppressions>
+
+  <suppress files="org.apache.directory.api.ldap.codec.LdapMessageGrammar" checks="FileLength"/>
+
 </suppressions>

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/AttributeValueAssertion.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/AttributeValueAssertion.java?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/AttributeValueAssertion.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/AttributeValueAssertion.java
Mon Jul 20 20:02:15 2015
@@ -188,6 +188,9 @@ public class AttributeValueAssertion
             case LdapCodecConstants.APPROX_MATCH_FILTER:
                 sb.append( "~=" );
                 break;
+
+            default:
+                throw new IllegalArgumentException( "Unexpected filter type: " + filterType
);
         }
 
         sb.append( dumpObject( assertionValue ) );

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/extendedResponse/StoreExtendedResponseName.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/extendedResponse/StoreExtendedResponseName.java?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/extendedResponse/StoreExtendedResponseName.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/extendedResponse/StoreExtendedResponseName.java
Mon Jul 20 20:02:15 2015
@@ -91,7 +91,8 @@ public class StoreExtendedResponseName e
             extendedResponse = LdapApiServiceFactory.getSingleton().newExtendedResponse(
responseName,
                 container.getMessageId(), null );
             
-            ((ExtendedResponseDecorator<?>)extendedResponse).setLdapResult( ((LdapResultDecorator)(container.getMessage().getLdapResult()
) ) );
+            ( ( ExtendedResponseDecorator<?> ) extendedResponse ).setLdapResult( (
( LdapResultDecorator ) ( container
+                .getMessage().getLdapResult() ) ) );
             container.setMessage( LdapApiServiceFactory.getSingleton().decorate( extendedResponse
) );
         }
 

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/modifyRequest/StoreOperationType.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/modifyRequest/StoreOperationType.java?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/modifyRequest/StoreOperationType.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/modifyRequest/StoreOperationType.java
Mon Jul 20 20:02:15 2015
@@ -106,6 +106,9 @@ public class StoreOperationType extends
                 case LdapCodecConstants.OPERATION_REPLACE:
                     LOG.debug( "Modification operation : REPLACE" );
                     break;
+
+                default:
+                    LOG.debug( "Modification operation : UNKNOWN" );
             }
         }
     }

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/StoreSearchRequestDerefAlias.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/StoreSearchRequestDerefAlias.java?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/StoreSearchRequestDerefAlias.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/StoreSearchRequestDerefAlias.java
Mon Jul 20 20:02:15 2015
@@ -114,6 +114,9 @@ public class StoreSearchRequestDerefAlia
                 case LdapCodecConstants.DEREF_ALWAYS:
                     LOG.debug( "Handling object strategy : DEREF_ALWAYS" );
                     break;
+
+                default:
+                    LOG.debug( "Handling object strategy : UNKNOWN" );
             }
         }
     }

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/StoreSearchRequestScope.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/StoreSearchRequestScope.java?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/StoreSearchRequestScope.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/StoreSearchRequestScope.java
Mon Jul 20 20:02:15 2015
@@ -109,6 +109,9 @@ public class StoreSearchRequestScope ext
                 case LdapCodecConstants.SCOPE_WHOLE_SUBTREE:
                     LOG.debug( "Searching within WHOLE_SUBTREE scope " );
                     break;
+
+                default:
+                    LOG.debug( "Searching within UNKNOWN scope " );
             }
         }
     }

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchResultReference/StoreReference.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchResultReference/StoreReference.java?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchResultReference/StoreReference.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchResultReference/StoreReference.java
Mon Jul 20 20:02:15 2015
@@ -100,7 +100,7 @@ public class StoreReference extends Gram
             catch ( LdapURLEncodingException luee )
             {
                 LOG.error( I18n.err( I18n.ERR_04021, urlStr, luee.getMessage() ) );
-                throw new DecoderException( I18n.err( I18n.ERR_04016, luee.getMessage() )
, luee);
+                throw new DecoderException( I18n.err( I18n.ERR_04016, luee.getMessage() ),
luee );
             }
         }
 

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapApiServiceFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapApiServiceFactory.java?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapApiServiceFactory.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapApiServiceFactory.java
Mon Jul 20 20:02:15 2015
@@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class LdapApiServiceFactory
+public final class LdapApiServiceFactory
 {
     /** Logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( LdapApiServiceFactory.class
);
@@ -46,6 +46,12 @@ public class LdapApiServiceFactory
     private static boolean usingStandaloneImplementation;
 
 
+    private LdapApiServiceFactory()
+    {
+        // TODO Auto-generated constructor stub
+    }
+
+
     /**
      * Checks to see if the factory is initialized.
      *

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapDecoder.java?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapDecoder.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapDecoder.java
Mon Jul 20 20:02:15 2015
@@ -40,7 +40,7 @@ import org.slf4j.LoggerFactory;
 public class LdapDecoder
 {
     /** The logger */
-    private static Logger LOG = LoggerFactory.getLogger( LdapDecoder.class );
+    private static final Logger LOG = LoggerFactory.getLogger( LdapDecoder.class );
 
     /** A speedup for logger */
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
@@ -82,7 +82,8 @@ public class LdapDecoder
             {
                 byte[] buf = new byte[in.available()];
 
-                if ( ( amount = in.read( buf ) ) == -1 )
+                amount = in.read( buf );
+                if ( amount == -1 )
                 {
                     break;
                 }

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/pagedSearch/PagedResultsDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/pagedSearch/PagedResultsDecorator.java?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/pagedSearch/PagedResultsDecorator.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/pagedSearch/PagedResultsDecorator.java
Mon Jul 20 20:02:15 2015
@@ -242,6 +242,9 @@ public class PagedResultsDecorator exten
                     + ( ( getCookie()[2] & 0x00FF ) << 8 ) + ( getCookie()[3] &
0x00FF );
                 break;
 
+            default:
+                break;
+
         }
 
         return value;

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortRequestDecorator.java?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortRequestDecorator.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortRequestDecorator.java
Mon Jul 20 20:02:15 2015
@@ -54,9 +54,9 @@ public class SortRequestDecorator extend
 
     private List<Integer> sortKeyLenList = new ArrayList<Integer>();
 
-    public static int ORDERING_RULE_TAG = 0x80;
+    public static final int ORDERING_RULE_TAG = 0x80;
 
-    public static int REVERSE_ORDER_TAG = 0x81;
+    public static final int REVERSE_ORDER_TAG = 0x81;
 
 
     /**

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortRequestGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortRequestGrammar.java?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortRequestGrammar.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortRequestGrammar.java
Mon Jul 20 20:02:15 2015
@@ -43,7 +43,7 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SortRequestGrammar extends AbstractGrammar<SortRequestContainer>
+public final class SortRequestGrammar extends AbstractGrammar<SortRequestContainer>
 {
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( SortRequestGrammar.class );

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortResponseGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortResponseGrammar.java?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortResponseGrammar.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortResponseGrammar.java
Mon Jul 20 20:02:15 2015
@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SortResponseGrammar extends AbstractGrammar<SortResponseContainer>
+public final class SortResponseGrammar extends AbstractGrammar<SortResponseContainer>
 {
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( SortRequestGrammar.class );

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/IntermediateResponseDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/IntermediateResponseDecorator.java?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/IntermediateResponseDecorator.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/IntermediateResponseDecorator.java
Mon Jul 20 20:02:15 2015
@@ -160,7 +160,7 @@ public class IntermediateResponseDecorat
         {
             // The ExtendedResponse Tag
             buffer.put( LdapCodecConstants.INTERMEDIATE_RESPONSE_TAG );
-            buffer.put( TLV.getBytes( intermediateResponseLength ) ) ;
+            buffer.put( TLV.getBytes( intermediateResponseLength ) );
 
             // The responseName, if any
             if ( ( responseNameBytes != null ) && ( responseNameBytes.length != 0
) )

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/ModifyRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/ModifyRequestDecorator.java?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/ModifyRequestDecorator.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/ModifyRequestDecorator.java
Mon Jul 20 20:02:15 2015
@@ -63,7 +63,7 @@ public class ModifyRequestDecorator exte
     private List<Integer> changeLength;
 
     /** The list of all the modification lengths */
-    private List<Integer> modificationLength ;
+    private List<Integer> modificationLength;
 
     /** The list of all the value lengths */
     private List<Integer> valuesLength;

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/SearchRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/SearchRequestDecorator.java?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/SearchRequestDecorator.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/SearchRequestDecorator.java
Mon Jul 20 20:02:15 2015
@@ -369,27 +369,27 @@ public class SearchRequestDecorator exte
                     AttributeValueAssertion ava = ( ( AttributeValueAssertionFilter ) filter
).getAssertion();
 
                     // Transform =, >=, <=, ~= filters
-                    switch ( ( ( AttributeValueAssertionFilter ) filter ).getFilterType()
)
+                    int filterType = ( ( AttributeValueAssertionFilter ) filter ).getFilterType();
+                    switch ( filterType )
                     {
                         case LdapCodecConstants.EQUALITY_MATCH_FILTER:
                             branch = new EqualityNode( ava.getAttributeDesc(), ava.getAssertionValue()
);
-
                             break;
 
                         case LdapCodecConstants.GREATER_OR_EQUAL_FILTER:
                             branch = new GreaterEqNode( ava.getAttributeDesc(), ava.getAssertionValue()
);
-
                             break;
 
                         case LdapCodecConstants.LESS_OR_EQUAL_FILTER:
                             branch = new LessEqNode( ava.getAttributeDesc(), ava.getAssertionValue()
);
-
                             break;
 
                         case LdapCodecConstants.APPROX_MATCH_FILTER:
                             branch = new ApproximateNode( ava.getAttributeDesc(), ava.getAssertionValue()
);
-
                             break;
+
+                        default:
+                            throw new IllegalArgumentException( "Unexpected filter type:
" + filterType );
                     }
 
                 }

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/osgi/DefaultLdapCodecService.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/osgi/DefaultLdapCodecService.java?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/osgi/DefaultLdapCodecService.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/osgi/DefaultLdapCodecService.java
Mon Jul 20 20:02:15 2015
@@ -415,8 +415,8 @@ public class DefaultLdapCodecService imp
                 }
                 catch ( DecoderException de )
                 {
-                    NamingException ne = new NamingException( "Unable to decode encoded response
value: " +
-                        Strings.dumpBytes( berValue ) );
+                    NamingException ne = new NamingException( "Unable to decode encoded response
value: "
+                        + Strings.dumpBytes( berValue ) );
                     ne.setRootCause( de );
                     throw ne;
                 }

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/AttributeValueAssertionFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/AttributeValueAssertionFilter.java?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/AttributeValueAssertionFilter.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/AttributeValueAssertionFilter.java
Mon Jul 20 20:02:15 2015
@@ -208,6 +208,9 @@ public class AttributeValueAssertionFilt
                 case LdapCodecConstants.APPROX_MATCH_FILTER:
                     buffer.put( ( byte ) LdapCodecConstants.APPROX_MATCH_FILTER_TAG );
                     break;
+
+                default:
+                    throw new IllegalArgumentException( "Unexpected filter type: " + filterType
);
             }
 
             buffer.put( TLV.getBytes( avaLength ) );

Modified: directory/shared/trunk/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/CodecFactoryUtil.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/CodecFactoryUtil.java?rev=1692017&r1=1692016&r2=1692017&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/CodecFactoryUtil.java
(original)
+++ directory/shared/trunk/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/CodecFactoryUtil.java
Mon Jul 20 20:02:15 2015
@@ -76,11 +76,16 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CodecFactoryUtil
+public final class CodecFactoryUtil
 {
     private static final Logger LOG = LoggerFactory.getLogger( CodecFactoryUtil.class );
 
 
+    private CodecFactoryUtil()
+    {
+    }
+
+
     /**
      * Loads the Controls implement out of the box in the codec.
      */
@@ -110,9 +115,9 @@ public class CodecFactoryUtil
         controlFactories.put( persistentSearchFactory.getOid(), persistentSearchFactory );
         LOG.info( "Registered pre-bundled control factory: {}", persistentSearchFactory.getOid()
);
 
-        ControlFactory<Subentries> SubentriesFactory = new SubentriesFactory( apiService
);
-        controlFactories.put( SubentriesFactory.getOid(), SubentriesFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", SubentriesFactory.getOid()
);
+        ControlFactory<Subentries> subentriesFactory = new SubentriesFactory( apiService
);
+        controlFactories.put( subentriesFactory.getOid(), subentriesFactory );
+        LOG.info( "Registered pre-bundled control factory: {}", subentriesFactory.getOid()
);
 
         ControlFactory<PasswordPolicy> passwordPolicyFactory = new PasswordPolicyFactory(
apiService );
         controlFactories.put( passwordPolicyFactory.getOid(), passwordPolicyFactory );
@@ -128,9 +133,9 @@ public class CodecFactoryUtil
         controlFactories.put( virtualListViewResponseFactory.getOid(), virtualListViewResponseFactory
);
         LOG.info( "Registered pre-bundled control factory: {}", virtualListViewResponseFactory.getOid()
);
 
-        ControlFactory<SyncDoneValue> SyncDoneValueFactory = new SyncDoneValueFactory(
apiService );
-        controlFactories.put( SyncDoneValueFactory.getOid(), SyncDoneValueFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", SyncDoneValueFactory.getOid()
);
+        ControlFactory<SyncDoneValue> syncDoneValueFactory = new SyncDoneValueFactory(
apiService );
+        controlFactories.put( syncDoneValueFactory.getOid(), syncDoneValueFactory );
+        LOG.info( "Registered pre-bundled control factory: {}", syncDoneValueFactory.getOid()
);
 
         ControlFactory<SyncInfoValue> syncInfoValueFactory = new SyncInfoValueFactory(
apiService );
         controlFactories.put( syncInfoValueFactory.getOid(), syncInfoValueFactory );



Mime
View raw message