JDK-8004859 : Graphics.getClipBounds/getClip return difference nonequivalent bounds, depending from transform.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 7u40,8
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2012-12-11
  • Updated: 2013-11-14
  • Resolved: 2013-07-03
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 JDK 8
7u40Fixed 8 b100Fixed
Related Reports
Duplicate :  
Relates :  
Description
Graphics.getClipBounds/getClip internally uses transformShape/untransformShape which are not symmetric in some cases.
Also getClipBounds() sometimes uses usrClip directly(if usrClip is a Rectangle) and sometimes uses getBounds(). But getBounds() returns empty Rectangle if width and height is negative.

This caused jck failure, if default graphics transform is not an identity. 
Comments
Verified in jdk8b115 OS X 10.9 x64 java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b115) Java HotSpot(TM) 64-Bit Server VM (build 25.0-b57, mixed mode) Tests api/java_awt/Graphics/index_GetClipBounds api/java_awt/Graphics/index_SetGetClip passed successful Graphics2010_14: Passed. headless Graphics2011_14: Passed. headless Graphics2012_14: Passed. headless Graphics2013_14: Passed. headless Graphics2014_14: Passed. headless STATUS:Passed.test cases: 5; all passed Graphics2004_14: Passed. headless Graphics2005_14: Passed. headless STATUS:Passed.test cases: 2; all passed
14-11-2013

Should we close this bug as a duplicate of JCK-7301159 ?
01-07-2013

tck-red is removed as TCK test is challenged and needs to be exlcuded (JCK-7301067 )
28-06-2013

who are reviewers?
27-06-2013

Suggested fix: http://cr.openjdk.java.net/~serb/8004859/webrev.03/
10-06-2013