On Thu, 8 Dec 2022 14:21:45 GMT, John Hendrikx <jhendr...@openjdk.org> 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.
>
> John Hendrikx has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Revert renames in Disposer

I see that you moved the generic type declarations from the inner classes to 
the outer ones. I wasn't getting any raw type warnings on these. What requires 
these?

modules/javafx.base/src/main/java/com/sun/javafx/property/adapter/PropertyDescriptor.java
 line 177:

> 175:             if (bean.equals(propertyChangeEvent.getSource()) && 
> name.equals(propertyChangeEvent.getPropertyName())) {
> 176:                 final ReadOnlyJavaBeanProperty<T> property = checkRef();
> 177:                 if ((property instanceof Property) && 
> (((Property<?>)property).isBound()) && !updating) {

This line can be

if ((property instanceof Property<?> prop) && prop.isBound() && !updating) {

with perhaps better naming.

modules/javafx.base/src/main/java/javafx/beans/property/ReadOnlyListProperty.java
 line 119:

> 117: 
> 118:         @SuppressWarnings("unchecked")
> 119:         final List<E> list = (List<E>)obj;  // safe cast as elements are 
> only referenced

I'm not sure why it's safe to cast to a `List<E>`. You're getting a `List`, but 
it could be a list of something else. In the `Map` and `Set`  variants there is 
a try-catch for casting exceptions.

-------------

PR: https://git.openjdk.org/jfx/pull/969

Reply via email to