[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commit-cp] [bugs #9949] java.text.AttributedString will throw a NPE at
From: |
Tom Tromey |
Subject: |
[commit-cp] [bugs #9949] java.text.AttributedString will throw a NPE at line 276 |
Date: |
Tue, 17 Aug 2004 08:43:08 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040308 |
This mail is an automated notification from the bugs tracker
of the project: classpath.
/**************************************************************************/
[bugs #9949] Latest Modifications:
Changes by:
Tom Tromey <address@hidden>
'Date:
Tue 08/17/2004 at 03:08 (America/Denver)
What | Removed | Added
---------------------------------------------------------------------------
Resolution | None | Fixed
Status | Open | Closed
------------------ Additional Follow-up Comments ----------------------------
I'm checking in the fix for this.
/**************************************************************************/
[bugs #9949] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=9949>
Project: classpath
Submitted by: 0
On: Mon 08/09/2004 at 21:35
Category: None
Severity: 5 - Average
Resolution: Fixed
Assigned to: None
Status: Closed
Platform Version: None
Summary: java.text.AttributedString will throw a NPE at line 276
Original Submission: the field attribs is not initialized in the constructor
for AttributedString before it is dereferenced on line 276. As a result, a NPE
will always be thrown on line 276 if that line is executed.
I believe the quick fix is to initialize attribs to be an empty array. In other
works,
attribs = new AttributeRange[0];
A better solution would be to build up the collection of attributes as a list
and then convert it to an array.
This bug was found with our static analysis tool for finding bugs in Java
programs, FindBugs:
http://findbugs.sourceforge.net/
Follow-up Comments
------------------
-------------------------------------------------------
Date: Tue 08/17/2004 at 03:08 By: tromey
I'm checking in the fix for this.
For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=9949>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/