RFR: 8264001: JFR: Modernize implementation

Andrey Turbanov github.com+741251+turbanoff at openjdk.java.net
Wed Mar 24 17:54:41 UTC 2021


On Mon, 22 Mar 2021 22:35:32 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:

> Hi,
> 
> Could I have a review of changes that updates the Java implementation of JFR with newer language constructs and library calls.  I also removed unused imports, dead code and added @Override where approriate.
> 
> Testing: jdk/jdk/jfr

src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordedStackTrace.java line 54:

> 52:         Object[] array = getTyped("frames", Object[].class, null);
> 53:         if (array == null) {
> 54:             return new ArrayList<>(0);

Why ArrayList is used here and not List.of() as everywhere else?

-------------

PR: https://git.openjdk.java.net/jdk/pull/3138


More information about the hotspot-jfr-dev mailing list