On Thu, 4 Jan 2024 01:57:29 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:

>> Remove the MLet feature and its tests.
>> 
>> Some tests use MLet classes but are not testing MLets.  These are updated, 
>> to use another test MBean or an MBean which is a URLClassLoader, e.g.
>> test/jdk/javax/management/MBeanServer/PostExceptionTest.java
>> test/jdk/javax/management/remote/mandatory/loading/TargetMBeanTest.java
>
> test/jdk/javax/management/Introspector/ClassLeakTest.java line 53:
> 
>> 51: 
>> 52:         MBeanServer mbs = MBeanServerFactory.createMBeanServer();
>> 53:         ObjectName testName = new ObjectName("x:name=Test");
> 
> Q: I'd just like to understand why it is `x:name=Test` instead of 
> `x:type=Test` as it was before.

These ObjectName patterns (domain:key=value) don't matter very much for these 
test mbeans.
We just need an ObjectName to pass when registering the MBean, and also to use 
when querying, e.g. calling getMBeanInfo.

The domain part was "x" but could be empty, but it must also define at least 
one key=value.
The "type=mlet" might still work (I just tested: it does 8-) ), but I wanted to 
remove it as it would be misleading.
So we need to add some key=value and just giving a name is enough.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16363#discussion_r1441557767

Reply via email to