Added missing final modifiers.

This commit is contained in:
MobiusDev
2015-12-26 12:03:36 +00:00
parent cc92e5d062
commit e0d681a17e
974 changed files with 5919 additions and 5917 deletions

View File

@@ -71,7 +71,7 @@ public class BitSetIDFactory extends IdFactory
for (int usedObjectId : extractUsedObjectIDTable())
{
int objectID = usedObjectId - FIRST_OID;
final int objectID = usedObjectId - FIRST_OID;
if (objectID < 0)
{
_log.warning(getClass().getSimpleName() + ": Object ID " + usedObjectId + " in DB is less than minimum ID of " + FIRST_OID);
@@ -108,7 +108,7 @@ public class BitSetIDFactory extends IdFactory
@Override
public synchronized int getNextId()
{
int newID = _nextFreeId.get();
final int newID = _nextFreeId.get();
_freeIds.set(newID);
_freeIdCount.decrementAndGet();
@@ -159,7 +159,7 @@ public class BitSetIDFactory extends IdFactory
protected synchronized void increaseBitSetCapacity()
{
BitSet newBitSet = new BitSet(PrimeFinder.nextPrime((usedIdCount() * 11) / 10));
final BitSet newBitSet = new BitSet(PrimeFinder.nextPrime((usedIdCount() * 11) / 10));
newBitSet.or(_freeIds);
_freeIds = newBitSet;
}

View File

@@ -43,7 +43,7 @@ public class CompactionIDFactory extends IdFactory
try (Connection con = ConnectionFactory.getInstance().getConnection())
{
Integer[] tmp_obj_ids = extractUsedObjectIDTable();
final Integer[] tmp_obj_ids = extractUsedObjectIDTable();
int N = tmp_obj_ids.length;
for (int idx = 0; idx < N; idx++)
@@ -81,7 +81,7 @@ public class CompactionIDFactory extends IdFactory
{
while (rs.next())
{
int badId = rs.getInt(1);
final int badId = rs.getInt(1);
_log.severe(getClass().getSimpleName() + ": Bad ID " + badId + " in DB found by: " + check);
throw new RuntimeException();
}

View File

@@ -195,7 +195,7 @@ public abstract class IdFactory
try (Connection con = ConnectionFactory.getInstance().getConnection();
Statement stmt = con.createStatement())
{
long cleanupStart = System.currentTimeMillis();
final long cleanupStart = System.currentTimeMillis();
int cleanCount = 0;
// Misc/Account Related
// Please read the descriptions above each before uncommenting them. If you are still

View File

@@ -48,7 +48,7 @@ public class StackIDFactory extends IdFactory
{
// con.createStatement().execute("drop table if exists tmp_obj_id");
Integer[] tmp_obj_ids = extractUsedObjectIDTable();
final Integer[] tmp_obj_ids = extractUsedObjectIDTable();
if (tmp_obj_ids.length > 0)
{
_curOID = tmp_obj_ids[tmp_obj_ids.length - 1];
@@ -73,7 +73,7 @@ public class StackIDFactory extends IdFactory
private int insertUntil(Integer[] tmp_obj_ids, int idx, int N, Connection con) throws SQLException
{
int id = tmp_obj_ids[idx];
final int id = tmp_obj_ids[idx];
if (id == _tempOID)
{
_tempOID++;
@@ -93,7 +93,7 @@ public class StackIDFactory extends IdFactory
{
while (rs.next())
{
int badId = rs.getInt(1);
final int badId = rs.getInt(1);
_log.severe("Bad ID " + badId + " in DB found by: " + check);
throw new RuntimeException();
}