cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] reta commented on a change in pull request #387: [CXF-7640] Create a form to set the use of Spring in the classHelper …
Date Sat, 17 Mar 2018 15:43:15 GMT
reta commented on a change in pull request #387: [CXF-7640] Create a form to set the use of
Spring in the classHelper …
URL: https://github.com/apache/cxf/pull/387#discussion_r175261539
 
 

 ##########
 File path: core/src/main/java/org/apache/cxf/common/util/ClassHelper.java
 ##########
 @@ -28,9 +28,15 @@
  *
  */
 public class ClassHelper {
+
+    public static final String USE_DEFAULT_CLASS_HELPER = "org.apache.cxf.useDefaultClassHelper";
+
     static final ClassHelper HELPER;
+    static final ClassHelper CXF_HELPER;
+
     static {
         HELPER = getClassHelper();
 
 Review comment:
   I think more often than not we will create 2 instances of `ClassHelper` (HELPER  and DEFAULT_HELPER
would be the same), I would suggest to do that:
   
   ```
   DEFAULT_HELPER = new ClassHelper();
   HELPER = getClassHelper(DEFAULT_HELPER);
   ```
   And
   
   ```
   private static ClassHelper getClassHelper(ClassHelper defaultHelper) {
    ...
       return defaultHelper;
   }
   ```
   
   So we would be using the same instance in case Spring helpers are not being asked for.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message