Re: Blessed modifier order does not include sealed/non-sealed

2024-01-02 Thread Joseph D. Darcy
Note that in terms of updating the implementation of toGenericString() JDK-8322878 to included sealed information, since strictfp is a no-op in the same release sealed/non-sealed was added, a class file can be     sealed XOR strictfp Therefore, Class.toGenericString() could print the

Re: Blessed modifier order does not include sealed/non-sealed

2024-01-02 Thread Joseph D. Darcy
Hello, Some time back, the java.lang.reflect package level docs had a brief discussion added concerning what exactly core reflection is modeling. [1]. tl;dr -- mostly a class file level view. As such, a contingent property of the design of JEP 409 is that sealed/non-sealed happens to _not_

Re: Blessed modifier order does not include sealed/non-sealed

2024-01-02 Thread Pavel Rappo
While we are here, I also note that the script does not explicitly take into account the `default` modifier on an interface method. However, after reading https://docs.oracle.com/javase/specs/jls/se21/html/jls-9.html#jls-9.4 it seems that whenever `default` appears, it should be alone one way

Re: Blessed modifier order does not include sealed/non-sealed

2024-01-02 Thread Remi Forax
- Original Message - > From: "Pavel Rappo" > To: "Roger Riggs" > Cc: "core-libs-dev" > Sent: Tuesday, January 2, 2024 5:31:06 PM > Subject: Re: Blessed modifier order does not include sealed/non-sealed > Hi Roger, > > Happy New Yea

Re: Blessed modifier order does not include sealed/non-sealed

2024-01-02 Thread Roger Riggs
Hi Pavel, I agree, the script should refer to the JLS. Some people look to the javadoc but its not authoritative on the language. Roger On 1/2/24 12:18 PM, Pavel Rappo wrote: Right, the language model (javax.lang.model) is a better target to refer to when considering _source_ files. However,

Re: Blessed modifier order does not include sealed/non-sealed

2024-01-02 Thread Pavel Rappo
Right, the language model (javax.lang.model) is a better target to refer to when considering _source_ files. However, java.lang.reflect.Modifier corresponds to a set returned by javax.lang.model.element.Element#getModifiers, not to a single instance of javax.lang.model.element.Modifier; the

Re: Blessed modifier order does not include sealed/non-sealed

2024-01-02 Thread Roger Riggs
Hi Pavel, It better to look to javax.lang.model.element.Modifier for the language view of the class. java.lang.reflect.Modifier covers the modifier flags as represented in the class

Re: Blessed modifier order does not include sealed/non-sealed

2024-01-02 Thread Pavel Rappo
Hi Roger, Happy New Year to you too! Although it's a _somewhat_ separate issue, I found that the shell script refers to java.lang.reflect.Modifier#toString which does NOT mention either `sealed` or `non-sealed`. More precisely, the script refers to the JDK 8 version of that method, but [the

Re: Blessed modifier order does not include sealed/non-sealed

2024-01-02 Thread Roger Riggs
Hi Pavel, yes, a PR would be next. Happy New Year, Roger On 1/2/24 7:08 AM, Pavel Rappo wrote: I assume the order for `sealed` and `non-sealed` has effectively been decided by JLS: https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.1.1 8.1.1. Class Modifiers ...

Re: Blessed modifier order does not include sealed/non-sealed

2024-01-02 Thread Remi Forax
- Original Message - > From: "Pavel Rappo" > To: "core-libs-dev" > Sent: Tuesday, January 2, 2024 12:56:08 PM > Subject: Blessed modifier order does not include sealed/non-sealed > I couldn't find any prior discussions on this matter. > > I n

Re: Blessed modifier order does not include sealed/non-sealed

2024-01-02 Thread Pavel Rappo
I assume the order for `sealed` and `non-sealed` has effectively been decided by JLS: https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.1.1 8.1.1. Class Modifiers ... ClassModifier: (one of) Annotation public protected private abstract static final

Blessed modifier order does not include sealed/non-sealed

2024-01-02 Thread Pavel Rappo
I couldn't find any prior discussions on this matter. I noticed that bin/blessed-modifier-order.sh has not been updated for the [recently introduced](https://openjdk.org/jeps/409) `sealed` and `non-sealed` keywords. I also note that we already have cases in OpenJDK where those keywords are