RFR: 7027: Avoid NPE for callers of TransformRegistry#getTransformData [v2]
Marcus Hirt
hirt at openjdk.java.net
Thu Dec 3 10:18:57 UTC 2020
On Wed, 2 Dec 2020 22:18:02 GMT, Gunnar Morling <github.com+28612+gunnarmorling at openjdk.org> wrote:
>> …) of no transform data exists
>>
>> @thegreystone, @Josh-Matsuoka, et al., this fixes an NPE in the `Transformer` class if there is no metadata for the given class (we unconditionally try to iterate over the returned list). I noticed this while debugging something else, it seems this NPE gets swallowed elsewhere, but creating it over and over is costly of course.
>>
>> I think never returning null from a collection method is a good practice anyways, so I've changed it accordingly. Could someone log an issue for this, so I can reference it? Thanks!
>
> Gunnar Morling has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit:
>
> 7027: avoiding NPE for callers of TransformRegistry#getTransformData() if no transform data exists
Marked as reviewed by hirt (Lead).
-------------
PR: https://git.openjdk.java.net/jmc/pull/169
More information about the jmc-dev
mailing list