RFR: 8345987: java.management has two Util.newObjectName methods (remove one) [v2]

Kevin Walls kevinw at openjdk.org
Thu Dec 12 09:57:36 UTC 2024


On Wed, 11 Dec 2024 22:46:14 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> Right, there are two Util classes, and some classes use both...
>> e.g. ObjectName.java uses com.sun.jmx.mbeanserver.Util (for Util.wildmatch()), 
>> and I want to use newObjectName from sun.management.Util.
>
>> Right, there are two Util classes, and some classes use both... e.g. ObjectName.java uses com.sun.jmx.mbeanserver.Util (for Util.wildmatch()), and I want to use newObjectName from sun.management.Util.
> 
> In that case I'd probably just use the fully qualified class name when making the call and not even bother with an import. Static imports make the code harder to read because it looks like you are calling a method of the class that the call is being made from.

Sure, updated to use the method with its qualified class name.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22681#discussion_r1881746491


More information about the serviceability-dev mailing list