Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo PR #3

Open
wants to merge 5 commits into
base: 3.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
8 changes: 5 additions & 3 deletions src/test/java/perf/MediaItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
import java.util.*;

import tools.jackson.core.*;
import java.util.stream.Collectors;
import tools.jackson.core.json.JsonFactory;

import java.util.stream.Stream;
public class MediaItem
{
public enum Player { JAVA, FLASH; }
Expand Down Expand Up @@ -60,8 +62,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();
}
Expand Down Expand Up @@ -175,7 +177,7 @@ public Content() { }

public void addPerson(String p) {
if (_persons == null) {
_persons = new ArrayList<>();
_persons = Stream.<String>empty().collect(Collectors.toCollection(ArrayList::new));
}
_persons.add(p);
}
Expand Down