On Wed, 7 Dec 2022 13:25:47 GMT, Kevin Rushforth <[email protected]> wrote:
>> - Added generics (to package private or internal classes only)
>> - Minor clean-ups of code I touched (naming)
>> - Fixed incorrect use of generics
>> - Fixed raw type warnings
>>
>> Note: some raw types have leaked into public API. These could be fixed
>> without incompatibilities. For specifics see
>> `JavaBeanObjectPropertyBuilder`. The javadoc would have the method
>> signatures change (`<T>` would be appended to the affected methods). For
>> now I've added a TODO there.
>
> modules/javafx.base/src/main/java/com/sun/javafx/property/adapter/Disposer.java
> line 47:
>
>> 45: public class Disposer implements Runnable {
>> 46: private static final ReferenceQueue<Object> QUEUE = new
>> ReferenceQueue<>();
>> 47: private static final Map<Reference<?>, Runnable> RECORDS = new
>> ConcurrentHashMap<>();
>
> I don't really care for the suggestion that most IDEs seem to offer of naming
> `static final` objects (as opposed to primitive types) using all caps. This
> should be left up to the developer, and in this case I think the existing
> names are fine and don't need to be changed. I note that this code was
> borrowed from Java2D where a similar fix was done to add the generics, but
> the names were left unchanged.
I only use all-uppercase if the collection itself is immutable. Here, the
collections/wrapper are mutable, so I wouldn't change the names either. A
matter of style.
-------------
PR: https://git.openjdk.org/jfx/pull/969