Skip to content

Commit

Permalink
Public visibility on reset methods, peek token in nextName()
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinherron committed Sep 17, 2022
1 parent 9ba4fee commit f568945
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -79,7 +79,7 @@ public OpcUaJsonDecoder(EncodingContext context, Reader reader) {
reset(reader);
}

void reset(Reader reader) {
public void reset(Reader reader) {
jsonReader = new JsonReader(reader);
}

Expand Down Expand Up @@ -1692,7 +1692,7 @@ private String nextName() throws IOException {
peekedNextName = null;
return next;
} else {
return jsonReader.nextName();
return jsonReader.peek() == JsonToken.NAME ? jsonReader.nextName() : null;
}
}

Expand Down
Expand Up @@ -82,7 +82,7 @@ public OpcUaJsonEncoder(org.eclipse.milo.opcua.stack.core.encoding.EncodingConte
*
* @param writer the new {@link Writer} to write to.
*/
void reset(Writer writer) {
public void reset(Writer writer) {
jsonWriter = new JsonWriter(writer);
jsonWriter.setHtmlSafe(false);
}
Expand All @@ -92,7 +92,7 @@ void reset(Writer writer) {
*
* @param outputStream the new {@link OutputStream} to write to.
*/
void reset(OutputStream outputStream) {
public void reset(OutputStream outputStream) {
jsonWriter = new JsonWriter(new OutputStreamWriter(outputStream));
jsonWriter.setHtmlSafe(false);
}
Expand Down

0 comments on commit f568945

Please sign in to comment.