RFR: 8071693: Introspector ignores default interface methods [v2]

Alexey Ivanov aivanov at openjdk.org
Fri Apr 21 18:25:45 UTC 2023


On Thu, 20 Apr 2023 13:47:25 GMT, Archie L. Cobbs <duke at openjdk.org> wrote:

>> src/java.desktop/share/classes/com/sun/beans/introspect/MethodInfo.java line 112:
>> 
>>> 110:                     if ((method.getModifiers() & Modifier.ABSTRACT) == 0)
>>> 111:                         (list = createIfNeeded(list)).add(method);
>>> 112:                 }
>> 
>> Please always use braces even if the body has only one statement.
>
> OK, I'll fix. I've seen examples of both styles in the JDK so am never really sure.

In client libs, we tend to use the braces all the time.

By this comment, I meant adding braces to all the statements where you omitted them, including the test.

If you look through `MethodInfo.java` class, you see that braces are used consistently even if the body has only one statement.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13544#discussion_r1174054770



More information about the client-libs-dev mailing list