-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0
-
b56
-
sparc
-
solaris_2.6
-
Verified
Name: bkR10101 Date: 11/08/2001
Spec doesn't describe the behavior of the following methods' when incorrect
arguments are passed to them (when 'off' point out of the array, 'len'
is bigger than (data.length - off), when the parameters are negative)
public int charsWidth(char[] data, int off, int len)
public int bytesWidth(byte[] data, int off, int len)
The specification for these methods should be
changed as it is described in the document
"Requirements for Writing Java API Specifications":
http://java.sun.com/j2se/javadoc/writingapispecs/index.html .
If StringIndexOutOfBoundsException should be thrown, it has to be defined
explicitely by the spec.
======================================================================
4523539 : spec for java.awt.FontMetrics methods is silent about null args
states
Spec doesn't describe the following methods' behavior when null is passed
as a parameter:
public int charsWidth(char[] data, int off, int len)
public int bytesWidth(byte[] data, int off, int len)
public int stringWidth(String str)
The specification for these methods should be
changed as it is described in the document
"Requirements for Writing Java API Specifications":
http://java.sun.com/j2se/javadoc/writingapispecs/index.html
If NullPointerException should be thrown, it has to be defined
explicitely by the spec.
This is so intertwined with the issues in this report that
4523539 is closed as a dup of this and both sets of issues should be addressed here.
Spec doesn't describe the behavior of the following methods' when incorrect
arguments are passed to them (when 'off' point out of the array, 'len'
is bigger than (data.length - off), when the parameters are negative)
public int charsWidth(char[] data, int off, int len)
public int bytesWidth(byte[] data, int off, int len)
The specification for these methods should be
changed as it is described in the document
"Requirements for Writing Java API Specifications":
http://java.sun.com/j2se/javadoc/writingapispecs/index.html .
If StringIndexOutOfBoundsException should be thrown, it has to be defined
explicitely by the spec.
======================================================================
4523539 : spec for java.awt.FontMetrics methods is silent about null args
states
Spec doesn't describe the following methods' behavior when null is passed
as a parameter:
public int charsWidth(char[] data, int off, int len)
public int bytesWidth(byte[] data, int off, int len)
public int stringWidth(String str)
The specification for these methods should be
changed as it is described in the document
"Requirements for Writing Java API Specifications":
http://java.sun.com/j2se/javadoc/writingapispecs/index.html
If NullPointerException should be thrown, it has to be defined
explicitely by the spec.
This is so intertwined with the issues in this report that
4523539 is closed as a dup of this and both sets of issues should be addressed here.
- duplicates
-
JDK-4523539 spec for java.awt.FontMetrics methods is silent about null args
-
- Closed
-
- relates to
-
JDK-6371275 FontMetrics.charsWidth(char[],int,int) doesn't throw expected IOBException when length is invalid
-
- Resolved
-