Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Commit

Permalink
fix NPE caused by missing credentials
Browse files Browse the repository at this point in the history
This case was broken by the refactoring to allow User subclass
injection, since it checks the User object's class for
assignability. This check is now skipped if the value is null.
  • Loading branch information
tangiel committed Feb 16, 2017
1 parent 3d25a19 commit 8b4e6c7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ protected Object[] deserializeParams(JsonNode node) throws IOException, IllegalA
if (User.class.isAssignableFrom(clazz)) {
// User type parameter requires no Named annotation (ignored if present)
User user = getUser();
if (clazz.isAssignableFrom(user.getClass())) {
if (user == null || clazz.isAssignableFrom(user.getClass())) {
params[i] = user;
logger.log(Level.FINE, "deserialize: User injected into param[{0}]", i);
} else {
Expand Down

0 comments on commit 8b4e6c7

Please sign in to comment.