[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commit-cp] [bugs #10539] java.beans.ExplicitBeanInfo bad array index
From: |
Michael Koch |
Subject: |
[commit-cp] [bugs #10539] java.beans.ExplicitBeanInfo bad array index |
Date: |
Wed, 13 Oct 2004 09:33:02 -0400 |
User-agent: |
Mozilla/5.0 (compatible; Konqueror/3.2; Linux) (KHTML, like Gecko) |
This mail is an automated notification from the bugs tracker
of the project: classpath.
/**************************************************************************/
[bugs #10539] Latest Modifications:
Changes by:
Michael Koch <address@hidden>
'Date:
Mit 13.10.2004 at 13:25 (GMT)
What | Removed | Added
---------------------------------------------------------------------------
Resolution | None | Fixed
Status | Open | Closed
------------------ Additional Follow-up Comments ----------------------------
I just commited a patch to GNU classpath CVS to fix little
bug. Thanks for reporting.
/**************************************************************************/
[bugs #10539] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=10539>
Project: classpath
Submitted by: Matthew Chadwick
On: Don 30.09.2004 at 16:24
Category: None
Severity: 5 - Average
Resolution: Fixed
Privacy: Public
Assigned to: None
Status: Closed
Platform Version: Windows XP
Summary: java.beans.ExplicitBeanInfo bad array index
Original Submission: The getIcon() method of ExplicitBeanInfo indexes its
icons array using the icon type values. The icon types (defined in BeanInfo)
range from 1 to 4, not from 0 to 3. Either the wrong icon is retrieved, or in
the case of 4, an ArrayIndexOutOfBoundsException is thrown.
Test Snippet:
public void testShouldNotHaveIcon() throws Exception
{
BeanInfo simpleBeanInfo = Introspector.getBeanInfo(Object.class);
assertEquals(null,
simpleBeanInfo.getIcon(java.beans.BeanInfo.ICON_MONO_32x32));
}
Original:
public java.awt.Image getIcon(int iconType) {
return icons != null ? icons[iconType] : null;
}
Recommended Fix:
public java.awt.Image getIcon(int iconType) {
return icons != null ? icons[iconType-1] : null;
}
Follow-up Comments
------------------
-------------------------------------------------------
Date: Mit 13.10.2004 at 13:25 By: Michael Koch <mkoch>
I just commited a patch to GNU classpath CVS to fix little
bug. Thanks for reporting.
For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=10539>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [commit-cp] [bugs #10539] java.beans.ExplicitBeanInfo bad array index,
Michael Koch <=