First batch of errorprone fixes. #3061

This commit is contained in:
Mark H. Wood
2020-11-24 10:55:08 -05:00
parent 96742fe558
commit 65f04fcec9
29 changed files with 134 additions and 161 deletions

View File

@@ -16,9 +16,9 @@ import java.io.Reader;
import java.io.SequenceInputStream;
import java.nio.charset.StandardCharsets;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import javax.annotation.Nullable;
@@ -55,7 +55,7 @@ public class FullTextContentStreams extends ContentStreamBase {
}
protected void init(Item parentItem) {
fullTextStreams = new LinkedList<>();
fullTextStreams = new ArrayList<>();
if (parentItem != null) {
sourceInfo = parentItem.getHandle();
@@ -149,8 +149,8 @@ public class FullTextContentStreams extends ContentStreamBase {
}
private class FullTextBitstream {
private String itemHandle;
private Bitstream bitstream;
private final String itemHandle;
private final Bitstream bitstream;
public FullTextBitstream(final String parentHandle, final Bitstream file) {
this.itemHandle = parentHandle;
@@ -179,18 +179,20 @@ public class FullTextContentStreams extends ContentStreamBase {
}
}
private class FullTextEnumeration implements Enumeration<InputStream> {
private static class FullTextEnumeration implements Enumeration<InputStream> {
private final Iterator<FullTextBitstream> fulltextIterator;
public FullTextEnumeration(final Iterator<FullTextBitstream> fulltextStreams) {
this.fulltextIterator = fulltextStreams;
public FullTextEnumeration(final Iterator<FullTextBitstream> fulltextIterator) {
this.fulltextIterator = fulltextIterator;
}
@Override
public boolean hasMoreElements() {
return fulltextIterator.hasNext();
}
@Override
public InputStream nextElement() {
InputStream inputStream = null;
FullTextBitstream bitstream = null;