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
In sample I just picked Class as you can't add it to TreeSet which is where things fails within aot.
Caused by: java.lang.ClassCastException: class java.lang.Class cannot be cast to class java.lang.Comparable (java.lang.Class and java.lang.Comparable are in module java.base of loader 'bootstrap')
at java.base/java.util.TreeMap.compare(TreeMap.java:1569)
at java.base/java.util.TreeMap.addEntryToEmptyMap(TreeMap.java:776)
at java.base/java.util.TreeMap.put(TreeMap.java:785)
at java.base/java.util.TreeMap.put(TreeMap.java:534)
at java.base/java.util.TreeSet.add(TreeSet.java:255)
at java.base/java.util.AbstractCollection.addAll(AbstractCollection.java:336)
at java.base/java.util.TreeSet.addAll(TreeSet.java:309)
at java.base/java.util.TreeSet.<init>(TreeSet.java:160)
at org.springframework.beans.factory.aot.BeanDefinitionPropertyValueCodeGenerator$SetDelegate.orderForCodeConsistency(BeanDefinitionPropertyValueCodeGenerator.java:456)
The text was updated successfully, but these errors were encountered:
Creating a bean definition manually and having
Set
containing types(LikeClass
) which doesn't implementComparable
fails in aot processing.Sample code https://github.com/jvalkeal/spring-aot-issue-1
In sample I just picked
Class
as you can't add it toTreeSet
which is where things fails within aot.The text was updated successfully, but these errors were encountered: