Skip to content

Commit

Permalink
Merge pull request #325 from DevFactory/utility-classes-should-not-ha…
Browse files Browse the repository at this point in the history
…ve-public-constructors-fix-3

Utility classes should not have public constructors
  • Loading branch information
iluwatar committed Dec 30, 2015
2 parents 7c6e1fc + c8a750d commit a0af0a1
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions caching/src/main/java/com/iluwatar/caching/AppManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ public class AppManager {

private static CachingPolicy cachingPolicy;

private AppManager() {
}

/**
*
* Developer/Tester is able to choose whether the application should use MongoDB as its underlying
Expand Down
3 changes: 3 additions & 0 deletions caching/src/main/java/com/iluwatar/caching/CacheStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ public class CacheStore {

static LruCache cache = null;

private CacheStore() {
}

/**
* Init cache capacity
*/
Expand Down
3 changes: 3 additions & 0 deletions caching/src/main/java/com/iluwatar/caching/DbManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public class DbManager {

private static HashMap<String, UserAccount> virtualDB;

private DbManager() {
}

/**
* Create DB
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

public class SimpleAppSystemInitializer {

private SimpleAppSystemInitializer() {
}

/**
* Init test system
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public class HibernateUtil {
}
}

private HibernateUtil() {
}

public static SessionFactory getSessionFactory() {
return SESSION_FACTORY;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ public class ServiceLocator {

private static ServiceCache serviceCache = new ServiceCache();

private ServiceLocator() {
}

/**
* Fetch the service with the name param from the cache first, if no service is found, lookup the
* service from the {@link InitContext} and then add the newly created service into the cache map
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
*/
public class RainbowFishSerializer {

private RainbowFishSerializer() {
}

/**
* Write V1 RainbowFish to file
*/
Expand Down

0 comments on commit a0af0a1

Please sign in to comment.