You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2020/11/18 16:13:28 UTC
[ofbiz-framework] branch trunk updated: Improved: Comment out
HideUtilityClassConstructor in checkstyle.xml (OFBIZ-12061)
This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new 2480c52 Improved: Comment out HideUtilityClassConstructor in checkstyle.xml (OFBIZ-12061)
2480c52 is described below
commit 2480c52c6ac2b0498bc7a958c2a8dcbd4c8afbd9
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Wed Nov 18 17:12:58 2020 +0100
Improved: Comment out HideUtilityClassConstructor in checkstyle.xml (OFBIZ-12061)
Currently Checkstyle returns 222 occurrences of the message
"Utility classes should not have a public or default constructor."
This is due to https://checkstyle.sourceforge.io/config_design.html#HideUtilityClassConstructor
I don't think we need to follow the "prevents calls from subclass" suggestion there.
I rather suggest to comment out the related class in checkstyle.xml:
ie <!-- <module name="HideUtilityClassConstructor"/> -->
Then should remain only 280 errors and hopefully most will be easy to fix.
At least they will be easier to spot...
Note: I'm working on something else, so I will change
tasks.checkstyleMain.maxErrors from 502 to 280 later...
Thanks: Suraj and Aditya for confirmation
---
config/checkstyle/checkstyle.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml
index 5132539..ebd2440 100644
--- a/config/checkstyle/checkstyle.xml
+++ b/config/checkstyle/checkstyle.xml
@@ -126,7 +126,7 @@ under the License.
value="After, AfterClass, Before, BeforeClass, Test, Property, Override"/>
</module>
<module name="FinalClass"/>
- <module name="HideUtilityClassConstructor"/>
+ <!-- <module name="HideUtilityClassConstructor"/> -->
<module name="InterfaceIsType"/>
<module name="VisibilityModifier"/>