On Sat, 5 Sep 2026 13:38:11 GMT, Marius Hanl <[email protected]> wrote:
>> modules/javafx.base/src/main/java/javafx/beans/property/ReadOnlyProperty.java
>> line 102:
>>
>>> 100: &&
>>> ReadOnlyProperty.class.isAssignableFrom(method.getReturnType())) {
>>> 101: return beanClass;
>>> 102: }
>>
>> I was still wondering if it might make sense to log a `warning` or just an
>> `info` that this is really is a fallback implementation and developers
>> should rather override this / set the declaring `Class` instead.
>>
>> All opinions welcome.
>
> On a similar note, when the reflection failed, it will always be retried,
> right? Since we return `null` and so the subclass will call this again the
> next time
I've added code that ensures the reflective discovery is only called once, and
a negative result is also cached.
I don't think that a log output is necessary, because a `null` result is a
legitimate result when the property isn't declared in a class.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2015#discussion_r3940928228