On Wed, 11 Dec 2024 18:55:11 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:
>> Unnecessary duplication of small utility method. There should be only one >> Util.newObjectName(). > > src/java.management/share/classes/javax/management/ObjectName.java line 40: > >> 38: import java.util.Map; >> 39: >> 40: import static sun.management.Util.newObjectName; > > What is the motivation for doing the static import? I prefer seeing > Util.newObjectName(). 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. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22681#discussion_r1881014021