diff --git a/endpoints-framework/src/main/java/com/google/api/server/spi/request/ServletRequestParamReader.java b/endpoints-framework/src/main/java/com/google/api/server/spi/request/ServletRequestParamReader.java index 46106c03..534c96c5 100644 --- a/endpoints-framework/src/main/java/com/google/api/server/spi/request/ServletRequestParamReader.java +++ b/endpoints-framework/src/main/java/com/google/api/server/spi/request/ServletRequestParamReader.java @@ -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 {