Ensure that unannotated known class types are singletons#589
Ensure that unannotated known class types are singletons#589Ladicek merged 1 commit intosmallrye:mainfrom
Conversation
|
I've noticed this commit in the previous PR and didn't pay much attention, but I'd like to ask here: what issue does this fix? The PR looks reasonable, but still. |
|
I've seen the same So I went ahead and added the "forceful" indirection via |
|
This seemed much easier than an instance-equals at the call sites. |
|
Ah so accidental discovery. OK, I think this makes sense; |
|
Or see it as a micro-heap-pressure-optimization ;) |
In particular, this commit prevents "changing" an unbounded wildcard `?` to `? extends java.lang.Object`. This was caused by a new `ClassType` instance being created for `java.lang.Object`, instead of reusing the singleton instance.
c4b3848 to
31acf5a
Compare
java.lang-special ClassTypes are singletons
In particular, this commit prevents "changing" an unbounded wildcard
?to? extends java.lang.Object. This was caused by a newClassTypeinstance being created forjava.lang.Object, instead of reusing the singleton instance.