Travis Crawford created HCATALOG-568:
----------------------------------------
Summary: Add HideUtilityClassConstructor checkstyle rule
Key: HCATALOG-568
URL: https://issues.apache.org/jira/browse/HCATALOG-568
Project: HCatalog
Issue Type: Improvement
Components: build
Affects Versions: 0.5
Reporter: Travis Crawford
Assignee: Travis Crawford
While reviewing HCATALOG-546 I noticed a utility class that did not have a
private constructor. Instead of having to remember this best-practice we should
encode it in our checkstyle rules to automatically make sure it happens.
Rule:
{code}
<module name="HideUtilityClassConstructor"/>
{code}
Current failures:
{code}
checkstyle:
[echo] hcatalog-core
[checkstyle] Running Checkstyle 5.5 on 109 files
[checkstyle]
/Users/travis/apache/hcatalog-ro/core/src/main/java/org/apache/hadoop/mapred/HCatMapRedUtil.java:25:1:
Utility classes should not have a public or default constructor.
[checkstyle]
/Users/travis/apache/hcatalog-ro/core/src/main/java/org/apache/hcatalog/cli/HCatCli.java:54:1:
Utility classes should not have a public or default constructor.
[checkstyle]
/Users/travis/apache/hcatalog-ro/core/src/main/java/org/apache/hcatalog/common/HCatUtil.java:76:1:
Utility classes should not have a public or default constructor.
[checkstyle]
/Users/travis/apache/hcatalog-ro/core/src/main/java/org/apache/hcatalog/data/HCatRecordObjectInspectorFactory.java:39:1:
Utility classes should not have a public or default constructor.
[checkstyle]
/Users/travis/apache/hcatalog-ro/core/src/main/java/org/apache/hcatalog/data/schema/HCatSchemaUtils.java:39:1:
Utility classes should not have a public or default constructor.
[checkstyle]
/Users/travis/apache/hcatalog-ro/core/src/main/java/org/apache/hcatalog/data/transfer/DataTransferFactory.java:35:1:
Utility classes should not have a public or default constructor.
[checkstyle]
/Users/travis/apache/hcatalog-ro/core/src/main/java/org/apache/hcatalog/mapreduce/InitializeInput.java:48:1:
Utility classes should not have a public or default constructor.
[checkstyle]
/Users/travis/apache/hcatalog-ro/core/src/main/java/org/apache/hcatalog/mapreduce/InternalUtil.java:58:1:
Utility classes should not have a public or default constructor.
[checkstyle]
/Users/travis/apache/hcatalog-ro/core/src/main/java/org/apache/hcatalog/oozie/JavaAction.java:28:1:
Utility classes should not have a public or default constructor.
[checkstyle]
/Users/travis/apache/hcatalog-ro/core/src/test/java/org/apache/hcatalog/HcatTestUtils.java:39:1:
Utility classes should not have a public or default constructor.
[checkstyle]
/Users/travis/apache/hcatalog-ro/core/src/test/java/org/apache/hcatalog/data/HCatDataCheckUtil.java:37:1:
Utility classes should not have a public or default constructor.
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira