Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315771

Summary: IResource.accept(...) wraps RuntimeException thrown in visitor and logs
Product: [Eclipse Project] Platform Reporter: Dani Megert <daniel_megert>
Component: ResourcesAssignee: Szymon Brandys <Szymon.Brandys>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: john.arthorne
Version: 3.6   
Target Milestone: 3.7 M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Fix v01 none

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.