Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315771 - IResource.accept(...) wraps RuntimeException thrown in visitor and logs
Summary: IResource.accept(...) wraps RuntimeException thrown in visitor and logs
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Szymon Brandys CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-04 10:38 EDT by Dani Megert CLA
Modified: 2011-04-01 05:30 EDT (History)
1 user (show)

See Also:


Attachments
Fix v01 (1.13 KB, patch)
2011-03-29 11:31 EDT, Szymon Brandys CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2010-06-04 10:38:20 EDT
3.6 RC4.

The IResource.accept(...) methods are incorrectly implemented: they wrap runtime exceptions that are thrown inside the visitor. This is not specified and not expected.

In addition, the implementation thinks it should log this, which is also not expected.
Comment 1 Szymon Brandys CLA 2010-06-07 09:36:48 EDT
It seems that the RuntimeException catch clause in Resource#accept(IResourceProxyVisitor, int) line 79 can be removed now.
John, do you remember why we started to wrap all RuntimeExceptions in CoreExceptions in Resource.java ver. 1.58?
Comment 2 John Arthorne CLA 2010-06-07 10:26:12 EDT
Yes this should be fixed. We originally implemented short-circuit by throwing a RuntimeException which is why it was caught originally. The implementation was later changed to not use that technique but the catch clause wasn't fixed.
Comment 3 Szymon Brandys CLA 2011-03-29 11:31:27 EDT
Created attachment 192107 [details]
Fix v01
Comment 4 Szymon Brandys CLA 2011-03-29 11:32:30 EDT
Fixed.
Comment 5 Dani Megert CLA 2011-04-01 05:30:20 EDT
Verified in HEAD.