directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1701707 - in /directory/apacheds/trunk: test-framework/src/checkstyle/ test-framework/src/main/java/org/apache/directory/server/core/integ/ wrapper/src/main/java/org/apache/directory/server/wrapper/
Date Mon, 07 Sep 2015 21:51:21 GMT
Author: seelmann
Date: Mon Sep  7 21:51:20 2015
New Revision: 1701707

URL: http://svn.apache.org/r1701707
Log:
Fix checkstyle issues

Added:
    directory/apacheds/trunk/test-framework/src/checkstyle/
    directory/apacheds/trunk/test-framework/src/checkstyle/suppressions.xml   (with props)
Modified:
    directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/CreateDsRule.java
    directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/CreateLdapConnectionPoolRule.java
    directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/CreateLdapServerRule.java
    directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/DelayInducingInterceptor.java
    directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
    directory/apacheds/trunk/wrapper/src/main/java/org/apache/directory/server/wrapper/ApacheDsTanukiWrapper.java

Added: directory/apacheds/trunk/test-framework/src/checkstyle/suppressions.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/test-framework/src/checkstyle/suppressions.xml?rev=1701707&view=auto
==============================================================================
--- directory/apacheds/trunk/test-framework/src/checkstyle/suppressions.xml (added)
+++ directory/apacheds/trunk/test-framework/src/checkstyle/suppressions.xml Mon Sep  7 21:51:20
2015
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<!DOCTYPE suppressions PUBLIC
+    "-//Puppy Crawl//DTD Suppressions 1.1//EN"
+    "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
+
+<suppressions>
+    <suppress files="org.apache.directory.server.core.integ.AbstractLdapTestUnit" checks="VisibilityModifier"/>
+</suppressions>

