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 34997 - a few editors return poor message on illegal values
Summary: a few editors return poor message on illegal values
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: _ tboudreau
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2003-07-18 14:34 UTC by Marian Mirilovic
Modified: 2008-12-22 23:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
class with all type of properties (9.26 KB, text/plain)
2003-07-21 13:38 UTC, Marian Mirilovic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Mirilovic 2003-07-18 14:34:56 UTC
[nb_dev](20030718), [jdk1.4.2](03)

Steps to reproduce:
- run IDE
- try to set vvalue of the properties type:
    int, Integer, long, Long, float, Float, byte,
Byte, ...

-> NumberFormatException rises, but it should be
annotated IllegalArgumentException or something
like this (it works fine in nb 3.5)
Comment 1 _ tboudreau 2003-07-18 15:39:53 UTC
I've committed a patch to WrappersEditor which checks for
the wrapped editor's classname starting with "sun" and if so,
uses generic annotation.  That will fix the primitive ones like
Long (I hope).

That fixes any remaining wrapped editors.  For the rest, if you
see a problem, press CTRL-SHIFT-HOME to display the name of the
editor (and don't be fooled by a bunch of org.openide ones the
form module copied and uses).
Comment 2 _ tboudreau 2003-07-18 19:51:18 UTC
After my patch, I can't find any editors that still throw
wierd values (although you're the one with the killer node,
Marian!).  Closing the issue - all the core/openide editors
should now annotate correctly.  Reopen if I missed something.

Comment 3 Marian Mirilovic 2003-07-21 13:36:26 UTC
No, it still doen't work as expected, I am going to attach that node
to this issue.
Comment 4 Marian Mirilovic 2003-07-21 13:38:21 UTC
Created attachment 11044 [details]
class with all type of properties
Comment 5 _ tboudreau 2003-08-11 12:30:12 UTC
Fixed in trunk - fixed remaining missing annotation (in 
DataFolderEditor) and added special handling for 
NumberFormatExceptions from the JDK editors.

sh-2.05$ cvs commit
openide/src/org/openide/explorer/propertysheet/Bundle.properties
openide/src/org/openide/explorer/propertysheet/PropUtils.java
core/src/org/netbeans/beaninfo/editors            
cvs commit: Examining core/src/org/netbeans/beaninfo/editors
cvs commit: Examining core/src/org/netbeans/beaninfo/editors/resources
Checking in
openide/src/org/openide/explorer/propertysheet/Bundle.properties;
/cvs/openide/src/org/openide/explorer/propertysheet/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.32; previous revision: 1.31
done
Checking in openide/src/org/openide/explorer/propertysheet/PropUtils.java;
/cvs/openide/src/org/openide/explorer/propertysheet/PropUtils.java,v 
<--  PropUtils.java
new revision: 1.6; previous revision: 1.5
done
Processing log script arguments...
More commits to come...
Checking in core/src/org/netbeans/beaninfo/editors/Bundle.properties;
/cvs/core/src/org/netbeans/beaninfo/editors/Bundle.properties,v  <-- 
Bundle.properties
new revision: 1.63; previous revision: 1.62
done
Checking in core/src/org/netbeans/beaninfo/editors/DataFolderEditor.java;
/cvs/core/src/org/netbeans/beaninfo/editors/DataFolderEditor.java,v 
<--  DataFolderEditor.java
new revision: 1.8; previous revision: 1.7
done
Processing log script arguments...
Mailing the commit message to cvs@core.netbeans.org,
cvs@openide.netbeans.org (from tboudreau@netbeans.org)
sh-2.05$ 
Comment 6 Marian Mirilovic 2003-12-15 13:57:48 UTC
verified in [nb_dev](200312141900)