JDK-7042594 : 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
  • Type: Bug
  • Status: Closed
  • Resolution: Fixed
  • Component: client-libs
  • Sub-Component: 2d
  • Priority: P2
  • Affected Version: 7
  • OS: linux_oracle_6.0
  • CPU: x86
  • Submit Date: 2011-05-06
  • Updated Date: 2017-05-16
  • Resolved Date: 2011-06-30
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 Availabitlity Release.

To download the current JDK release, click here.
JDK 7
7 b145Fixed
Related Reports
Relates :  
Relates :  
Description
Tests 

api/java_awt/Color/ICC_ProfileRGB/index.html#GetTesttestCase17[testCase17]		api/java_awt/Color/ICC_ProfileRGB/index.html#GetTesttestCase2[testCase2]		api/java_awt/Color/ICC_ProfileRGB/index.html#SetDataTesttestCase1[testCase1]		


fail against Open JDK 7 b138 on OEL 6 x64 with message

java.awt.color.CMMException: Can not write tag data.

Comments
SUGGESTED FIX http://sa.sfbay.sun.com/projects/java2d_data/7/7042594.3
2011-06-04

EVALUATION 6-open did not have this problem because we used a modified version of Little CMS 1.X. Little CMS 2.0 now supports setting tag data but does validation that KCMS does not. That validation by LittleCMS is reasonable and I presume was not observed by any of our tests when we integrated LittleCMS into 7 because those tests use validate data, whereas JCK uses incorrect data. In the implementation of ICC_Profile.java it can be seen that it was always possible that CMMException ( a subclass of RuntimeException) might be thrown but since KCMS never checked the data it did not. So what needs to be done here is 1. We document CMMException and the conditions under which it might be thrown 2. The failing test needs to be updated or excluded.
2011-05-20

EVALUATION Note that all failed test cases use the same pattern: they set incorrect data as a content of MAB curve: GetTest.java testCase17(): byte[] headData = new byte[10]; for(int i = 0;i < headData.length;i++) headData[i] = (byte)i; profile.setData(ICC_ProfileRGB.icSigAToB0Tag, headData); testCase2(): byte[] headData = new byte[10]; for(int i = 0;i < headData.length;i++) headData[i] = (byte)i; profile.setData(ICC_ProfileRGB.icSigAToB0Tag, headData); SetDataTest.java: testCase1(): byte[] headData = new byte[10]; for(int i = 0;i < headData.length;i++) headData[i] = (byte)i; profile.setData(ICC_ProfileRGB.icSigAToB0Tag, headData); This approach works for kcms, because kcms does not validate tag data, and silently accepts any binary data as a tag content. In contrast, lcms always validates user supplied data, and reject injection of malformed tag content. I am not sure what in particular these test are supposed to verify, but, they should probably operate with correct tag data here.
2011-05-10

EVALUATION >java.awt.color.CMMException: Can not write tag data. > at sun.java2d.cmm.lcms.LCMS.setTagData(Native Method) > at java.awt.color.ICC_Profile.setData(ICC_Profile.java:1400) This is the same problem as the regression test failures reported in 7043064: sun/java2d/cmm/ tests failed against RI b141 & b138-nightly
2011-05-09