Propchange: directory/apacheds/trunk/test-framework/src/checkstyle/suppressions.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/apacheds/trunk/test-framework/src/checkstyle/suppressions.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/CreateDsRule.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/CreateDsRule.java?rev=1701707&r1=1701706&r2=1701707&view=diff
==============================================================================
--- directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/CreateDsRule.java
(original)
+++ directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/CreateDsRule.java
Mon Sep  7 21:51:20 2015
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
  */
 public class CreateDsRule implements TestRule
 {
-    private static Logger LOG = LoggerFactory.getLogger( CreateDsRule.class );
+    private static final Logger LOG = LoggerFactory.getLogger( CreateDsRule.class );
 
     private DirectoryService directoryService;
     private CreateDsRule outerCreateDsRule;

Modified: directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/CreateLdapConnectionPoolRule.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/CreateLdapConnectionPoolRule.java?rev=1701707&r1=1701706&r2=1701707&view=diff
==============================================================================
--- directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/CreateLdapConnectionPoolRule.java
(original)
+++ directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/CreateLdapConnectionPoolRule.java
Mon Sep  7 21:51:20 2015
@@ -33,7 +33,6 @@ import org.apache.directory.ldap.client.
 import org.apache.directory.ldap.client.template.LdapConnectionTemplate;
 import org.apache.directory.server.annotations.CreateLdapConnectionPool;
 import org.apache.directory.server.ldap.LdapServer;
-import org.junit.rules.TestRule;
 import org.junit.runner.Description;
 import org.junit.runners.model.Statement;
 import org.slf4j.Logger;
@@ -47,7 +46,7 @@ import org.slf4j.LoggerFactory;
  */
 public class CreateLdapConnectionPoolRule extends CreateLdapServerRule
 {
-    private static Logger LOG = LoggerFactory.getLogger( CreateLdapConnectionPoolRule.class
);
+    private static final Logger LOG = LoggerFactory.getLogger( CreateLdapConnectionPoolRule.class
);
     private CreateLdapConnectionPoolRule classCreateLdapConnectionPoolRule;
     private CreateLdapConnectionPool createLdapConnectionPool;
     private LdapConnectionPool ldapConnectionPool;
@@ -215,7 +214,8 @@ public class CreateLdapConnectionPoolRul
         try
         {
             Method timeoutSetter = connectionFactoryClass.getMethod( "setTimeOut", Long.TYPE
);
-            if ( timeoutSetter != null ) {
+            if ( timeoutSetter != null )
+            {
                 timeoutSetter.invoke( ldapConnectionFactory, createLdapConnectionPool.timeout()
);
             }
         }
@@ -240,8 +240,9 @@ public class CreateLdapConnectionPoolRul
         try
         {
             Method setValidator = factoryClass.getMethod( "setValidator", LdapConnectionValidator.class
);
-            if ( setValidator != null ) {
-                setValidator.invoke( poolableLdapConnectionFactory, 
+            if ( setValidator != null )
+            {
+                setValidator.invoke( poolableLdapConnectionFactory,
                     validatorClass.newInstance() );
             }
         }

Modified: directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/CreateLdapServerRule.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/CreateLdapServerRule.java?rev=1701707&r1=1701706&r2=1701707&view=diff
==============================================================================
--- directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/CreateLdapServerRule.java
(original)
+++ directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/CreateLdapServerRule.java
Mon Sep  7 21:51:20 2015
@@ -23,7 +23,6 @@ import org.apache.directory.server.annot
 import org.apache.directory.server.core.api.DirectoryService;
 import org.apache.directory.server.factory.ServerAnnotationProcessor;
 import org.apache.directory.server.ldap.LdapServer;
-import org.junit.rules.TestRule;
 import org.junit.runner.Description;
 import org.junit.runners.model.Statement;
 import org.slf4j.Logger;
@@ -38,7 +37,7 @@ import org.slf4j.LoggerFactory;
  */
 public class CreateLdapServerRule extends CreateDsRule
 {
-    private static Logger LOG = LoggerFactory.getLogger( CreateLdapServerRule.class );
+    private static final Logger LOG = LoggerFactory.getLogger( CreateLdapServerRule.class
);
 
     private CreateLdapServerRule classCreateLdapServerRule;
     private LdapServer ldapServer;

Modified: directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/DelayInducingInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/DelayInducingInterceptor.java?rev=1701707&r1=1701706&r2=1701707&view=diff
==============================================================================
--- directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/DelayInducingInterceptor.java
(original)
+++ directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/DelayInducingInterceptor.java
Mon Sep  7 21:51:20 2015
@@ -26,7 +26,6 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.server.core.api.filtering.EntryFilter;
 import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.api.interceptor.BaseInterceptor;
-import org.apache.directory.server.core.api.interceptor.Interceptor;
 import org.apache.directory.server.core.api.interceptor.context.SearchOperationContext;
 
 

Modified: directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java?rev=1701707&r1=1701706&r2=1701707&view=diff
==============================================================================
--- directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
(original)
+++ directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
Mon Sep  7 21:51:20 2015
@@ -23,7 +23,6 @@ import java.lang.reflect.Method;
 import java.util.UUID;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.directory.api.ldap.codec.standalone.StandaloneLdapApiService;
 import org.apache.directory.server.annotations.CreateKdcServer;
 import org.apache.directory.server.annotations.CreateLdapServer;
 import org.apache.directory.server.core.api.DirectoryService;

Modified: directory/apacheds/trunk/wrapper/src/main/java/org/apache/directory/server/wrapper/ApacheDsTanukiWrapper.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/wrapper/src/main/java/org/apache/directory/server/wrapper/ApacheDsTanukiWrapper.java?rev=1701707&r1=1701706&r2=1701707&view=diff
==============================================================================
--- directory/apacheds/trunk/wrapper/src/main/java/org/apache/directory/server/wrapper/ApacheDsTanukiWrapper.java
(original)
+++ directory/apacheds/trunk/wrapper/src/main/java/org/apache/directory/server/wrapper/ApacheDsTanukiWrapper.java
Mon Sep  7 21:51:20 2015
@@ -34,10 +34,10 @@ import org.tanukisoftware.wrapper.Wrappe
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ApacheDsTanukiWrapper implements WrapperListener
+public final class ApacheDsTanukiWrapper implements WrapperListener
 {
     /** The logger */
-    private static final Logger log = LoggerFactory.getLogger( ApacheDsTanukiWrapper.class
);
+    private static final Logger LOG = LoggerFactory.getLogger( ApacheDsTanukiWrapper.class
);
 
     /** The ApacheDS service*/
     private ApacheDsService service;
@@ -56,7 +56,7 @@ public class ApacheDsTanukiWrapper imple
 
     public Integer start( String[] args )
     {
-        log.info( "Starting the service..." );
+        LOG.info( "Starting the service..." );
 
         if ( ( args != null ) && ( args.length == 1 ) )
         {
@@ -73,7 +73,7 @@ public class ApacheDsTanukiWrapper imple
             }
             catch ( Exception e )
             {
-                log.error( "Failed to start the service.", e );
+                LOG.error( "Failed to start the service.", e );
                 System.exit( ExitCodes.START );
             }
         }
@@ -89,7 +89,7 @@ public class ApacheDsTanukiWrapper imple
 
     public int stop( int exitCode )
     {
-        log.info( "Attempting graceful shutdown of the service..." );
+        LOG.info( "Attempting graceful shutdown of the service..." );
 
         // Stopping the service
         try
@@ -98,11 +98,11 @@ public class ApacheDsTanukiWrapper imple
         }
         catch ( Exception e )
         {
-            log.error( "Failed to stop the service.", e );
+            LOG.error( "Failed to stop the service.", e );
             System.exit( ExitCodes.STOP );
         }
 
-        log.info( "Completed graceful shutdown of the service..." );
+        LOG.info( "Completed graceful shutdown of the service..." );
 
         return exitCode;
     }
@@ -110,17 +110,13 @@ public class ApacheDsTanukiWrapper imple
 
     public void controlEvent( int event )
     {
-        if ( WrapperManager.isControlledByNativeWrapper() )
-        {
-            // The Wrapper will take care of this event
-        }
-        else
+        if ( !WrapperManager.isControlledByNativeWrapper() )
         {
             // We are not being controlled by the Wrapper, so
             // handle the event ourselves.
-            if ( ( event == WrapperManager.WRAPPER_CTRL_C_EVENT ) ||
-                ( event == WrapperManager.WRAPPER_CTRL_CLOSE_EVENT ) ||
-                ( event == WrapperManager.WRAPPER_CTRL_SHUTDOWN_EVENT ) )
+            if ( ( event == WrapperManager.WRAPPER_CTRL_C_EVENT )
+                || ( event == WrapperManager.WRAPPER_CTRL_CLOSE_EVENT )
+                || ( event == WrapperManager.WRAPPER_CTRL_SHUTDOWN_EVENT ) )
             {
                 WrapperManager.stop( 0 );
             }



Mime
View raw message