No effective change - add final modifier

This commit is contained in:
Robin Bygrave
2015-07-31 13:53:10 +12:00
parent 7f2c705b94
commit deed0bb01d
29 changed files with 73 additions and 73 deletions
@@ -42,12 +42,12 @@ public class DefaultCsvCallback<T> implements CsvCallback<T> {
/**
* Used to log a message to indicate progress through large files.
*/
protected int logInfoFrequency;
protected final int logInfoFrequency;
/**
* The batch size used when saving the beans.
*/
protected int persistBatchSize;
protected final int persistBatchSize;
/**
* The time the process started.
@@ -20,9 +20,9 @@ public class BindParams implements Serializable {
private static final long serialVersionUID = 4541081933302086285L;
private List<Param> positionedParameters = new ArrayList<Param>();
private final List<Param> positionedParameters = new ArrayList<Param>();
private Map<String, Param> namedParameters = new LinkedHashMap<String, Param>();
private final Map<String, Param> namedParameters = new LinkedHashMap<String, Param>();
/**
* This is the sql. For named parameters this is the sql after the named
@@ -42,12 +42,12 @@ public class DefaultAutoFetchManager implements AutoFetchManager, Serializable {
/**
* Map of the usage and query statistics gathered.
*/
private Map<String, Statistics> statisticsMap = new ConcurrentHashMap<String, Statistics>();
private final Map<String, Statistics> statisticsMap = new ConcurrentHashMap<String, Statistics>();
/**
* Map of the tuned query details per profile query point.
*/
private Map<String, TunedQueryInfo> tunedQueryInfoMap = new ConcurrentHashMap<String, TunedQueryInfo>();
private final Map<String, TunedQueryInfo> tunedQueryInfoMap = new ConcurrentHashMap<String, TunedQueryInfo>();
private transient long defaultGarbageCollectionWait = 100;
@@ -56,7 +56,7 @@ public class DefaultServerCache implements ServerCache {
protected int maxSize;
protected int trimFrequency;
protected final int trimFrequency;
protected int maxIdleSecs;
@@ -10,7 +10,7 @@ import java.util.List;
*/
public class BinaryMessageList {
ArrayList<BinaryMessage> list = new ArrayList<BinaryMessage>();
final ArrayList<BinaryMessage> list = new ArrayList<BinaryMessage>();
public void add(BinaryMessage msg) {
list.add(msg);
@@ -10,7 +10,7 @@ import java.util.List;
*/
public class AckResendMessages {
ArrayList<Message> messages = new ArrayList<Message>();
final ArrayList<Message> messages = new ArrayList<Message>();
public String toString() {
return messages.toString();
@@ -27,33 +27,33 @@ public class BootupClasses implements ClassPathSearchMatcher {
private static final Logger logger = LoggerFactory.getLogger(BootupClasses.class);
private ArrayList<Class<?>> embeddableList = new ArrayList<Class<?>>();
private final ArrayList<Class<?>> embeddableList = new ArrayList<Class<?>>();
private ArrayList<Class<?>> entityList = new ArrayList<Class<?>>();
private final ArrayList<Class<?>> entityList = new ArrayList<Class<?>>();
private ArrayList<Class<?>> scalarTypeList = new ArrayList<Class<?>>();
private final ArrayList<Class<?>> scalarTypeList = new ArrayList<Class<?>>();
private ArrayList<Class<?>> scalarConverterList = new ArrayList<Class<?>>();
private final ArrayList<Class<?>> scalarConverterList = new ArrayList<Class<?>>();
private ArrayList<Class<?>> compoundTypeList = new ArrayList<Class<?>>();
private final ArrayList<Class<?>> compoundTypeList = new ArrayList<Class<?>>();
private ArrayList<Class<?>> beanControllerList = new ArrayList<Class<?>>();
private final ArrayList<Class<?>> beanControllerList = new ArrayList<Class<?>>();
private ArrayList<Class<?>> transactionEventListenerList = new ArrayList<Class<?>>();
private final ArrayList<Class<?>> transactionEventListenerList = new ArrayList<Class<?>>();
private ArrayList<Class<?>> beanFindControllerList = new ArrayList<Class<?>>();
private ArrayList<Class<?>> beanQueryAdapterList = new ArrayList<Class<?>>();
private final ArrayList<Class<?>> beanFindControllerList = new ArrayList<Class<?>>();
private final ArrayList<Class<?>> beanQueryAdapterList = new ArrayList<Class<?>>();
private ArrayList<Class<?>> beanListenerList = new ArrayList<Class<?>>();
private final ArrayList<Class<?>> beanListenerList = new ArrayList<Class<?>>();
private ArrayList<Class<?>> serverConfigStartupList = new ArrayList<Class<?>>();
private ArrayList<ServerConfigStartup> serverConfigStartupInstances = new ArrayList<ServerConfigStartup>();
private final ArrayList<Class<?>> serverConfigStartupList = new ArrayList<Class<?>>();
private final ArrayList<ServerConfigStartup> serverConfigStartupInstances = new ArrayList<ServerConfigStartup>();
private List<BeanFindController> findControllerInstances = new ArrayList<BeanFindController>();
private List<BeanPersistController> persistControllerInstances = new ArrayList<BeanPersistController>();
private List<BeanPersistListener> persistListenerInstances = new ArrayList<BeanPersistListener>();
private List<BeanQueryAdapter> queryAdapterInstances = new ArrayList<BeanQueryAdapter>();
private List<TransactionEventListener> transactionEventListenerInstances = new ArrayList<TransactionEventListener>();
private final List<BeanFindController> findControllerInstances = new ArrayList<BeanFindController>();
private final List<BeanPersistController> persistControllerInstances = new ArrayList<BeanPersistController>();
private final List<BeanPersistListener> persistListenerInstances = new ArrayList<BeanPersistListener>();
private final List<BeanQueryAdapter> queryAdapterInstances = new ArrayList<BeanQueryAdapter>();
private final List<TransactionEventListener> transactionEventListenerInstances = new ArrayList<TransactionEventListener>();
public BootupClasses() {
}
@@ -131,17 +131,17 @@ public final class DefaultServer implements SpiEbeanServer {
/**
* The default batch size for lazy loading beans or collections.
*/
private int lazyLoadBatchSize;
private final int lazyLoadBatchSize;
/**
* The query batch size
*/
private int queryBatchSize;
private final int queryBatchSize;
/**
* JDBC driver specific handling for JDBC batch execution.
*/
private PstmtBatch pstmtBatch;
private final PstmtBatch pstmtBatch;
/**
* holds plugins (e.g. ddl generator) detected by the service loader
@@ -21,13 +21,13 @@ public class CreateIntersectionTable {
private final TableJoin intersectionTableJoin;
private final TableJoin tableJoin;
private StringBuilder sb = new StringBuilder();
private final StringBuilder sb = new StringBuilder();
private StringBuilder pkeySb = new StringBuilder();
private final StringBuilder pkeySb = new StringBuilder();
private int foreignKeyCount;
private int maxFkeyLength;
private final int maxFkeyLength;
public CreateIntersectionTable(DdlGenContext ctx, BeanPropertyAssocMany<?> manyProp) {
this.ctx = ctx;
@@ -43,10 +43,10 @@ public class DdlGenContext {
*/
private final List<String> contentBuffer = new ArrayList<String>();
private Set<String> intersectionTables = new HashSet<String>();
private final Set<String> intersectionTables = new HashSet<String>();
private List<String> intersectionTablesCreateDdl = new ArrayList<String>();
private List<String> intersectionTablesFkDdl = new ArrayList<String>();
private final List<String> intersectionTablesCreateDdl = new ArrayList<String>();
private final List<String> intersectionTablesFkDdl = new ArrayList<String>();
private final DatabasePlatform dbPlatform;
@@ -147,7 +147,7 @@ public class BeanDescriptor<T> implements MetaBeanInfo {
*/
private volatile BeanPersistListener persistListener;
private volatile BeanQueryAdapter queryAdapter;
private final BeanQueryAdapter queryAdapter;
/**
* If set overrides the find implementation. Server side only.
@@ -16,7 +16,7 @@ public final class BeanFkeyProperty implements ElPropertyValue {
private final String dbColumn;
private final boolean containsMany;
private int deployOrder;
private final int deployOrder;
public BeanFkeyProperty(String prefix, String name, String dbColumn, int deployOrder) {
this(prefix, name, dbColumn, deployOrder, false);
@@ -57,13 +57,13 @@ public class BeanLifecycleAdapterFactory {
private static class MethodsHolder {
private boolean hasListener;
private List<Method> preInserts = new ArrayList<Method>();
private List<Method> postInserts = new ArrayList<Method>();
private List<Method> preUpdates = new ArrayList<Method>();
private List<Method> postUpdates = new ArrayList<Method>();
private List<Method> preDeletes = new ArrayList<Method>();
private List<Method> postDeletes = new ArrayList<Method>();
private List<Method> postLoads = new ArrayList<Method>();
private final List<Method> preInserts = new ArrayList<Method>();
private final List<Method> postInserts = new ArrayList<Method>();
private final List<Method> preUpdates = new ArrayList<Method>();
private final List<Method> postUpdates = new ArrayList<Method>();
private final List<Method> preDeletes = new ArrayList<Method>();
private final List<Method> postDeletes = new ArrayList<Method>();
private final List<Method> postLoads = new ArrayList<Method>();
private boolean hasListener() {
return hasListener;
@@ -64,7 +64,7 @@ public abstract class BeanPropertyAssoc<T> extends BeanProperty {
*/
final boolean isOuterJoin;
String extraWhere;
final String extraWhere;
boolean saveRecurseSkippable;
@@ -20,7 +20,7 @@ public final class DaemonScheduleThreadPool extends ScheduledThreadPoolExecutor
private final String namePrefix;
private int shutdownWaitSeconds;
private final int shutdownWaitSeconds;
/**
* Construct the DaemonScheduleThreadPool.
@@ -27,7 +27,7 @@ class BusyConnectionBuffer {
private PooledConnection[] slots;
private int growBy;
private final int growBy;
private int size;
@@ -111,7 +111,7 @@ public class DataSourcePool implements DataSource {
/**
* The max size of the stack trace to report.
*/
private int maxStackTraceSize;
private final int maxStackTraceSize;
/**
* flag to indicate we have sent an alert message.
@@ -55,7 +55,7 @@ public class BatchedBeanHolder {
* Set of beans in this batch. This is used to ensure that a single bean instance is not included
* in the batch twice (two separate insert requests etc).
*/
private IdentityHashMap<Object,Object> persistedBeans = new IdentityHashMap<Object,Object>();
private final IdentityHashMap<Object,Object> persistedBeans = new IdentityHashMap<Object,Object>();
/**
* Create a new entry with a given type and depth.
@@ -25,7 +25,7 @@ public class BatchedPstmtHolder {
* A Map of the statements using a String key. This is used so that the same
* Statement,Prepared,Callable is reused.
*/
private LinkedHashMap<String, BatchedPstmt> stmtMap = new LinkedHashMap<String, BatchedPstmt>();
private final LinkedHashMap<String, BatchedPstmt> stmtMap = new LinkedHashMap<String, BatchedPstmt>();
/**
* The Max size across all the BatchedPstmt.
@@ -39,7 +39,7 @@ public class DefaultDbSqlContext implements DbSqlContext {
private HashSet<String> tableJoins;
private SqlTreeAlias alias;
private final SqlTreeAlias alias;
private String currentPrefix;
@@ -22,7 +22,7 @@ public class DefaultRelationalQuery implements SpiSqlQuery {
private static final long serialVersionUID = -1098305779779591068L;
private transient EbeanServer server;
private final transient EbeanServer server;
private transient SqlQueryListener queryListener;
@@ -58,7 +58,7 @@ public class DefaultRelationalQuery implements SpiSqlQuery {
/**
* Bind parameters when using the query language.
*/
private BindParams bindParams = new BindParams();
private final BindParams bindParams = new BindParams();
/**
* Additional supply a query detail object.
@@ -33,15 +33,15 @@ import java.util.List;
*/
public class CsvUtilReader {
private BufferedReader br;
private final BufferedReader br;
private boolean hasNext = true;
private char separator;
private final char separator;
private char quotechar;
private final char quotechar;
private int skipLines;
private final int skipLines;
private boolean linesSkiped;
@@ -9,7 +9,7 @@ import com.avaje.ebeaninternal.server.deploy.BeanDescriptor;
public class BeanDeltaMap {
private Map<String,BeanDeltaList> deltaMap = new HashMap<String,BeanDeltaList>();
private final Map<String,BeanDeltaList> deltaMap = new HashMap<String,BeanDeltaList>();
public BeanDeltaMap() {
}
@@ -15,11 +15,11 @@ import com.avaje.ebeaninternal.server.deploy.id.IdBinder;
public class BeanPathUpdateIds {
private transient BeanDescriptor<?> beanDescriptor;
private final transient BeanDescriptor<?> beanDescriptor;
private final String descriptorId;
private String path;
private final String path;
private ArrayList<Serializable> ids;
@@ -47,8 +47,8 @@ public class BulkEventListenerMap {
}
private static class Entry {
List<BulkTableEventListener> listeners = new ArrayList<BulkTableEventListener>();
final List<BulkTableEventListener> listeners = new ArrayList<BulkTableEventListener>();
private void add(BulkTableEventListener l) {
listeners.add(l);
}
@@ -13,7 +13,7 @@ import java.time.Period;
*/
public class CompoundTypePeriod implements CompoundType<Period> {
CompoundTypeProperty[] properties = new CompoundTypeProperty[3];
final CompoundTypeProperty[] properties = new CompoundTypeProperty[3];
public CompoundTypePeriod() {
properties[0] = new CTPeriodYear();
@@ -19,7 +19,7 @@ import com.avaje.ebeaninternal.api.SpiQuery;
public class BeanCollectionFactory {
private static class BeanCollectionFactoryHolder {
private static BeanCollectionFactory me = new BeanCollectionFactory();
private static final BeanCollectionFactory me = new BeanCollectionFactory();
}
private static final int defaultListInitialCapacity = 20;
@@ -29,21 +29,21 @@ public class ClassPathSearch implements ClassPathSearchService {
private ClassLoader classLoader;
private List<Object> classPath = new ArrayList<Object>();
private final List<Object> classPath = new ArrayList<Object>();
private ClassPathSearchFilter filter;
private ClassPathSearchMatcher matcher;
private ArrayList<Class<?>> matchList = new ArrayList<Class<?>>();
private final ArrayList<Class<?>> matchList = new ArrayList<Class<?>>();
private HashSet<String> jarHits = new HashSet<String>();
private final HashSet<String> jarHits = new HashSet<String>();
private HashSet<String> packageHits = new HashSet<String>();
private final HashSet<String> packageHits = new HashSet<String>();
private ClassPathReader classPathReader = new DefaultClassPathReader();
private ArrayList<URI> scannedUris = new ArrayList<URI>();
private final ArrayList<URI> scannedUris = new ArrayList<URI>();
public ClassPathSearch() {
// Default Construct
@@ -18,13 +18,13 @@ public class ClassPathSearchFilter {
private String ebeanJarPrefix = "ebean";
private HashSet<String> includePackageSet = new HashSet<String>();
private final HashSet<String> includePackageSet = new HashSet<String>();
private HashSet<String> excludePackageSet = new HashSet<String>();
private final HashSet<String> excludePackageSet = new HashSet<String>();
private HashSet<String> includeJarSet = new HashSet<String>();
private final HashSet<String> includeJarSet = new HashSet<String>();
private HashSet<String> excludeJarSet = new HashSet<String>();
private final HashSet<String> excludeJarSet = new HashSet<String>();
public ClassPathSearchFilter() {
addDefaultExcludePackages();