--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/ParserFactory.java Tue Sep 17 19:37:49 2019 +0200
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/ParserFactory.java Wed Sep 18 03:45:46 2019 +0200
@@ -53,6 +53,9 @@
for (Type t : metadata.getTypes()) {
types.put(t.getId(), t);
}
+ // Add to separate list
+ // so createCompositeParser can throw
+ // IOException outside lambda
List<Type> typeList = new ArrayList<>();
types.forEach(typeList::add);
for (Type t : typeList) {
@@ -61,7 +64,6 @@
if (t.isSimpleType()) { // Reduce to nested parser
parsers.put(t.getId(), cp.parsers[0]);
}
-
}
}
// Override event types with event parsers
@@ -312,7 +314,7 @@
}
}
- final static class CompositeParser extends Parser {
+ private final static class CompositeParser extends Parser {
private final Parser[] parsers;
public CompositeParser(Parser[] valueParsers) {
@@ -336,7 +338,7 @@
}
}
- public static final class EventValueConstantParser extends Parser {
+ private static final class EventValueConstantParser extends Parser {
private final ConstantLookup lookup;
private Object lastValue = 0;
private long lastKey = -1;
@@ -361,7 +363,7 @@
}
}
- public static final class ConstantValueParser extends Parser {
+ private static final class ConstantValueParser extends Parser {
private final ConstantLookup lookup;
ConstantValueParser(ConstantLookup lookup) {
this.lookup = lookup;