Skip to content

Commit

Permalink
Merge pull request #59 from DevFactory/release/utility-classes-should…
Browse files Browse the repository at this point in the history
…-not-have-public-constructors-fix-1

squid:S1118 - Utility classes should not have public constructors
  • Loading branch information
gastaldi committed Mar 11, 2016
2 parents 6a3c3f0 + 4a6a548 commit f3f80ee
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
*/
public class Assert
{
private Assert() {}

public static void isTrue(boolean condition, String message)
{
if (!condition)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
*/
public class DesignPatterns
{
private DesignPatterns() {}

/**
* Creates a class based on the Builder Design pattern.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
*/
public class Methods
{
private Methods() {}

/**
* Implement the abstract methods present in a {@link MethodHolder} to the specified {@link MethodHolderSource}
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public class Refactory
{
private static final String RETURN_FALSE = " return false;";

private Refactory() {}

/**
* Generates a getXXX and setXXX method for the supplied field
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ public class Types
"SafeVarargs",
"SuppressWarnings");

private Types() {}

public static boolean areEquivalent(String left, String right)
{
if ((left == null) && (right == null))
Expand Down

0 comments on commit f3f80ee

Please sign in to comment.