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 31254 - SourceException is not properly annotated
Summary: SourceException is not properly annotated
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: REGRESSION, UI
Depends on:
Blocks: 30947
  Show dependency tree
 
Reported: 2003-02-20 12:21 UTC by Jan Becicka
Modified: 2008-12-22 22:50 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch for r35 (basically the important missing pieces of #30947's trunk fix) (6.06 KB, patch)
2003-04-09 16:39 UTC, Jesse Glick
Details | Diff
Binary patch - save as $nbhome/lib/patches/31254.jar (16.00 KB, application/octet-stream)
2003-04-09 16:40 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Becicka 2003-02-20 12:21:59 UTC
[200302190100]
Select any method and do copy/paste into the same class.
SourceException is thrown - it is correct, but the user is 
warned using "Unexpected Exception" dialog.
Comment 1 Svata Dedic 2003-02-26 14:32:45 UTC
This seems as an ErrorManager's issue to me. Please fix or advise what
I am doing wrong:
- I receive a SourceException (annotated with ErrorManager.USER severity)
- another code catches this one and produces IOException, which is
annotated by the original SourceException and again ErrorManager.USER
severity
- the code then throws the IOException.

=> Unexpected Exception dialog is displayed.
Comment 2 Jan Lahoda 2003-03-06 13:50:07 UTC
ErrorManager -> dstrupl (?)
Comment 3 David Strupl 2003-03-06 14:54:45 UTC

*** This issue has been marked as a duplicate of 30947 ***
Comment 4 Jesse Glick 2003-04-09 16:36:02 UTC
Not fixed in 3.5.
Comment 5 Jesse Glick 2003-04-09 16:37:48 UTC
Was fixed already in trunk, just not in 3.5. Trunk got a full fix for
issue #30947, whereas 3.5 got a smaller fix that only addressed
certain problems.
Comment 6 Jesse Glick 2003-04-09 16:39:40 UTC
Created attachment 9816 [details]
Patch for r35 (basically the important missing pieces of #30947's trunk fix)
Comment 7 Jesse Glick 2003-04-09 16:40:29 UTC
Created attachment 9817 [details]
Binary patch - save as $nbhome/lib/patches/31254.jar
Comment 8 Jesse Glick 2003-04-09 16:41:39 UTC
If you think this needs to be in 3.5, pls. make P1 accordingly.

Note that the patch itself has already been in the trunk for a while
and works fine as far as I know.
Comment 9 Jan Becicka 2003-04-10 08:31:20 UTC
I tested the patch and it works. But I thought it could fix issue
26419 too, but it didn't. Jesse, could you take a look at it? These
two issues should be solved together I think. Thanks.
Comment 10 Jan Becicka 2003-04-10 11:26:25 UTC
It is regression. Should be fixed for 3.5. Thanks
Comment 11 Jesse Glick 2003-04-10 15:38:32 UTC
Yarda, maybe you could review the source patch if you have a moment? I
don't know who besides me is closest to ErrorManager code - David
Strupl perhaps.
Comment 12 Jaroslav Tulach 2003-04-11 15:31:59 UTC
I have read the test and I think that it is sane - at least we have a
documented behaviour for ErrorManager.annotate.

One problem is in the last part of the test where checking for "loc
msg" seems useless as both exception and also the localized text use
this string. Did you not want to use different strings? Probably yes,
I suggest to use three different strings.

If the test is changed and still passes there is not reason that I can
see why not apply for 3.5.

Comment 13 Jesse Glick 2003-04-11 17:16:29 UTC
"One problem is in the last part of the test where checking for "loc
msg" seems useless as both exception and also the localized text use
this string. Did you not want to use different strings? Probably yes,
I suggest to use three different strings." - actually the
second-to-last section of the test does just that, and passes. I only
added the last block - in r35 only, not in trunk - to make sure that
this particular issue was solved. SourceException uses the same detail
message as the loc annotation, and I wanted to keep as close to the
same behavior in the test as possible. Actually I will probably merge
that last block to the trunk as the assertTrue(isLocalized()) is
important - message == localizedMessage yet there is a localized
annotation, which happens sometimes.
Comment 14 _ ttran 2003-04-11 17:35:18 UTC
approved for 3.5
Comment 15 Jesse Glick 2003-04-11 17:48:23 UTC
committed   * Up-To-Date  1.49.2.2   
core/src/org/netbeans/core/NbErrorManager.java
committed   * Up-To-Date  1.2.2.1    
core/test/unit/src/org/netbeans/core/NbErrorManagerTest.java
Comment 16 Jan Becicka 2003-05-05 11:06:44 UTC
Verified