Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365174 - [xtend] Throws: check for duplicates
Summary: [xtend] Throws: check for duplicates
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P3 major (vote)
Target Milestone: M4   Edit
Assignee: Holger Schill CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-30 05:06 EST by Moritz Eysholdt CLA
Modified: 2017-09-19 17:52 EDT (History)
3 users (show)

See Also:
sven.efftinge: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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