This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 29562 - SerialDataConvertor.SaveSupport.synchronizeName needs to check whether class is public
Summary: SerialDataConvertor.SaveSupport.synchronizeName needs to check whether class ...
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: rmatous
URL:
Keywords:
Depends on: 1937
Blocks:
  Show dependency tree
 
Reported: 2002-12-15 23:31 UTC by Jesse Glick
Modified: 2008-12-23 11:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Example stack trace from unit tests (2.00 KB, text/plain)
2002-12-15 23:33 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2002-12-15 23:31:54 UTC
This code:

Method getter;
try {
    try {
        getter =
inst.getClass().getMethod("getDisplayName", null);
    } catch (NoSuchMethodException me) {
        getter =
inst.getClass().getMethod("getName", null);
    }
} catch (Exception ex) { // do nothing
    return;
}
try {
    String name = (String) getter.invoke(inst, null);
    // ...

is not quite right. It needs to check also that
the declaring class of the method is public.
Compare BeanNode.initialize and .registerName, and
issue #1937.
Comment 1 Jesse Glick 2002-12-15 23:33:02 UTC
Created attachment 8342 [details]
Example stack trace from unit tests
Comment 2 Jesse Glick 2003-01-06 15:50:23 UTC
BTW there is no core/settings IZ subcomponent, would probably be
helpful...
Comment 3 Marian Mirilovic 2003-01-06 16:13:26 UTC
I have changed version from 4.0 dev to S1S 4.2 (Nevada).
Comment 4 Jan Pokorsky 2003-01-08 14:49:31 UTC
There is openide/settings subcomponent in IZ that has been shared also
by the settings module so far.
Comment 5 rmatous 2003-01-13 15:03:43 UTC
Fixed in trunk.
Added check if method getDisplayName or getName is accessible:
/cvs/core/src/org/netbeans/core/projects/SerialDataConvertor.java,v 
<--  SerialDataConvertor.java
new revision: 1.18; previous revision: 1.17

/cvs/core/settings/src/org/netbeans/modules/settings/SaveSupport.java,v
 <--  SaveSupport.java
new revision: 1.8; previous revision: 1.7
Comment 6 Marian Mirilovic 2005-07-15 07:42:48 UTC
closed