onami-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1435623 - /incubator/onami/trunk/test/src/main/java/org/apache/onami/test/OnamiRunner.java
Date Sat, 19 Jan 2013 17:40:54 GMT
Author: simonetripodi
Date: Sat Jan 19 17:40:54 2013
New Revision: 1435623

URL: http://svn.apache.org/viewvc?rev=1435623&view=rev
Log:
fixed "Name 'logger' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'." checkstyle rule

Modified:
    incubator/onami/trunk/test/src/main/java/org/apache/onami/test/OnamiRunner.java

Modified: incubator/onami/trunk/test/src/main/java/org/apache/onami/test/OnamiRunner.java
URL: http://svn.apache.org/viewvc/incubator/onami/trunk/test/src/main/java/org/apache/onami/test/OnamiRunner.java?rev=1435623&r1=1435622&r2=1435623&view=diff
==============================================================================
--- incubator/onami/trunk/test/src/main/java/org/apache/onami/test/OnamiRunner.java (original)
+++ incubator/onami/trunk/test/src/main/java/org/apache/onami/test/OnamiRunner.java Sat Jan
19 17:40:54 2013
@@ -124,7 +124,7 @@ public class OnamiRunner
     extends BlockJUnit4ClassRunner
 {
 
-    private static final Logger logger = Logger.getLogger( OnamiRunner.class.getName() );
+    private static final Logger LOGGER = Logger.getLogger( OnamiRunner.class.getName() );
 
     private Injector injector;
 
@@ -148,16 +148,16 @@ public class OnamiRunner
 
         try
         {
-            if ( logger.isLoggable( Level.FINER ) )
+            if ( LOGGER.isLoggable( Level.FINER ) )
             {
-                logger.finer( "Inizializing injector for test class: " + klass.getName()
);
+                LOGGER.finer( "Inizializing injector for test class: " + klass.getName()
);
             }
 
             this.allModules = inizializeInjector( klass );
 
-            if ( logger.isLoggable( Level.FINER ) )
+            if ( LOGGER.isLoggable( Level.FINER ) )
             {
-                logger.finer( "done..." );
+                LOGGER.finer( "done..." );
             }
         }
         catch ( Exception e )
@@ -173,19 +173,19 @@ public class OnamiRunner
      */
     public void run( final RunNotifier notifier )
     {
-        if ( logger.isLoggable( Level.FINER ) )
+        if ( LOGGER.isLoggable( Level.FINER ) )
         {
-            logger.finer( " ### Run test case: " + getTestClass().getJavaClass() + " ###
" );
-            logger.finer( " #### Creating injector ####" );
+            LOGGER.finer( " ### Run test case: " + getTestClass().getJavaClass() + " ###
" );
+            LOGGER.finer( " #### Creating injector ####" );
         }
 
         this.injector = createInjector( allModules );
         super.run( notifier );
         this.flush();
 
-        if ( logger.isLoggable( Level.FINER ) )
+        if ( LOGGER.isLoggable( Level.FINER ) )
         {
-            logger.finer( " ### End test case: " + getTestClass().getJavaClass().getName()
+ " ### " );
+            LOGGER.finer( " ### End test case: " + getTestClass().getJavaClass().getName()
+ " ### " );
         }
     }
 
@@ -202,17 +202,17 @@ public class OnamiRunner
     @Override
     protected void runChild( FrameworkMethod method, RunNotifier notifier )
     {
-        if ( logger.isLoggable( Level.FINER ) )
+        if ( LOGGER.isLoggable( Level.FINER ) )
         {
-            logger.finer( " +++ invoke test method: " + method.getName() + " +++ " );
+            LOGGER.finer( " +++ invoke test method: " + method.getName() + " +++ " );
         }
 
         super.runChild( method, notifier );
         resetAllResetAfterMocks();
 
-        if ( logger.isLoggable( Level.FINER ) )
+        if ( LOGGER.isLoggable( Level.FINER ) )
         {
-            logger.finer( " --- end test method: " + method.getName() + " --- " );
+            LOGGER.finer( " --- end test method: " + method.getName() + " --- " );
         }
     }
 
@@ -220,9 +220,9 @@ public class OnamiRunner
     protected Object createTest()
         throws Exception
     {
-        if ( logger.isLoggable( Level.FINER ) )
+        if ( LOGGER.isLoggable( Level.FINER ) )
         {
-            logger.finer( " Create and inject test class: " + getTestClass().getJavaClass()
);
+            LOGGER.finer( " Create and inject test class: " + getTestClass().getJavaClass()
);
         }
         return this.injector.getInstance( getTestClass().getJavaClass() );
     }
@@ -280,9 +280,9 @@ public class OnamiRunner
     {
         try
         {
-            if ( logger.isLoggable( Level.FINER ) )
+            if ( LOGGER.isLoggable( Level.FINER ) )
             {
-                logger.finer( "  Start introspecting class: " + clazz.getName() );
+                LOGGER.finer( "  Start introspecting class: " + clazz.getName() );
             }
             final List<Module> allModules = new ArrayList<Module>( 1 );
 
@@ -355,9 +355,9 @@ public class OnamiRunner
             // Check if the class is itself a Google Module.
             if ( Module.class.isAssignableFrom( getTestClass().getJavaClass() ) )
             {
-                if ( logger.isLoggable( Level.FINER ) )
+                if ( LOGGER.isLoggable( Level.FINER ) )
                 {
-                    logger.finer( "   creating module from test class " + getTestClass().getJavaClass()
);
+                    LOGGER.finer( "   creating module from test class " + getTestClass().getJavaClass()
);
                 }
                 final Module classModule = (Module) getTestClass().getJavaClass().newInstance();
                 allModules.add( classModule );
@@ -382,9 +382,9 @@ public class OnamiRunner
                     final Object mock = entry.getValue();
                     if ( Modifier.isStatic( field.getModifiers() ) )
                     {
-                        if ( logger.isLoggable( Level.FINER ) )
+                        if ( LOGGER.isLoggable( Level.FINER ) )
                         {
-                            logger.finer( "   inject static mock field: " + field.getName()
);
+                            LOGGER.finer( "   inject static mock field: " + field.getName()
);
                         }
 
                         field.setAccessible( true );
@@ -398,7 +398,7 @@ public class OnamiRunner
 
             if ( allModules.size() != 0 )
             {
-                if ( logger.isLoggable( Level.FINER ) )
+                if ( LOGGER.isLoggable( Level.FINER ) )
                 {
                     StringBuilder builder = new StringBuilder();
                     builder.append( " Collected modules: " );
@@ -408,7 +408,7 @@ public class OnamiRunner
                         builder.append( "    " + module );
                         builder.append( "\n" );
                     }
-                    logger.finer( builder.toString() );
+                    LOGGER.finer( builder.toString() );
                 }
                 return Modules.combine( allModules );
             }
@@ -416,9 +416,9 @@ public class OnamiRunner
         }
         finally
         {
-            if ( logger.isLoggable( Level.FINER ) )
+            if ( LOGGER.isLoggable( Level.FINER ) )
             {
-                logger.finer( " ...done" );
+                LOGGER.finer( " ...done" );
             }
         }
     }



Mime
View raw message