<Swing Dev> <Beans Dev> RFR: 8169887: javax/swing/JEditorPane/8080972/TestJEditor.java, javax/swing/text/View/8080972/TestObjectView.java are failing

Alexandr Scherbatiy alexandr.scherbatiy at oracle.com
Mon Nov 21 14:52:50 UTC 2016


The fix looks good to me.

Thanks,
Alexandr.

On 11/18/2016 9:21 PM, Sergey Bylokhov wrote:
> Looks fine.
>
> On 18.11.16 21:08, Phil Race wrote:
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8169887
>> webrev : http://cr.openjdk.java.net/~prr/8169887/
>>
>> 8155874 changed many calls from the deprecated Class.newInstance()
>> to Class.getDeclaredConstructor().newInstance().
>>
>> However in the cases where the called code may be loaded from
>> a different class loader (ie app code) these are not equivalent
>> and require a doPrivileged.
>>
>> The fix is to revert to Class.newInstance() for all cases where it
>> is not obvious that we will only call code from within the same
>> desktop module. This should be the lowest risk fix.
>>
>> Later (JDK10) we can revisit these.
>>
>>
>> note that the change at line 473/474 in 
>> java/beans/PropertyDescriptor.java
>> was actually a mistake ! I just noticed it and that is reverted to 
>> what it
>> was before the first fix :-
>> http://cr.openjdk.java.net/~prr/8155874/src/java.desktop/share/classes/java/beans/PropertyDescriptor.java.sdiff.html 
>>
>>
>>
>> -phil
>
>




More information about the swing-dev mailing list