-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b54
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8083986 | emb-9 | Sergey Bylokhov | P4 | Resolved | Fixed | team |
JDK-8308813 | openjdk8u382 | Sergey Bylokhov | P4 | Resolved | Fixed | b03 |
FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
The methods getMinValue and getMaxValue of java.awt.color.ICC_ColorSpace correctly throw IllegalArgumentException when the 'component' parameter is out of range. However, the exception message contains the literal string "+ component" instead of the value of 'component'.
This patch fixes the problem:
diff -r b8e8497c541c src/java.desktop/share/classes/java/awt/color/ICC_ColorSpace.java
--- a/src/java.desktop/share/classes/java/awt/color/ICC_ColorSpace.java Thu Feb 05 13:00:26 2015 +0100
+++ b/src/java.desktop/share/classes/java/awt/color/ICC_ColorSpace.java Thu Feb 05 19:21:31 2015 +0100
@@ -546,7 +546,7 @@
public float getMinValue(int component) {
if ((component < 0) || (component > this.getNumComponents() - 1)) {
throw new IllegalArgumentException(
- "Component index out of range: + component");
+ "Component index out of range: " + component);
}
return minVal[component];
}
@@ -571,7 +571,7 @@
public float getMaxValue(int component) {
if ((component < 0) || (component > this.getNumComponents() - 1)) {
throw new IllegalArgumentException(
- "Component index out of range: + component");
+ "Component index out of range: " + component);
}
return maxVal[component];
}
REPRODUCIBILITY :
This bug can be reproduced always.
A DESCRIPTION OF THE PROBLEM :
The methods getMinValue and getMaxValue of java.awt.color.ICC_ColorSpace correctly throw IllegalArgumentException when the 'component' parameter is out of range. However, the exception message contains the literal string "+ component" instead of the value of 'component'.
This patch fixes the problem:
diff -r b8e8497c541c src/java.desktop/share/classes/java/awt/color/ICC_ColorSpace.java
--- a/src/java.desktop/share/classes/java/awt/color/ICC_ColorSpace.java Thu Feb 05 13:00:26 2015 +0100
+++ b/src/java.desktop/share/classes/java/awt/color/ICC_ColorSpace.java Thu Feb 05 19:21:31 2015 +0100
@@ -546,7 +546,7 @@
public float getMinValue(int component) {
if ((component < 0) || (component > this.getNumComponents() - 1)) {
throw new IllegalArgumentException(
- "Component index out of range: + component");
+ "Component index out of range: " + component);
}
return minVal[component];
}
@@ -571,7 +571,7 @@
public float getMaxValue(int component) {
if ((component < 0) || (component > this.getNumComponents() - 1)) {
throw new IllegalArgumentException(
- "Component index out of range: + component");
+ "Component index out of range: " + component);
}
return maxVal[component];
}
REPRODUCIBILITY :
This bug can be reproduced always.
- backported by
-
JDK-8083986 Wrong exception messages in java.awt.color.ICC_ColorSpace
- Resolved
-
JDK-8308813 Wrong exception messages in java.awt.color.ICC_ColorSpace
- Resolved