Add get(:Object: fieldName:String) and get(:Object, :Field) methods to ObjectUtils.

Add overloaded doOperationSafely(:ExceptionThrowingOperation, :Function<Throwable, T>) method.
This commit is contained in:
John Blum
2018-09-19 13:14:27 -07:00
parent bcc763bc16
commit f1c9e3ea3c
2 changed files with 46 additions and 4 deletions

View File

@@ -46,7 +46,7 @@ public class ObjectUtilsUnitTests {
public void doOperationSafelyThrowsIllegalStateException() {
try {
ObjectUtils.doOperationSafely(() -> { throw newRuntimeException("test"); }, null);
ObjectUtils.doOperationSafely(() -> { throw newRuntimeException("test"); }, (Object) null);
}
catch (IllegalStateException expected) {