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
Thank you very much for creating and maintaining this fantastic library!
I am getting a stack overflow error in some cases when using the @CompiledJson annotation.
Error:
...
Caused by: java.lang.StackOverflowError
at java.base/java.lang.String.valueOf(String.java:2951)
at java.base/java.lang.StringBuilder.append(StringBuilder.java:168)
at jdk.compiler/com.sun.tools.javac.util.List.toString(List.java:326)
at jdk.compiler/com.sun.tools.javac.util.List.toString(List.java:339)
at jdk.compiler/com.sun.tools.javac.code.Type$ClassType.toString(Type.java:1027)
at com.dslplatform.json.processor.AttributeInfo.createTypeSignature(AttributeInfo.java:179)
at com.dslplatform.json.processor.AttributeInfo.createTypeSignature(AttributeInfo.java:203)
at com.dslplatform.json.processor.AttributeInfo.createTypeSignature(AttributeInfo.java:188)
at com.dslplatform.json.processor.AttributeInfo.createTypeSignature(AttributeInfo.java:203)
at com.dslplatform.json.processor.AttributeInfo.createTypeSignature(AttributeInfo.java:188)
at com.dslplatform.json.processor.AttributeInfo.createTypeSignature(AttributeInfo.java:203)
at com.dslplatform.json.processor.AttributeInfo.createTypeSignature(AttributeInfo.java:188)
at com.dslplatform.json.processor.AttributeInfo.createTypeSignature(AttributeInfo.java:203)
at com.dslplatform.json.processor.AttributeInfo.createTypeSignature(AttributeInfo.java:188)
at com.dslplatform.json.processor.AttributeInfo.createTypeSignature(AttributeInfo.java:203)
at com.dslplatform.json.processor.AttributeInfo.createTypeSignature(AttributeInfo.java:188)
at com.dslplatform.json.processor.AttributeInfo.createTypeSignature(AttributeInfo.java:203)
...
We are using Java 11 and the minimal repro for this is:
package foo;
import com.dslplatform.json.CompiledJson;
@CompiledJson
public class GenericClass<T> implements Comparable<GenericClass<T>> {
final T genericField;
public GenericClass(T genericField) {
this.genericField = genericField;
}
public final T getGenericField() {
return genericField;
}
@Override
public int compareTo(GenericClass<T> other) {
return 1;
}
}
Any help with this would be appreciated!
The text was updated successfully, but these errors were encountered:
I've pushed a fix on master. It seems only bound generics were supported more extensively.
I added basic support for unbounded ones so your case will now work, but there is significant more work to fully wrap the generics support.
Hi,
Thank you very much for creating and maintaining this fantastic library!
I am getting a stack overflow error in some cases when using the
@CompiledJson
annotation.Error:
We are using Java 11 and the minimal repro for this is:
Any help with this would be appreciated!
The text was updated successfully, but these errors were encountered: