google-code-export / uimafit

Automatically exported from code.google.com/p/uimafit
2 stars 1 forks source link

Avoid throwing raw exceptions in non-test code #116

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Running PMD reveals that there are several cases where RuntimeException is 
thrown from within uimaFIT. A different, more specific kind of exception should 
be thrown, e.g. an IllegalStateException.

Cases:

- ConfigurationParameterInitializer.newCollection()
- ConfigurationParameterInitializer.ConstructorConverter.convert()
- ConfigurationParameterInitializer.EnumConverter.convert()

The change is binary backwards compatible, however, catch statements might need 
to be adapted. But it is extremely unlikely that these exceptions would be 
cached in user code.

Original issue reported on code.google.com by richard.eckart on 14 Apr 2012 at 12:08

GoogleCodeExporter commented 9 years ago
I agree that it's extremely unlikely that anyone was catching the 
RuntimeExceptions. And since it's backwards compatible, I'm all for this change.

Original comment by steven.b...@gmail.com on 14 Apr 2012 at 4:19

GoogleCodeExporter commented 9 years ago

Original comment by richard.eckart on 5 Jul 2012 at 4:02

GoogleCodeExporter commented 9 years ago

Original comment by richard.eckart on 7 Jan 2013 at 4:51

GoogleCodeExporter commented 9 years ago

Original comment by richard.eckart on 25 Aug 2013 at 8:19