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 24820 - Use of ErrorEvent is incorrect
Summary: Use of ErrorEvent is incorrect
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-14 22:19 UTC by Rochelle Raccah
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rochelle Raccah 2002-06-14 22:19:57 UTC
I've had an offline discussion with Jesse on the
use of ErrorEvent in the book drafts:

>>>- p.4, 5: Why is last arg of ErrorEvent ""
instead of null?
>>Javadoc does not say it may be null, so it
cannot be null.
> Well, I use it that way in my module based on
some advice 
> on the newsgroup a long time ago from Ales
Novak.  So, 
> either the javadoc (and this example) should be
updated or 
> my code (and whatever example Ales had probably
in 
> openide and core) should be updated.

Probably the latter. Note that as far as I know,
passing null is 
harmless. But if it winds up throwing an NPE
somewhere, that's your problem. Permitting it to
accept null in the constructor (i.e. changing
Javadoc) is technically incompatible because that
would imply the getReferenceText() method could
now return null, and existing clients may not
check for it. I don't see any particular need to
let it accept  null, other than that stylistically
that would be more natural.

So, as as result, I've done a search and found
this used in:
java/src/org/netbeans/modules/java/BogusCompiler.java
java/src/org/netbeans/modules/java/CleanCompilerGroup.java
java/src/org/netbeans/modules/java/CleanCompiler.java
java/src/org/netbeans/modules/java/JExternalCompilerGroup.java
Comment 1 Tomas Hurka 2002-06-25 17:28:21 UTC
Thanks Rochelle for finding incorrect usage of ErrorEvent.
Fixed in trunk.
Comment 2 Jan Becicka 2002-10-15 11:53:04 UTC
Closed