Commit 0917016f authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Fix a regression in parsing descriptors.

parent 1ac25469
# Changes in version 1.9.0 - 2017-06-??
# Changes in version 1.8.2 - 2017-06-16
* Medium changes
- Fix a regression where any DescriptorParseException thrown while
parsing a descriptor is encapsulated and rethrown as
RuntimeException.
# Changes in version 1.8.1 - 2017-06-08
......
......@@ -195,9 +195,15 @@ public class DescriptorParserImpl implements DescriptorParser {
try {
return constructor.newInstance(rawDescriptorBytes,
offsetAndLength, failUnrecognizedDescriptorLines);
} catch (InstantiationException | IllegalAccessException
| InvocationTargetException e) {
throw new RuntimeException();
} catch (InvocationTargetException e) {
if (null != e.getCause()
&& e.getCause() instanceof DescriptorParseException) {
throw (DescriptorParseException) e.getCause();
} else {
throw new RuntimeException(e);
}
} catch (InstantiationException | IllegalAccessException e) {
throw new RuntimeException(e);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment