On Wed, 11 Dec 2024 22:46:14 GMT, Chris Plummer <cjplum...@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