Skip to content

Commit 1755e09

Browse files
committed
fix XMLStreamReaderAsync
1 parent e9b4d54 commit 1755e09

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

net.lecousin.core/src/main/java/net/lecousin/framework/xml/XMLStreamReaderAsync.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,10 @@ public ISynchronizationPoint<Exception> startRootElement() {
116116
return nextStartElement();
117117
}
118118
SynchronizationPoint<Exception> sp = new SynchronizationPoint<>();
119-
start.listenAsync(new Next(sp) {
120-
@Override
121-
protected void onNext() {
122-
if (Type.START_ELEMENT.equals(event.type)) sp.unblock();
123-
else nextStartElement().listenInline(sp);
124-
}
125-
}, sp);
119+
start.listenAsync(new ParsingTask(() -> {
120+
if (Type.START_ELEMENT.equals(event.type)) sp.unblock();
121+
else nextStartElement().listenInline(sp);
122+
}), sp);
126123
return sp;
127124
}
128125

0 commit comments

Comments
 (0)