RFR: 7105: Unable to open graph-view if JMC is booted with JDK 8
Alex Macdonald
aptmac at openjdk.java.net
Fri Apr 9 17:21:29 UTC 2021
This one-liner PR addresses JMC-7105 [[0]](https://bugs.openjdk.java.net/browse/JMC-7105), in which the GraphView is unable to open when JMC is launched with JDK 8.
The problem here is the usage of `List.of()` [[1]](https://github.com/openjdk/jmc/blob/master/application/org.openjdk.jmc.flightrecorder.graphview/src/main/java/org/openjdk/jmc/flightrecorder/graphview/views/GraphView.java#L186), which is supported in JDK 9+ [[2]](https://docs.oracle.com/javase/9/docs/api/java/util/List.html#of--), but not available in JDK 8 [[3]](https://docs.oracle.com/javase/8/docs/api/java/util/List.html).
This PR simply changes `List.of()` to `Arrays.asList()` to make it JDK 8 compliant.
[0] https://bugs.openjdk.java.net/browse/JMC-7105
[1] https://github.com/openjdk/jmc/blob/master/application/org.openjdk.jmc.flightrecorder.graphview/src/main/java/org/openjdk/jmc/flightrecorder/graphview/views/GraphView.java#L186
[2] https://docs.oracle.com/javase/9/docs/api/java/util/List.html#of--
[3] https://docs.oracle.com/javase/8/docs/api/java/util/List.html
-------------
Commit messages:
- 7105: Unable to open graph-view if JMC is booted with JDK 8
Changes: https://git.openjdk.java.net/jmc/pull/239/files
Webrev: https://webrevs.openjdk.java.net/?repo=jmc&pr=239&range=00
Issue: https://bugs.openjdk.java.net/browse/JMC-7105
Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jmc/pull/239.diff
Fetch: git fetch https://git.openjdk.java.net/jmc pull/239/head:pull/239
PR: https://git.openjdk.java.net/jmc/pull/239
More information about the jmc-dev
mailing list