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

Bug 365174

Summary: [xtend] Throws: check for duplicates
Product: [Modeling] TMF Reporter: Moritz Eysholdt <moritz.eysholdt>
Component: XtextAssignee: Holger Schill <Holger.Schill>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: Holger.Schill, sebastian.zarnekow, sven.efftinge
Version: unspecifiedFlags: sven.efftinge: juno+
Target Milestone: M4   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Moritz Eysholdt CLA 2011-11-30 05:06:47 EST
Example:

---
class foo  {
	def bar() throws IOException, IOException, Exception {
	}
}
---

I'd expect IOException to get a validation error because of two reasons:
- It's declared twice
- Is a subtype of Exception, therefore declaring "Exception" alone should be sufficient.


However, for Java, the JDT flags neither of those issues.
Comment 1 Holger Schill CLA 2011-11-30 13:09:10 EST
pushed fix and tests to master
Comment 2 Sebastian Zarnekow CLA 2011-12-01 05:28:08 EST
It's ok to write something along those lines:

def doStuff() throws IOException, FileNotFoundException {
}
Comment 3 Holger Schill CLA 2011-12-01 05:35:23 EST
removed the validation for subtypes and corresponding tests. pushed to master
Comment 4 Karsten Thoms CLA 2017-09-19 17:41:04 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 5 Karsten Thoms CLA 2017-09-19 17:52:14 EDT
Closing all bugs that were set to RESOLVED before Neon.0