mirror of
https://github.com/JHUAPL/AccumuloGraph.git
synced 2026-01-09 12:47:56 -05:00
FindBugs tweaks
This commit is contained in:
@@ -269,7 +269,7 @@ public final class AccumuloBulkIngester {
|
||||
* builder.finish();
|
||||
* </PRE>
|
||||
*/
|
||||
public final class PropertyBuilder {
|
||||
public static final class PropertyBuilder {
|
||||
|
||||
final String id;
|
||||
final BatchWriter writer;
|
||||
|
||||
@@ -18,6 +18,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Field;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@@ -1046,9 +1047,10 @@ implements Serializable {
|
||||
}
|
||||
|
||||
private File createTempDir() throws IOException {
|
||||
File temp = File.createTempFile(AccumuloGraphConfiguration.class.getSimpleName(), ".mini.tmp");
|
||||
temp.delete();
|
||||
temp.mkdir();
|
||||
File temp = File.createTempFile(AccumuloGraphConfiguration
|
||||
.class.getSimpleName(), ".mini.tmp");
|
||||
Files.delete(temp.toPath());
|
||||
Files.createDirectory(temp.toPath());
|
||||
return temp;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ public class ElementOutputFormat extends OutputFormat<NullWritable,Element> {
|
||||
return new NullOutputFormat<Text,Mutation>().getOutputCommitter(context);
|
||||
}
|
||||
|
||||
class ElementRecordWriter extends RecordWriter<NullWritable,Element> {
|
||||
static class ElementRecordWriter extends RecordWriter<NullWritable,Element> {
|
||||
AccumuloGraphConfiguration config;
|
||||
|
||||
protected ElementRecordWriter(TaskAttemptContext context) {
|
||||
|
||||
@@ -95,7 +95,9 @@ public class NamedIndexListTableWrapper extends BaseIndexedItemsListTableWrapper
|
||||
return null;
|
||||
|
||||
} finally {
|
||||
scan.close();
|
||||
if (scan != null) {
|
||||
scan.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user