[foreign-memaccess+abi] RFR: 8310659: The jar tool should support allowing access to restricted methods from executable jars
Jorn Vernee
jvernee at openjdk.org
Tue Jun 27 13:21:23 UTC 2023
On Tue, 27 Jun 2023 00:19:26 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> > Question: right now I've implemented this to check if the attribute value is exactly `true`, otherwise it is ignored. Should we only allow `true` or `false`, and throw an error on other values?
>
> This document: https://docs.oracle.com/en/java/javase/20/docs/specs/jar/jar.html
>
> Seems to point out to other attributes that can be boolean. For each it says that "true" and "false" are the possible values (which makes me think other values aren't possible), and that the case doesn't matter.
>
> Perhaps we should just follow what the code for parsing these boolean standard attributes (`Java-Bean` and `sealed`) does.
I can't find the `Java-Bean` attribute in the source code. Maybe it's been removed.
The `Sealed` attribute seems to be tolerant to values outside of true/false, e.g. https://github.com/openjdk/jdk/blob/05e9c41eddf8961d1384c88ccedf993d86822a6b/src/java.base/share/classes/java/net/URLClassLoader.java#L611 & https://github.com/openjdk/jdk/blob/05e9c41eddf8961d1384c88ccedf993d86822a6b/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java#L998
-------------
PR Comment: https://git.openjdk.org/panama-foreign/pull/843#issuecomment-1609490844
More information about the panama-dev
mailing list