No effective change - add final modifier

This commit is contained in:
Robin Bygrave
2015-07-31 14:07:09 +12:00
parent 90886193c0
commit 831d2a6179
24 changed files with 34 additions and 39 deletions
@@ -27,12 +27,12 @@ final class PropertyExpression {
/**
* Used to detect the start of an expression.
*/
private static String START = "${";
private static final String START = "${";
/**
* Used to detect the end of an expression.
*/
private static String END = "}";
private static final String END = "}";
/**
* Specify the PropertyHolder.
@@ -16,7 +16,7 @@ public final class PropertyMap implements Serializable {
private static final long serialVersionUID = 1L;
private LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
private final LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
public static Properties defaultProperties() {
PropertyMap propertyMap = PropertyMapLoader.loadGlobalProperties();
@@ -42,7 +42,7 @@ public abstract class SequenceIdGenerator implements IdGenerator {
protected final ArrayList<Long> idList = new ArrayList<Long>(50);
protected int batchSize;
protected final int batchSize;
protected int currentlyBackgroundLoading;
@@ -23,7 +23,7 @@ public class TransactionEvent implements Serializable {
* Flag indicating this is a local transaction (not from another server in
* the cluster).
*/
private transient boolean local;
private final transient boolean local;
private TransactionEventTable eventTables;
@@ -14,7 +14,7 @@ import com.avaje.ebeaninternal.server.core.PersistRequestBean;
*/
public class TransactionEventBeans {
ArrayList<PersistRequestBean<?>> requests = new ArrayList<PersistRequestBean<?>>();
final ArrayList<PersistRequestBean<?>> requests = new ArrayList<PersistRequestBean<?>>();
/**
* Return the list of PersistRequests that BeanListeners are interested in.
@@ -70,7 +70,7 @@ public final class TransactionEventTable implements Serializable {
private static final long serialVersionUID = -1958317571064162089L;
private String table;
private final String table;
private boolean insert;
private boolean update;
private boolean delete;
@@ -25,9 +25,9 @@ public class Statistics implements Serializable {
private int counter;
private Map<String, StatisticsQuery> queryStatsMap = new LinkedHashMap<String, StatisticsQuery>();
private final Map<String, StatisticsQuery> queryStatsMap = new LinkedHashMap<String, StatisticsQuery>();
private Map<String, StatisticsNodeUsage> nodeUsageMap = new LinkedHashMap<String, StatisticsNodeUsage>();
private final Map<String, StatisticsNodeUsage> nodeUsageMap = new LinkedHashMap<String, StatisticsNodeUsage>();
private final String monitor = new String();
@@ -37,7 +37,7 @@ public class StatisticsNodeUsage implements Serializable {
private boolean modified;
private Set<String> aggregateUsed = new LinkedHashSet<String>();
private final Set<String> aggregateUsed = new LinkedHashSet<String>();
public StatisticsNodeUsage(String path, boolean queryTuningAddVersion) {
this.path = path;
@@ -32,7 +32,7 @@ public class SocketClusterBroadcast implements ClusterBroadcast {
private final SocketClusterListener listener;
private SocketClient[] members;
private final SocketClient[] members;
private ClusterManager clusterManager;
@@ -17,7 +17,7 @@ public final class PersistRequestOrmUpdate extends PersistRequest {
private final BeanDescriptor<?> beanDescriptor;
private SpiUpdate<?> ormUpdate;
private final SpiUpdate<?> ormUpdate;
private int rowCount;
@@ -19,7 +19,7 @@ public class UpdateTimestampFactory {
final GeneratedUpdateLong longTime = new GeneratedUpdateLong();
Map<Class<?>, GeneratedProperty> map = new HashMap<Class<?>, GeneratedProperty>();
final Map<Class<?>, GeneratedProperty> map = new HashMap<Class<?>, GeneratedProperty>();
public UpdateTimestampFactory() {
map.put(Timestamp.class, new GeneratedUpdateTimestamp());
@@ -45,7 +45,7 @@ public class SqlReservedWords {
+",WHERE,WITH";
private static HashSet<String> keywords = new HashSet<String>();
private static final HashSet<String> keywords = new HashSet<String>();
static {
String[] initialKeywords = baseKeyWords.split(",");
@@ -13,7 +13,7 @@ public class SimpleExpression extends AbstractExpression {
enum Op {
EQ(" = ? "), NOT_EQ(" <> ? "), LT(" < ? "), LT_EQ(" <= ? "), GT(" > ? "), GT_EQ(" >= ? ");
String exp;
final String exp;
Op(String exp) {
this.exp = exp;
@@ -11,12 +11,7 @@ import java.util.Date;
*/
public class UrlResourceContent implements ResourceContent {
/**
* The underlying resource.
*/
//URL url;
String entryName;
final String entryName;
URLConnection con;
@@ -156,7 +156,7 @@ public class PooledConnection extends ConnectionDelegator {
*/
private StackTraceElement[] stackTrace;
private int maxStackTrace;
private final int maxStackTrace;
/**
* Slot position in the BusyConnectionBuffer.
@@ -21,11 +21,11 @@ public class SimpleDataSourceAlert implements DataSourceAlert, MailListener {
private static final Logger logger = LoggerFactory.getLogger(SimpleDataSourceAlert.class);
private static String alertMailServerName = System.getProperty("ebean.datasource.alert.mailserver");
private static final String alertMailServerName = System.getProperty("ebean.datasource.alert.mailserver");
private static String fromUser = System.getProperty("ebean.datasource.alert.fromUser");
private static String fromEmail = System.getProperty("ebean.datasource.alert.fromEmail");
private static String toEmail = System.getProperty("ebean.datasource.alert.toEmail");
private static final String fromUser = System.getProperty("ebean.datasource.alert.fromUser");
private static final String fromEmail = System.getProperty("ebean.datasource.alert.fromEmail");
private static final String toEmail = System.getProperty("ebean.datasource.alert.toEmail");
/**
* Create a SimpleAlerter.
@@ -19,8 +19,8 @@ public enum SqlJoinType {
* It is automatically determined based on cardinality and optionality.
*/
AUTO("JOIN-TYPE-AUTO-LITERAL-NOT-USED");
String literal;
final String literal;
SqlJoinType(String literal) {
this.literal = literal;
@@ -20,15 +20,15 @@ public class SqlTreeAlias {
private int manyWhereCounter;
private TreeSet<String> joinProps = new TreeSet<String>();
private final TreeSet<String> joinProps = new TreeSet<String>();
private HashSet<String> embeddedPropertyJoins;
private TreeSet<String> manyWhereJoinProps = new TreeSet<String>();
private final TreeSet<String> manyWhereJoinProps = new TreeSet<String>();
private HashMap<String, String> aliasMap = new HashMap<String, String>();
private final HashMap<String, String> aliasMap = new HashMap<String, String>();
private HashMap<String, String> manyWhereAliasMap = new HashMap<String, String>();
private final HashMap<String, String> manyWhereAliasMap = new HashMap<String, String>();
private final String rootTableAlias;
@@ -24,12 +24,12 @@ public class SqlTreeProperties {
/**
* The bean properties in order.
*/
private List<BeanProperty> propsList = new ArrayList<BeanProperty>();
private final List<BeanProperty> propsList = new ArrayList<BeanProperty>();
/**
* Maintain a list of property names to detect embedded bean additions.
*/
private LinkedHashSet<String> propNames = new LinkedHashSet<String>();
private final LinkedHashSet<String> propNames = new LinkedHashSet<String>();
private boolean allProperties;
@@ -10,7 +10,7 @@ import java.util.List;
public class RemoteTransactionEvent implements Runnable {
private List<BeanPersistIds> beanPersistList = new ArrayList<BeanPersistIds>();
private final List<BeanPersistIds> beanPersistList = new ArrayList<BeanPersistIds>();
private List<TableIUD> tableList;
@@ -15,7 +15,7 @@ public class TransactionMap {
/**
* Map of State by serverName.
*/
private HashMap<String,State> map = new HashMap<String, State>();
private final HashMap<String,State> map = new HashMap<String, State>();
public String toString() {
return map.toString();
@@ -16,7 +16,7 @@ import java.sql.Types;
*/
public class ScalarTypeFile extends ScalarTypeBase<File> {
private static Logger logger = LoggerFactory.getLogger(ScalarTypeFile.class);
private static final Logger logger = LoggerFactory.getLogger(ScalarTypeFile.class);
private final String prefix;
@@ -21,7 +21,7 @@ import java.time.MonthDay;
*/
public class ScalarTypeMonthDay extends ScalarTypeBase<MonthDay> {
protected int year;
protected final int year;
/**
* Construct with a year of 2000 (which is a leap year).
@@ -27,7 +27,7 @@ public class SortByClause {
public static final String DESC = "desc";
private List<Property> properties = new ArrayList<Property>();
private final List<Property> properties = new ArrayList<Property>();
/**
* Return the number of properties in the clause.