commit-classpath
[Top][All Lists]
Advanced

[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: anonymous
Subject: [commit-cp] [bugs #9949] java.text.AttributedString will throw a NPE at line 276
Date: Mon, 09 Aug 2004 17:39:32 -0400
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8

This mail is an automated notification from the bugs tracker
 of the project: classpath.




/**************************************************************************/
[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 17:35

Category:  None
Severity:  5 - Average
Resolution:  None
Assigned to:  None
Status:  Open
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/











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/







reply via email to

[Prev in Thread] Current Thread [Next in Thread]