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

Bug 365165

Summary: [xtend] static method usage not generating try-catch-sneakyThrow
Product: [Modeling] TMF Reporter: McKinley <mckinley1411>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jan
Version: 2.2.0Flags: jan: juno+
Target Milestone: M5   
Hardware: All   
OS: All   
Whiteboard:

Description McKinley CLA 2011-11-30 03:02:57 EST
Build Identifier: 

Static method with the follow signature does not get wrapped in a try-catch-sneakThrow when used in a local method:

public static String toString(final HttpEntity entity) throws IOException, ParseException {...}

ParseException extends RuntimeException

The following signature works fine:

public static void consume(final HttpEntity entity) throws IOException {...}

Reproducible: Always

Steps to Reproduce:
// Does not generate try-catch-sneakyThrow
def consumeToString(HttpEntity entity) {
    return EntityUtils::toString(entity)
}

// Does generate try-catch-sneakyThrow
def consume(HttpEntity entity) {
    EntityUtils::consume(entity)
}
Comment 1 Jan Koehnlein CLA 2012-01-17 12:59:32 EST
Could not reproduce with HEAD revision. 
But it looks pretty much like bug 365165 which has been fixed in the meantime.
Comment 2 Karsten Thoms CLA 2017-09-19 17:38:22 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:49:34 EDT
Closing all bugs that were set to RESOLVED before Neon.0