Github user jochenw commented on the pull request:
https://github.com/apache/commons-lang/pull/98#issuecomment-116249718
I'd suggest the following:
- Fix missing license headers.
- Add a second method, which works like Throwables.propagate (returning, or
throwing, a RuntimeException)
- Add documentation, which compares both methods and lists reasons, why one
would prefer either over the other (this part being the most important.
- Change the tests in a manner, that demonstrates that we can control not
only the Exception class to be thrown, but the instance as well. Roughly like
this:
OutOfMemoryError ooe = new OutOfMemoryError();
Throwable th = null;
try {
Throwables.propagate(ooe);
Assert.fail("Expected exception");
} catch (OutOfMemory e) {
th = e;
}
assertSame(ooe, th);
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---