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:
[email protected]
With regards,
Apache Git Services