Handle (no) result of null methods

This commit is contained in:
Eric Bottard
2015-12-27 18:08:52 +01:00
parent ff68779937
commit f5c990468b

View File

@@ -38,7 +38,10 @@ public class ResultHandlers {
@SuppressWarnings("unchecked")
public void handleResult(Object result) {
Class<?> clazz = result == null ? null : result.getClass();
if (result == null) { // void methods
return;
}
Class<?> clazz = result.getClass();
ResultHandler handler = getResultHandler(clazz);
handler.handleResult(result);
}