RFR: 7105: Unable to open graph-view if JMC is booted with JDK 8
Marcus Hirt
hirt at openjdk.java.net
Fri Apr 9 18:04:11 UTC 2021
On Fri, 9 Apr 2021 17:17:19 GMT, Alex Macdonald <aptmac at openjdk.org> wrote:
> 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
Marked as reviewed by hirt (Lead).
-------------
PR: https://git.openjdk.java.net/jmc/pull/239
More information about the jmc-dev
mailing list