This is an automated email from the ASF dual-hosted git repository.

anatole pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-tamaya-extensions.git


The following commit(s) were added to refs/heads/master by this push:
     new 02ea60e  TAMAYA-379: Tighten checkstyle rules for extension modules
     new bd11434  Merge pull request #30 from acoburn/TAMAYA-379
02ea60e is described below

commit 02ea60ec9ba643bab4aabbf2540ac6d5917b6416
Author: Aaron Coburn <acob...@apache.org>
AuthorDate: Mon Feb 25 08:24:27 2019 -0500

    TAMAYA-379: Tighten checkstyle rules for extension modules
    
    This brings the checkstyle configuration more in line with checkstyle
    defaults as well as the existing style configuration for the main
    codebase.
---
 buildtools/src/main/resources/checkstyle/style.xml   | 20 ++------------------
 .../tamaya/osgi/injection/TamayaOSGIInjector.java    |  4 ++--
 2 files changed, 4 insertions(+), 20 deletions(-)

diff --git a/buildtools/src/main/resources/checkstyle/style.xml 
b/buildtools/src/main/resources/checkstyle/style.xml
index 473daab..75638ac 100644
--- a/buildtools/src/main/resources/checkstyle/style.xml
+++ b/buildtools/src/main/resources/checkstyle/style.xml
@@ -53,20 +53,7 @@ under the License.
                 </module>
         -->
 
-        <module name="ConstantName">
-            <!-- Normal rules, except that:
-               -  * any name can start with an underscore.
-               -  * "log" is allowed; this is a traditional name for log 
objects
-               -  * names ending with "ThreadLocal" are allowed so that 
threadlocal vars don't have to be
-               -    all-caps. They are static final, but are not really 
constants. Yes, type prefixes
-               -    on variable names sucks ("hungarian notation") but 
checkstyle doesn't allow
-               -    name rules to vary by the type of the constant, and no 
other alternative seems
-               -    any better.
-               -->
-            <property name="format"
-                      
value="^_?((log)|(logger)|([a-z][a-zA-Z]*ThreadLocal)|([A-Z][A-Z0-9]*(_[A-Z0-9]+)*))$"/>
-        </module>
-
+        <module name="ConstantName"/>
         <module name="LocalVariableName"/>
         <module name="MethodName">
             <property name="format"
@@ -76,10 +63,7 @@ under the License.
         <module name="LocalFinalVariableName"/>
         <module name="ParameterName"/>
         <module name="StaticVariableName"/>
-        <module name="TypeName">
-            <property name="format"
-                      value="^_?[A-Z][a-zA-Z0-9]*$"/>
-        </module>
+        <module name="TypeName"/>
 
         <!-- Checks for imports                              -->
         <!-- See http://checkstyle.sf.net/config_import.html -->
diff --git 
a/modules/osgi/injection/src/main/java/org/apache/tamaya/osgi/injection/TamayaOSGIInjector.java
 
b/modules/osgi/injection/src/main/java/org/apache/tamaya/osgi/injection/TamayaOSGIInjector.java
index 4969433..ec9b5e4 100644
--- 
a/modules/osgi/injection/src/main/java/org/apache/tamaya/osgi/injection/TamayaOSGIInjector.java
+++ 
b/modules/osgi/injection/src/main/java/org/apache/tamaya/osgi/injection/TamayaOSGIInjector.java
@@ -39,7 +39,7 @@ import java.util.logging.Logger;
  */
 public class TamayaOSGIInjector{
     /** The logger. */
-    private static final Logger log = 
Logger.getLogger(TamayaConfigPlugin.class.getName());
+    private static final Logger LOG = 
Logger.getLogger(TamayaConfigPlugin.class.getName());
     /** The bundle context. */
     private BundleContext context;
     /** OSGI Config manager. */
@@ -67,7 +67,7 @@ public class TamayaOSGIInjector{
         tracker = new ServiceTracker<Object, Object>(context, 
Object.class.getName(), null) {
             @Override
             public Object addingService(ServiceReference reference) {
-                log.info("Checking service for configuration: " + reference);
+                LOG.info("Checking service for configuration: " + reference);
                 Object service =  super.addingService(reference);
                 if(isInjectionEnabled(reference)) {
                     String pid = 
(String)reference.getProperty(Constants.SERVICE_PID);

Reply via email to