Skip to content

Commit 6f3a051

Browse files
committed
yaml: Update snakeyaml revision
1 parent 8e3809f commit 6f3a051

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

format/yaml/src/main/java/org/spongepowered/configurate/yaml/YamlParserComposer.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,18 @@ final class YamlParserComposer extends ParserImpl {
8383
// "api" //
8484

8585
public void singleDocumentStream(final ConfigurationNode node) throws ParsingException {
86-
requireEvent(Event.ID.StreamStart);
87-
document(node);
88-
requireEvent(Event.ID.StreamEnd);
86+
this.requireEvent(Event.ID.StreamStart);
87+
this.document(node);
88+
this.requireEvent(Event.ID.StreamEnd);
8989
}
9090

9191
public void document(final ConfigurationNode node) throws ParsingException {
9292
if (this.processComments && node instanceof CommentedConfigurationNodeIntermediary<@NonNull ?>) {
9393
// Only collect comments if we can handle them in the first place
94-
this.scanner().setEmitComments(true);
94+
this.scanner().setParseComments(true);
9595
}
9696

97-
if (peekEvent().is(Event.ID.StreamEnd)) {
97+
if (this.peekEvent().is(Event.ID.StreamEnd)) {
9898
return;
9999
}
100100

@@ -125,7 +125,7 @@ public void document(final ConfigurationNode node) throws ParsingException {
125125
ex.initPath(active.node::path);
126126
throw ex;
127127
} finally {
128-
this.scanner().setEmitComments(false);
128+
this.scanner().setParseComments(false);
129129
this.aliases.clear();
130130
this.declaredTags.clear();
131131
}
@@ -138,7 +138,7 @@ ScannerImpl scanner() {
138138
// events //
139139

140140
void requireEvent(final Event.ID type) throws ParsingException {
141-
final Event next = peekEvent();
141+
final Event next = this.peekEvent();
142142
if (!next.is(type)) {
143143
throw makeError(next.getStartMark(), "Expected next event of type" + type + " but was " + next.getEventId(), null);
144144
}
@@ -147,7 +147,7 @@ void requireEvent(final Event.ID type) throws ParsingException {
147147

148148
@SuppressWarnings("unchecked")
149149
<T extends Event> T requireEvent(final Event.ID type, final Class<T> clazz) throws ParsingException {
150-
final Event next = peekEvent();
150+
final Event next = this.peekEvent();
151151
if (!next.is(type)) {
152152
throw makeError(next.getStartMark(), "Expected next event of type " + type + " but was " + next.getEventId(), null);
153153
}
@@ -210,7 +210,7 @@ void popFrame() {
210210
}
211211

212212
Frame peekFrame() {
213-
return peekFrame(0);
213+
return this.peekFrame(0);
214214
}
215215

216216
Frame peekFrame(final int depth) {
@@ -328,12 +328,12 @@ void applyComment(final @Nullable String comment, final ConfigurationNode node)
328328
}
329329

330330
void collectComments() {
331-
if (!this.processComments || !this.scanner().isEmitComments()) {
331+
if (!this.processComments || !this.scanner().isParseComments()) {
332332
return;
333333
}
334334

335-
while (peekEvent().is(Event.ID.Comment)) {
336-
final CommentEvent event = (CommentEvent) getEvent();
335+
while (this.peekEvent().is(Event.ID.Comment)) {
336+
final CommentEvent event = (CommentEvent) this.getEvent();
337337
if (event.getCommentType() != CommentType.BLANK_LINE) {
338338
@Nullable StringBuilder commentCollector = this.commentCollector;
339339
if (commentCollector == null) {
@@ -352,23 +352,23 @@ void collectComments() {
352352
}
353353

354354
public <N extends ConfigurationNode> Stream<N> stream(final ConfigurationNodeFactory<N> factory) throws ParsingException {
355-
requireEvent(Event.ID.StreamStart);
355+
this.requireEvent(Event.ID.StreamStart);
356356
return StreamSupport.stream(Spliterators.spliteratorUnknownSize(new Iterator<N>() {
357357
@Override
358358
public boolean hasNext() {
359-
return !checkEvent(Event.ID.StreamEnd);
359+
return !YamlParserComposer.this.checkEvent(Event.ID.StreamEnd);
360360
}
361361

362362
@Override
363363
public N next() {
364-
if (!hasNext()) {
364+
if (!this.hasNext()) {
365365
throw new IndexOutOfBoundsException();
366366
}
367367
try {
368368
final N node = factory.createNode();
369-
document(node);
370-
if (!hasNext()) {
371-
requireEvent(Event.ID.StreamEnd);
369+
YamlParserComposer.this.document(node);
370+
if (!this.hasNext()) {
371+
YamlParserComposer.this.requireEvent(Event.ID.StreamEnd);
372372
}
373373
return node;
374374
} catch (final ConfigurateException e) {

0 commit comments

Comments
 (0)