Merge pull request #376 from DevFactory/release/Classes-without-public-constructors-should-be-final-fix-1
squid:S2974 - Classes without public constructors should be final
This commit is contained in:
commit
823dc6395f
@ -27,7 +27,7 @@ package com.iluwatar.builder;
|
|||||||
* Hero, the class with many parameters.
|
* Hero, the class with many parameters.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class Hero {
|
public final class Hero {
|
||||||
|
|
||||||
private final Profession profession;
|
private final Profession profession;
|
||||||
private final String name;
|
private final String name;
|
||||||
|
@ -33,7 +33,7 @@ import java.text.ParseException;
|
|||||||
* CacheStore class.
|
* CacheStore class.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class AppManager {
|
public final class AppManager {
|
||||||
|
|
||||||
private static CachingPolicy cachingPolicy;
|
private static CachingPolicy cachingPolicy;
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ import com.mongodb.client.model.UpdateOptions;
|
|||||||
* during runtime (createVirtualDB()).</p>
|
* during runtime (createVirtualDB()).</p>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class DbManager {
|
public final class DbManager {
|
||||||
|
|
||||||
private static MongoClient mongoClient;
|
private static MongoClient mongoClient;
|
||||||
private static MongoDatabase db;
|
private static MongoDatabase db;
|
||||||
|
@ -37,7 +37,7 @@ import com.iluwatar.flux.store.Store;
|
|||||||
* Dispatcher sends Actions to registered Stores.
|
* Dispatcher sends Actions to registered Stores.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class Dispatcher {
|
public final class Dispatcher {
|
||||||
|
|
||||||
private static Dispatcher instance = new Dispatcher();
|
private static Dispatcher instance = new Dispatcher();
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
* Nazgul is a Multiton class. Nazgul instances can be queried using {@link #getInstance} method.
|
* Nazgul is a Multiton class. Nazgul instances can be queried using {@link #getInstance} method.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class Nazgul {
|
public final class Nazgul {
|
||||||
|
|
||||||
private static Map<NazgulName, Nazgul> nazguls;
|
private static Map<NazgulName, Nazgul> nazguls;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ import org.apache.isis.core.integtestsupport.IsisSystemForTest;
|
|||||||
import org.apache.isis.objectstore.jdo.datanucleus.DataNucleusPersistenceMechanismInstaller;
|
import org.apache.isis.objectstore.jdo.datanucleus.DataNucleusPersistenceMechanismInstaller;
|
||||||
import org.apache.isis.objectstore.jdo.datanucleus.IsisConfigurationForJdoIntegTests;
|
import org.apache.isis.objectstore.jdo.datanucleus.IsisConfigurationForJdoIntegTests;
|
||||||
|
|
||||||
public class SimpleAppSystemInitializer {
|
public final class SimpleAppSystemInitializer {
|
||||||
|
|
||||||
private SimpleAppSystemInitializer() {
|
private SimpleAppSystemInitializer() {
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ package com.iluwatar.nullobject;
|
|||||||
* Implemented as Singleton, since all the NullNodes are the same.
|
* Implemented as Singleton, since all the NullNodes are the same.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class NullNode implements Node {
|
public final class NullNode implements Node {
|
||||||
|
|
||||||
private static NullNode instance = new NullNode();
|
private static NullNode instance = new NullNode();
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ import org.hibernate.cfg.Configuration;
|
|||||||
/**
|
/**
|
||||||
* Produces the Hibernate {@link SessionFactory}.
|
* Produces the Hibernate {@link SessionFactory}.
|
||||||
*/
|
*/
|
||||||
public class HibernateUtil {
|
public final class HibernateUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The cached session factory
|
* The cached session factory
|
||||||
|
@ -28,7 +28,7 @@ package com.iluwatar.servicelocator;
|
|||||||
*
|
*
|
||||||
* @author saifasif
|
* @author saifasif
|
||||||
*/
|
*/
|
||||||
public class ServiceLocator {
|
public final class ServiceLocator {
|
||||||
|
|
||||||
private static ServiceCache serviceCache = new ServiceCache();
|
private static ServiceCache serviceCache = new ServiceCache();
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ import java.io.Serializable;
|
|||||||
*
|
*
|
||||||
* @author mortezaadi@gmail.com
|
* @author mortezaadi@gmail.com
|
||||||
*/
|
*/
|
||||||
public class InitializingOnDemandHolderIdiom implements Serializable {
|
public final class InitializingOnDemandHolderIdiom implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ package com.iluwatar.singleton;
|
|||||||
*
|
*
|
||||||
* @author mortezaadi@gmail.com
|
* @author mortezaadi@gmail.com
|
||||||
*/
|
*/
|
||||||
public class ThreadSafeDoubleCheckLocking {
|
public final class ThreadSafeDoubleCheckLocking {
|
||||||
|
|
||||||
private static volatile ThreadSafeDoubleCheckLocking instance;
|
private static volatile ThreadSafeDoubleCheckLocking instance;
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ package com.iluwatar.singleton;
|
|||||||
* Note: if created by reflection then a singleton will not be created but multiple options in the
|
* Note: if created by reflection then a singleton will not be created but multiple options in the
|
||||||
* same classloader
|
* same classloader
|
||||||
*/
|
*/
|
||||||
public class ThreadSafeLazyLoadedIvoryTower {
|
public final class ThreadSafeLazyLoadedIvoryTower {
|
||||||
|
|
||||||
private static ThreadSafeLazyLoadedIvoryTower instance = null;
|
private static ThreadSafeLazyLoadedIvoryTower instance = null;
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* The Step Builder class.
|
* The Step Builder class.
|
||||||
*/
|
*/
|
||||||
public class CharacterStepBuilder {
|
public final class CharacterStepBuilder {
|
||||||
|
|
||||||
private CharacterStepBuilder() {}
|
private CharacterStepBuilder() {}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ import java.util.Map;
|
|||||||
* added to the schema.
|
* added to the schema.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RainbowFishSerializer {
|
public final class RainbowFishSerializer {
|
||||||
|
|
||||||
private RainbowFishSerializer() {
|
private RainbowFishSerializer() {
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user