diff --git a/src/main/java/tools/jackson/core/async/ByteArrayFeeder.java b/src/main/java/tools/jackson/core/async/ByteArrayFeeder.java index 278d370042..8583d5e77e 100644 --- a/src/main/java/tools/jackson/core/async/ByteArrayFeeder.java +++ b/src/main/java/tools/jackson/core/async/ByteArrayFeeder.java @@ -10,7 +10,7 @@ public interface ByteArrayFeeder extends NonBlockingInputFeeder { /** * Method that can be called to feed more data, if (and only if) - * {@link #needMoreInput} returns true. + * {@link #needMoreInput} returnns true. * * @param data Byte array that contains data to feed: caller must ensure data remains * stable until it is fully processed (which is true when {@link #needMoreInput} diff --git a/src/test/java/perf/MediaItem.java b/src/test/java/perf/MediaItem.java index f118760e65..977c009016 100644 --- a/src/test/java/perf/MediaItem.java +++ b/src/test/java/perf/MediaItem.java @@ -2,6 +2,8 @@ import java.io.IOException; import java.io.StringWriter; +import java.util.stream.Collectors; +import java.util.stream.Stream; import java.util.*; import tools.jackson.core.*; @@ -10,6 +12,7 @@ public class MediaItem { public enum Player { JAVA, FLASH; } + public enum Size { SMALL, LARGE; } private List _photos; @@ -60,8 +63,8 @@ public void write(JsonGenerator gen) throws IOException gen.writeNull(); } else { gen.writeStartArray(); - for (int i = 0, len = _photos.size(); i < len; ++i) { - _photos.get(i).write(gen); + for (Photo photo : _photos) { + photo.write(gen); } gen.writeEndArray(); } @@ -175,7 +178,7 @@ public Content() { } public void addPerson(String p) { if (_persons == null) { - _persons = new ArrayList<>(); + _persons = Stream.empty().collect(Collectors.toCollection(ArrayList::new)); } _persons.add(p); }