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

Bug 365320

Summary: [Xbase] Cachingstrategy in XbaseTypeProvider fails in computing thrown exceptions
Product: [Modeling] TMF Reporter: Holger Schill <Holger.Schill>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: sven.efftinge
Version: 2.2.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Holger Schill CLA 2011-12-01 09:55:45 EST
class foo {

    def bar() throws NullPointerException {}

    def fuzz() {
        throw Exception
    }

    def baz() {
        new File("test.txt").canonicalFile
    }

}

Calling typeprovider.getThrownExceptionTypes( XtendFunction bar) will compute the throw NullpointerException right and for the body of fuzz also but:
typeprovider.getThrownExceptionTypes( Body of baz) will end up with an empty list

This issue is cause by the Cachingstrategy in the XbaseTypeProvider.
Comment 1 Sven Efftinge CLA 2011-12-01 10:02:50 EST

*** This bug has been marked as a duplicate of bug 365109 ***