gcj/184: Some null pointer method invocations cause SIGABRT
rolfwr@ii.uib.no
rolfwr@ii.uib.no
Tue Mar 28 07:40:00 GMT 2000
>Number: 184
>Category: gcj
>Synopsis: Some null pointer method invocations cause SIGABRT
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apbianco
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 28 07:40:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Rolf W. Rasmussen <rolfwr@ii.uib.no>
>Release: gcc version 2.96 20000327 (experimental)
>Organization:
>Environment:
i586-pc-linux-gnu (Debian)
>Description:
Some methods when invoced using a null pointer, will generate
a SIGABRT, instead of the NullPointerException one would
expect.
The problem seems only to occur with simple methods such as
Integer.intValue(), String.length(), Vector.size().
>How-To-Repeat:
Compile and run
--------
public class NullPointerExceptionTest {
public static void main(String[] args) {
((Integer) null).intValue();
}
}
--------
Other one-liners that trigger the same problem:
((String) null).length();
((java.util.Vector) null).size();
Boolean ref = null; ref.booleanValue();
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Java-prs
mailing list