[9] RFR 8072369: [TESTBUG] Remove potentially insecure class cast in some hotspot tests
Konstantin Shefov
konstantin.shefov at oracle.com
Wed Oct 7 15:28:48 UTC 2015
Hi Christian
The assumption that the Application Class Loader is an instance of
URLClassLoader can be false, because, AFAIK, it is not documented anywhere.
This may become false in the future releases of JDK.
That is why it is better not to relay on this assumption.
Thanks
-Konstantin
06.10.2015 22:35, Christian Thalinger пишет:
>
>> On Sep 9, 2015, at 3:16 AM, Konstantin Shefov
>> <konstantin.shefov at oracle.com <mailto:konstantin.shefov at oracle.com>>
>> wrote:
>>
>> Description of the fix.
>> Some tests in hotspot repo use class cast from Application class
>> loader to URLClassLoader, but Application class loader is not
>> guaranteed to be always an instance of a URLClassLoader.
>
> Please excuse my lack of knowledge here but in what configuration does
> this happen?
>
>> The tests should be changed so that they do not cast appclassloader
>> to URLClassLoader.
>>
>> -Konstantin
>>
>> On 09/08/2015 07:01 PM, Konstantin Shefov wrote:
>>> Hello
>>>
>>> Please review a test bug fix.
>>>
>>> JBS entry: https://bugs.openjdk.java.net/browse/JDK-8072369
>>> Webrev: http://cr.openjdk.java.net/~kshefov/8072369/webrev.00
>>>
>>> Thanks
>>> -Konstantin
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20151007/14f3c251/attachment.html>
More information about the hotspot-compiler-dev
mailing list