<AWT Dev> [9] Review request for 8051359 JPopupMenu creation in headless mode with JDK9b23 causes NPE

Alexander Scherbatiy alexandr.scherbatiy at oracle.com
Tue Jul 22 11:00:20 UTC 2014


   Could you review the updated fix:

  - isHeadless() check is removed from the targetToAppContext and 
insertTargetMapping methods.

   Regression java/awt/Headless and javax/swing/Headless tests pass with 
this fix.
   Only some tests from JCK api/java_awt and api/javax_swing fail in 
headless mode and they have different cause than app context NPE.


On 7/21/2014 2:01 PM, Petr Pchelko wrote:
> Hello, Alexander.
> Isn't it better to use a different approach and just remove the headless check in targetToAppContext method?
> I think this check is incorrect, because it's perfectly valid to have multiple AppContexts in headless mode.
> With best regards. Petr
> On 21 июля 2014 г., at 13:33, Alexander Scherbatiy <alexandr.scherbatiy at oracle.com> wrote:
>> Hello,
>> Could you review the fix:
>>   bug: https://bugs.openjdk.java.net/browse/JDK-8051359
>>   webrev: http://cr.openjdk.java.net/~alexsch/8051359/webrev.00
>>   The fix avoids NPE throwing in headless mode.
>>   There are already regression tests that covers the issue in jdk/test/javax/swing/Headless folder.
>> Thanks,
>> Alexandr.

More information about the awt-dev mailing list