You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Caused by: java.lang.NullPointerException
at com.fasterxml.jackson.core.JsonFactory.createParser(JsonFactory.java:889)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3005)
at com.google.cloud.tools.jib.json.JsonTemplateMapper.readJson(JsonTemplateMapper.java:118)
at com.google.cloud.tools.jib.json.JsonTemplateMapper.readJson (JsonTemplateMapper.java:118)
at com.google.cloud.tools.jib.registry.RegistryEndpointCaller.newRegistryErrorException (RegistryEndpointCaller.java:194)
The NPE is when there was an error communicating with the server. Jib tries to parse the content of the error message (supposed to be a JSON) from the server.
Turns out responseException.getContent() can return null if there was no content from the server. The reason I think NullAway couldn't catch this is that the return value of getContet() basically comes from a method in the Google HTTP Client library.
The text was updated successfully, but these errors were encountered:
A user reported an NPE on the Gitter channel.
The NPE is when there was an error communicating with the server. Jib tries to parse the content of the error message (supposed to be a JSON) from the server.
I noticed that if we pass a null string,
JsonTemplateMapper.readJson()
throws NPE with the same stacktrace.Turns out
responseException.getContent()
can return null if there was no content from the server. The reason I think NullAway couldn't catch this is that the return value ofgetContet()
basically comes from a method in the Google HTTP Client library.The text was updated successfully, but these errors were encountered: