geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vamsavardhana Reddy (JIRA)" <j...@apache.org>
Subject [jira] Closed: (GERONIMO-1519) ResourceException.toString() can return null
Date Tue, 05 Dec 2006 17:14:23 GMT
     [ http://issues.apache.org/jira/browse/GERONIMO-1519?page=all ]

Vamsavardhana Reddy closed GERONIMO-1519.
-----------------------------------------

    Resolution: Fixed

Fixes toString() to return non-null string.

Fixed in rev 482713.

> ResourceException.toString() can return null
> --------------------------------------------
>
>                 Key: GERONIMO-1519
>                 URL: http://issues.apache.org/jira/browse/GERONIMO-1519
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: connector, specs
>    Affects Versions: 1.1, 1.1.2, 1.2, 2.0
>            Reporter: Jörg Heinicke
>         Assigned To: Vamsavardhana Reddy
>            Priority: Minor
>             Fix For: 1.1.2, 1.2, 2.0
>
>
> javax.resource.ResourceException overwrites toString() like the following:
> public String toString() {
>     return getMessage();
> }
> Instantiating ResourceException without parameter getMessage() will return null - and
this leads to NPEs in nearly every environment when the stacktrace is printed:
> java.lang.NullPointerException
>     at java.io.PrintWriter.write(PrintWriter.java:247)
>     at java.io.PrintWriter.print(PrintWriter.java:392)
>     at java.io.PrintWriter.println(PrintWriter.java:529)
>     at java.lang.Throwable.printStackTrace(Throwable.java:509)
> So I propose to either remove the toString() implemenation (java.lang.Throwable implements
it correctly) or to implement it correctly in ResourceException, i.e. not returning null.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message