Skip to content

Commit

Permalink
Fix trivial warnings
Browse files Browse the repository at this point in the history
* Fix resource closure warning in lambda by assigning to a final var
  outside
* Fix deprecation warning by suppressing the use of the deprecated
  method
* Add missing serialVersionUID to Serializable anonymous inner class
  • Loading branch information
ctubbsii committed Jul 23, 2024
1 parent 5c642ff commit 3e78ef7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ private Key genKey(CRC32 cksum) {

byte[] fam = genCol(random.nextInt(maxFam));
byte[] qual = genCol(random.nextInt(maxQual));
@SuppressWarnings("deprecation")
byte[] cv = visibilities.get(random.nextInt(visibilities.size())).flatten();

if (cksum != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ private TestExecutor<Long> startLongScans(Environment env, String tableName, Ato
TestExecutor<Long> longScans = new TestExecutor<>(NUM_LONG_SCANS);

for (int i = 0; i < NUM_LONG_SCANS; i++) {
longScans.submit(() -> scan(tableName, env.getClient(), stop, fpi.next()));
final var client = env.getClient();
longScans.submit(() -> scan(tableName, client, stop, fpi.next()));
}
return longScans;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ public void visit(State state, RandWalkEnv env, Properties props) throws Excepti
private static HashMap<String,String> getPropsFromTable(String tableName, RandWalkEnv env)
throws AccumuloException, TableNotFoundException {
return new HashMap<>() {
private static final long serialVersionUID = 1L;

{
for (var entry : env.getAccumuloClient().tableOperations().getProperties(tableName))
put(entry.getKey(), entry.getValue());
Expand Down

0 comments on commit 3e78ef7

Please sign in to comment.