Skip to content

Commit e835537

Browse files
committed
Checkstyle: class design.
Utility classes should not have a public or default constructor.
1 parent 7d9ed5d commit e835537

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

src/main/java/com/github/dockerjava/core/GoLangFileMatch.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
*
4545
*/
4646
public class GoLangFileMatch {
47+
private GoLangFileMatch() {
48+
}
4749

4850
public static final boolean IS_WINDOWS = File.separatorChar == '\\';
4951

src/main/java/com/github/dockerjava/core/NameParser.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
@SuppressWarnings(value = "checkstyle:equalshashcode")
1616
public class NameParser {
17+
private NameParser() {
18+
}
19+
1720
//CHECKSTYLE:OFF
1821
private static final int RepositoryNameTotalLengthMax = 255;
1922

src/main/java/com/github/dockerjava/core/util/FiltersEncoder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
*
1717
*/
1818
public class FiltersEncoder {
19+
private FiltersEncoder() {
20+
}
1921

2022
private static final ObjectMapper OBJECT_MAPPER = new JacksonJaxbJsonProvider().locateMapper(Map.class,
2123
MediaType.APPLICATION_JSON_TYPE);

src/test/resources/checkstyle/checkstyle-config.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,13 @@
148148
<module name="SimplifyBooleanExpression"/>
149149
<module name="SimplifyBooleanReturn"/>
150150

151+
<!-- Checks for class design -->
152+
<!-- See http://checkstyle.sf.net/config_design.html -->
153+
<module name="HideUtilityClassConstructor"/>
154+
<module name="InterfaceIsType"/>
155+
<!-- FIXME check with @marcuslinke -->
156+
<!--<module name="VisibilityModifier"/>-->
157+
151158
</module>
152159

153160
</module>

0 commit comments

Comments
 (0)