equal
deleted
inserted
replaced
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /** |
24 /** |
25 * @test |
25 * @test |
26 * @bug 6476665 6523403 6733501 |
26 * @bug 6476665 6523403 6733501 7042594 |
27 * @summary Verifies reading and writing profiles and tags of the standard color |
27 * @summary Verifies reading and writing profiles and tags of the standard color |
28 * spaces |
28 * spaces |
29 * @run main ReadWriteProfileTest |
29 * @run main ReadWriteProfileTest |
30 */ |
30 */ |
31 import java.awt.color.ColorSpace; |
31 import java.awt.color.ColorSpace; |
92 } |
92 } |
93 |
93 |
94 for (int tagSig : tags[i].keySet()) { |
94 for (int tagSig : tags[i].keySet()) { |
95 byte [] tagData = pf.getData(tagSig); |
95 byte [] tagData = pf.getData(tagSig); |
96 byte [] empty = new byte[tagData.length]; |
96 byte [] empty = new byte[tagData.length]; |
97 pf.setData(tagSig, empty); |
97 boolean emptyDataRejected = false; |
|
98 try { |
|
99 pf.setData(tagSig, empty); |
|
100 } catch (IllegalArgumentException e) { |
|
101 emptyDataRejected = true; |
|
102 } |
|
103 if (!emptyDataRejected) { |
|
104 throw new |
|
105 RuntimeException("Test failed: empty tag data was not rejected."); |
|
106 } |
98 pf.setData(tagSig, tagData); |
107 pf.setData(tagSig, tagData); |
99 |
108 |
100 byte [] tagData1 = pf.getData(tagSig); |
109 byte [] tagData1 = pf.getData(tagSig); |
101 |
110 |
102 if (!Arrays.equals(tagData1, tags[i].get(tagSig))) |
111 if (!Arrays.equals(tagData1, tags[i].get(tagSig))) |