JDK-6848336 : java/awt/event/InputEvent/ModHighBitsTest/ModHighBitsTest.html fails in Jdk7 b60 pit build
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-06-05
  • Updated: 2011-05-17
  • Resolved: 2011-05-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b112Fixed
Related Reports
Relates :  
Relates :  
Description
Regression testcase java/awt/event/InputEvent/ModHighBitsTest/ModHighBitsTest.html
fails with the following error on Solaris sparc 10, Rhel5 and Windows XP with Jdk7 b60 pit build.

"java.lang.RuntimeException: Test failed. Modifier bits were not preserved (was:-559071232 now:-2147483648)
	at ModHighBitsTest.init(ModHighBitsTest.java:27)
	at com.sun.javatest.regtest.AppletWrapper$AppletThread.run(AppletWrapper.java:144)
	at java.lang.Thread.run(Thread.java:717)
STATUS:Failed.Applet thread threw exception: java.lang.RuntimeException: Test failed. Modifier bits were not preserved (was:-559071232 now:-2147483648)
result: Failed. Execution failed: Applet thread threw exception: java.lang.RuntimeException: Test failed. Modifier bits were not preserved (was:-559071232 now:-2147483648)"

Also failed with Jdk7b59. Attached is the .jtr file

Comments
EVALUATION InputEvent class. We've changed this bit while implementing the ExtraMouseButtons (6315717) RFE: static final int FIRST_HIGH_BIT = 1 << 31; static final int JDK_1_3_MODIFIERS = SHIFT_DOWN_MASK - 1; static final int HIGH_MODIFIERS = ~( FIRST_HIGH_BIT - 1 ); Later on, we rely on that bit: public int getModifiers() { return modifiers & (JDK_1_3_MODIFIERS | HIGH_MODIFIERS); } which obviously should change after that fix.
23-08-2010

SUGGESTED FIX Till now there is no any known drawbacks of that incompatible change. I'm going to exclude the test.
12-08-2010

EVALUATION More mouse buttons support required to extend the bit mask range so we changed the InputEvent field to the extreme value: static final int FIRST_HIGH_BIT = 1 << 31; In turn the test checks if modifiers remain preserved during the KeyEvent construction.
23-07-2009

EVALUATION Easily reproducible problem. Most likely it's a regression of 6315717 (Support For Mouse With Multiple Scroll Wheels and 4 or More Buttons).
23-07-2009