On Thu, 12 Dec 2024 09:54:03 GMT, Kevin Walls <kev...@openjdk.org> wrote:
>> Unnecessary duplication of small utility method. There should be only one >> Util.newObjectName(). > > Kevin Walls has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains three additional > commits since the last revision: > > - Merge remote-tracking branch 'upstream/master' into 8345987_newObjectName > - static imports > - 8345987: java.management has two Util.newObjectName methods (remove one) Unnecessary duplication of small utility method. 1 src/java.management/share/classes/com/sun/jmx/mbeanserver/Util.java: public static ObjectName newObjectName(String string) This method uses new ObjectName(string). 2 src/java.management/share/classes/sun/management/Util.java public static ObjectName newObjectName(String name) This one uses ObjectName.getInstance(name), which is defined in ObjectName.java to do: return new ObjectName(name). So these two are equivalent. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22681#issuecomment-2542184977