-
Bug
-
Resolution: Fixed
-
P3
-
6
-
None
-
b47
-
generic
-
generic
NullPointerException and IndexOutOfBoundsException declared in methods
public void shape(char[] text, int start, int count)
public void shape(char[] text, int start, int count, int context)
are not thrown if value of 'count' is 0.
Here is an example:
------- Test.java ----------------------------------
import java.awt.font.NumericShaper;
public class Test {
public static void main(String[] args) {
final NumericShaper shaper = NumericShaper.getShaper(NumericShaper.EUROPEAN);
// NullPointerException is not thrown
shaper.shape(null, 123, 0);
shaper.shape(null, 123, 0, NumericShaper.EUROPEAN);
// IndexOutOfBoundsException is not thrown
shaper.shape("123".toCharArray(), 500, 0);
shaper.shape("123".toCharArray(), 500, 0, NumericShaper.EUROPEAN);
}
}
###@###.### 2005-07-19 07:12:31 GMT
public void shape(char[] text, int start, int count)
public void shape(char[] text, int start, int count, int context)
are not thrown if value of 'count' is 0.
Here is an example:
------- Test.java ----------------------------------
import java.awt.font.NumericShaper;
public class Test {
public static void main(String[] args) {
final NumericShaper shaper = NumericShaper.getShaper(NumericShaper.EUROPEAN);
// NullPointerException is not thrown
shaper.shape(null, 123, 0);
shaper.shape(null, 123, 0, NumericShaper.EUROPEAN);
// IndexOutOfBoundsException is not thrown
shaper.shape("123".toCharArray(), 500, 0);
shaper.shape("123".toCharArray(), 500, 0, NumericShaper.EUROPEAN);
}
}
###@###.### 2005-07-19 07:12:31 GMT