RFR : JDK-8167337 - When jmxremote.port=0, JDP broadcasts "0" instead of assigned port
Harsha Wardhana B
harsha.wardhana.b at oracle.com
Mon Jan 16 06:21:45 UTC 2017
Hi Amit,
In JdpJmxRemoteDynamicPortTestCase:48 needs null/empty check for jmx url.
JdpJmxRemoteDynamicPortTestCase:49, array length needs to checked before
accessing index at token[6].
It is possible that port number need not always be present at given
index and hence we may have to follow different approach to extract port
number. Please check if approach below works.
<code>
int idx = jmxurl.indexOf(':');
while (idx != -1) {
jmxurl = jmxurl.substring(idx+1);
idx = jmxurl.indexOf(':');
}
if(jmxurl.indexOf('/') == -1) {
throw new RuntimeException("Test failed : Invalid
JMXServiceURL");
}
String portStr = jmxurl.substring(0,jmxurl.indexOf('/'));
int port = Integer.parseInt(portStr);
if( port == 0 ) {
throw new RuntimeException("Test failed : Zero port for
jmxremote");
}
</code>
Regards
Harsha
On Monday 16 January 2017 11:16 AM, Amit Sapre wrote:
> Thanks Dmitry for the review.
>
> Can I have one more reviewer for this fix ?
>
> Thanks,
> Amit
>
>> -----Original Message-----
>> From: Dmitry Samersoff
>> Sent: Sunday, January 15, 2017 4:49 PM
>> To: Amit Sapre; serviceability-dev
>> Subject: Re: RFR : JDK-8167337 - When jmxremote.port=0, JDP broadcasts
>> "0" instead of assigned port
>>
>> Amit,
>>
>> Changes looks good to me.
>>
>> -Dmitry
>>
>>
>> On 2017-01-13 09:17, Amit Sapre wrote:
>>> Hello,
>>>
>>>
>>>
>>> Please review the fix for JDK-8167337
>>>
>>>
>>>
>>> Bug Id : https://bugs.openjdk.java.net/browse/JDK-8167337
>>>
>>> Webrev :
>>> http://cr.openjdk.java.net/~asapre/webrev/2017/JDK-8167337/webrev.00/
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Amit
>>>
>>
>> --
>> Dmitry Samersoff
>> Oracle Java development team, Saint Petersburg, Russia
>> * I would love to change the world, but they won't give me the sources.
More information about the serviceability-dev
mailing list