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
When I just tested it, the CertstreamCertificatePOJODeserializer threw a StackOverflow error.
Stacktrace:
Exception in thread "WebSocketConnectReadThread-18" java.lang.StackOverflowError at com.google.gson.internal.bind.JsonTreeReader.nextString(JsonTreeReader.java:178) at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:702) at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:723) at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:698) at com.google.gson.internal.Streams.parse(Streams.java:48) at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:65) at com.google.gson.Gson.fromJson(Gson.java:932) at com.google.gson.Gson.fromJson(Gson.java:1003) at com.google.gson.internal.bind.TreeTypeAdapter$GsonContextImpl.deserialize(TreeTypeAdapter.java:162) at io.calidog.certstream.CertStreamCertificatePOJODeserializer.deserialize(CertStreamCertificatePOJODeserializer.java:58) at io.calidog.certstream.CertStreamCertificatePOJODeserializer.deserialize(CertStreamCertificatePOJODeserializer.java:8) at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69) at com.google.gson.Gson.fromJson(Gson.java:932) at com.google.gson.Gson.fromJson(Gson.java:1003)
When reaching this line (56) CertStreamCertificatePOJO retVal = jsonDeserializationContext.deserialize(jsonElement, type);
the deserialize() method is called again, which results in never executing the return retVal line (60) until the StackOverflowError is thrown.
This is from the JsonDeserializationContext doc for the deserialize() method:
Invokes default deserialization on the specified object. It should never be invoked on the element received as a parameter of the deserialize(JsonElement, Type, JsonDeserializationContext) method. Doing so will result in an infinite loop since Gson will in-turn call the custom deserializer again
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
intended to fix #7