GP-2974: Fixing warnings

This commit is contained in:
Ryan Kurtz 2023-04-26 08:03:57 -04:00
parent 113156a19f
commit 7fa3389119
662 changed files with 2198 additions and 2216 deletions

View file

@ -396,7 +396,7 @@ public abstract class Database {
}
String v = fname.substring(ix1 + 1, ix2);
try {
list.add(new Integer(v));
list.add(Integer.valueOf(v));
}
catch (NumberFormatException e) {
log.error(dbDir + ": bad file name: " + fname);

View file

@ -167,7 +167,7 @@ class FixedKeyInteriorNode extends FixedKeyNode implements FieldKeyInteriorNode
}
consistent &= node.isConsistent(tableName, monitor);
monitor.checkCanceled();
monitor.checkCancelled();
}
finally {
if (node != null) {
@ -176,7 +176,7 @@ class FixedKeyInteriorNode extends FixedKeyNode implements FieldKeyInteriorNode
}
}
}
monitor.checkCanceled();
monitor.checkCancelled();
return consistent;
}

View file

@ -165,7 +165,7 @@ class LongKeyInteriorNode extends LongKeyNode implements InteriorNode {
}
consistent &= node.isConsistent(tableName, monitor);
monitor.checkCanceled();
monitor.checkCancelled();
}
finally {
if (node != null) {
@ -174,7 +174,7 @@ class LongKeyInteriorNode extends LongKeyNode implements InteriorNode {
}
}
}
monitor.checkCanceled();
monitor.checkCancelled();
return consistent;
}

View file

@ -155,7 +155,7 @@ class VarKeyInteriorNode extends VarKeyNode implements FieldKeyInteriorNode {
}
consistent &= node.isConsistent(tableName, monitor);
monitor.checkCanceled();
monitor.checkCancelled();
}
finally {
if (node != null) {
@ -164,7 +164,7 @@ class VarKeyInteriorNode extends VarKeyNode implements FieldKeyInteriorNode {
}
}
}
monitor.checkCanceled();
monitor.checkCancelled();
return consistent;
}

View file

@ -1499,7 +1499,7 @@ public class BufferMgr {
for (int id = 0; id < indexCnt; id++) {
monitor.checkCanceled();
monitor.checkCancelled();
monitor.setProgress(id);
// Check for cached buffer
@ -1654,7 +1654,7 @@ public class BufferMgr {
// Recover free buffer list
int[] freeIndexes = recoveryFile.getFreeIndexList();
for (int index : freeIndexes) {
monitor.checkCanceled();
monitor.checkCancelled();
if (index >= origIndexCount) {
// Newly allocated free buffer
BufferNode node = createNewBufferNode(index, currentCheckpointHead, null);
@ -1678,7 +1678,7 @@ public class BufferMgr {
Arrays.sort(bufferIndexes);
for (int i = 0; i < bufferIndexes.length; i++) {
monitor.checkCanceled();
monitor.checkCancelled();
monitor.setProgress(i + 1);
// Get recovery buffer
@ -1911,7 +1911,7 @@ public class BufferMgr {
// Empty buffers will be flushed when outFile is closed
int bufCount = 0;
for (int id = 0; id < indexCnt; id++) {
monitor.checkCanceled();
monitor.checkCancelled();
BufferNode node = getCachedBufferNode(id);
if (node != null) {
// check nod which resides in cache
@ -1933,7 +1933,7 @@ public class BufferMgr {
// write/update all non-empty buffers
try (OutputBlockStream out = LocalBufferFile.getOutputBlockStream(outFile, bufCount)) {
for (int id = 0; id < indexCnt; id++) {
monitor.checkCanceled();
monitor.checkCancelled();
monitor.setProgress(id);
// get buffer node from cache

View file

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -45,7 +44,7 @@ class IndexProvider {
IndexProvider(int indexCount, int[] freeIndexes) {
nextIndex = indexCount;
for (int i = 0; i < freeIndexes.length; i++) {
freeIndexStack.push(new Integer(freeIndexes[i]));
freeIndexStack.push(Integer.valueOf(freeIndexes[i]));
}
}
@ -87,17 +86,17 @@ class IndexProvider {
// Increase index count
if (index >= nextIndex) {
for (int i = nextIndex; i < index; i++) {
freeIndexStack.push(new Integer(i));
freeIndexStack.push(Integer.valueOf(i));
}
nextIndex = index + 1;
return true;
}
return freeIndexStack.remove(new Integer(index));
return freeIndexStack.remove(Integer.valueOf(index));
}
boolean isFree(int index) {
return freeIndexStack.contains(new Integer(index));
return freeIndexStack.contains(Integer.valueOf(index));
}
/**
@ -105,7 +104,7 @@ class IndexProvider {
* @param index buffer index
*/
void freeIndex(int index) {
freeIndexStack.push(new Integer(index));
freeIndexStack.push(Integer.valueOf(index));
}
/**

View file

@ -1040,7 +1040,7 @@ public class LocalBufferFile implements BufferFile {
}
finally {
// circumvent other exceptions if cancelled
monitor.checkCanceled();
monitor.checkCancelled();
}
if (headerTransferRequired) {
@ -1073,7 +1073,7 @@ public class LocalBufferFile implements BufferFile {
int srcBlockCnt = in.getBlockCount();
BufferFileBlock block;
while ((block = in.readBlock()) != null) {
monitor.checkCanceled();
monitor.checkCancelled();
out.writeBlock(block);
monitor.setProgress(count++);
}

View file

@ -545,7 +545,7 @@ public class LocalManagedBufferFile extends LocalBufferFile implements ManagedBu
TaskMonitor monitor) throws CancelledException, IOException {
if (monitor != null) {
monitor.checkCanceled();
monitor.checkCancelled();
monitor.setMessage("Opening versioned file for update...");
monitor.setProgress(0);
}
@ -559,7 +559,7 @@ public class LocalManagedBufferFile extends LocalBufferFile implements ManagedBu
BufferFile changeDataFile = null;
try {
if (monitor != null) {
monitor.checkCanceled();
monitor.checkCancelled();
monitor.setMessage("Creating new file version...");
}
outFile.setVersionComment(fileComment);
@ -858,7 +858,7 @@ public class LocalManagedBufferFile extends LocalBufferFile implements ManagedBu
// ignore
}
if (taskMonitor != null) {
taskMonitor.checkCanceled();
taskMonitor.checkCancelled();
}
}
}

View file

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -82,7 +81,7 @@ public class VersionFileHandler {
freeIndexes = vf.getFreeIndexList();
String[] names = vf.getOldParameterNames();
for (int i = 0; i < names.length; i++) {
origParms.put(names[i], new Integer(vf.getOldParameter(names[i])));
origParms.put(names[i], Integer.valueOf(vf.getOldParameter(names[i])));
}
originalFileId = vf.getOriginalFileID();
}