Re: RFR: 8308753: Class-File API transition to Preview [v3]

2023-10-03 Thread Adam Sotona
On Mon, 2 Oct 2023 13:46:53 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed javadoc typo > > src/java.base/share/classes/java/lang/classfile/instructi

Re: RFR: 8308753: Class-File API transition to Preview [v9]

2023-10-03 Thread Adam Sotona
le API is based on the > internal version of the library from the JDK master branch, and there are no > API features added. > > Please review this pull request to help the Classfile API turn into a preview. > > Any comments are welcome. > > Thanks, > Adam Adam Sotona ha

Re: RFR: 8308753: Class-File API transition to Preview [v3]

2023-10-03 Thread Adam Sotona
On Mon, 2 Oct 2023 13:38:18 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed javadoc typo > > src/java.base/share/classes/java/lang/classfile/attribut

Re: RFR: 8308753: Class-File API transition to Preview [v8]

2023-10-03 Thread Adam Sotona
le API is based on the > internal version of the library from the JDK master branch, and there are no > API features added. > > Please review this pull request to help the Classfile API turn into a preview. > > Any comments are welcome. > > Thanks, > Adam Adam Sotona ha

Re: RFR: 8308753: Class-File API transition to Preview [v3]

2023-10-02 Thread Adam Sotona
On Mon, 2 Oct 2023 14:45:52 GMT, Maurizio Cimadamore wrote: >> test/langtools/tools/javac/7166455/CheckACC_STRICTFlagOnclinitTest.java line >> 107: >> >>> 105: } >>> 106: >>> 107: // this version of the code can be used when ClassFile API in not in a >>> preview >> >> Do you want to

Re: RFR: 8308753: Class-File API transition to Preview [v3]

2023-10-02 Thread Adam Sotona
On Mon, 2 Oct 2023 14:56:11 GMT, Maurizio Cimadamore wrote: >> test/langtools/tools/javac/classfiles/attributes/SourceFile/SourceFileTestBase_legacy.java >> line 45: >> >>> 43: * @see #compileAndTest >>> 44: */ >>> 45: public class SourceFileTestBase_legacy extends TestBase { >> >> Why is

Re: RFR: 8308753: Class-File API transition to Preview [v3]

2023-10-02 Thread Adam Sotona
On Mon, 2 Oct 2023 13:40:40 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed javadoc typo > > src/java.base/share/classes/java/lang/classfile/components

Re: RFR: 8308753: Class-File API transition to Preview [v7]

2023-10-02 Thread Adam Sotona
le API is based on the > internal version of the library from the JDK master branch, and there are no > API features added. > > Please review this pull request to help the Classfile API turn into a preview. > > Any comments are welcome. > > Thanks, > Adam Adam Sotona ha

Re: RFR: 8308753: Class-File API transition to Preview [v6]

2023-10-02 Thread Adam Sotona
le API is based on the > internal version of the library from the JDK master branch, and there are no > API features added. > > Please review this pull request to help the Classfile API turn into a preview. > > Any comments are welcome. > > Thanks, > Adam Adam Sotona has update

Re: RFR: 8308753: Class-File API transition to Preview [v5]

2023-10-02 Thread Adam Sotona
le API is based on the > internal version of the library from the JDK master branch, and there are no > API features added. > > Please review this pull request to help the Classfile API turn into a preview. > > Any comments are welcome. > > Thanks, > Adam Adam Sotona has updat

Re: RFR: 8308753: Class-File API transition to Preview [v3]

2023-10-02 Thread Adam Sotona
On Mon, 2 Oct 2023 13:26:38 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed javadoc typo > > src/java.base/share/classes/java/lang/classfile/CodeTra

Re: RFR: 8308753: Class-File API transition to Preview [v3]

2023-10-02 Thread Adam Sotona
On Mon, 2 Oct 2023 13:29:59 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/classfile/FieldTransform.java line 116: >> >>> 114: >>> 115: /** >>> 116: * @implSpec The default implementation returns a resolved >>> transform with all >> >> Perhaps lose the

Re: RFR: 8308753: Class-File API transition to Preview [v4]

2023-10-02 Thread Adam Sotona
le API is based on the > internal version of the library from the JDK master branch, and there are no > API features added. > > Please review this pull request to help the Classfile API turn into a preview. > > Any comments are welcome. > > Thanks, > Adam Adam Sotona has up

Re: RFR: 8308753: Class-File API transition to Preview [v3]

2023-10-02 Thread Adam Sotona
On Mon, 2 Oct 2023 13:23:00 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/classfile/ClassTransform.java line 164: >> >>> 162: >>> 163: /** >>> 164: * @implSpec >> >> Should these overridden method have `@inheritDoc` ? If not, their javadoc >> won't show

Re: RFR: 8308753: Class-File API transition to Preview [v3]

2023-10-02 Thread Adam Sotona
On Mon, 2 Oct 2023 13:24:49 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed javadoc typo > > src/java.base/share/classes/java/lang/classfile/CodeBu

Re: RFR: 8308753: Class-File API transition to Preview [v2]

2023-10-02 Thread Adam Sotona
On Fri, 29 Sep 2023 23:00:44 GMT, Vicente Romero wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> PreviewFeature annotated with JEP 457 > > make/jdk/src/classes/build/tools/module/Gen

Re: RFR: 8308753: Class-File API transition to Preview [v3]

2023-10-02 Thread Adam Sotona
le API is based on the > internal version of the library from the JDK master branch, and there are no > API features added. > > Please review this pull request to help the Classfile API turn into a preview. > > Any comments are welcome. > > Thanks, > Adam Adam Sotona has up

Re: RFR: 8308753: Class-File API transition to Preview [v2]

2023-09-26 Thread Adam Sotona
On Tue, 26 Sep 2023 13:10:15 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> PreviewFeature annotated with JEP 457 > > src/java.base/share/classes/jdk/internal/jav

Re: RFR: 8308753: Class-File API transition to Preview [v2]

2023-09-26 Thread Adam Sotona
le API is based on the > internal version of the library from the JDK master branch, and there are no > API features added. > > Please review this pull request to help the Classfile API turn into a preview. > > Any comments are welcome. > > Thanks, > Adam Adam Sotona has updated

RFR: 8308753: Class-File API transition to Preview

2023-09-26 Thread Adam Sotona
Classfile API is an internal library under package `jdk.internal.classfile` in JDK 21. This pull request turns the Classfile API into a preview feature and moves it into `java.lang.classfile`. It repackages all uses across JDK and tests and adds lots of missing Javadoc. This PR goes in sync

Re: RFR: 8316587: Use ArraysSupport.vectorizedHashCode in Utf8EntryImpl [v2]

2023-09-21 Thread Adam Sotona
On Thu, 21 Sep 2023 02:38:08 GMT, Chen Liang wrote: >> Like #12077, this uses JDK's internal utilities to speed up ASCII reading in >> Class files, where most identifiers, from conventions to attribute names, >> are ASCII. See the JBS issue for more in-depth explanations. >> >> Before:

Re: RFR: 8316587: Use ArraysSupport.vectorizedHashCode in Utf8EntryImpl [v2]

2023-09-21 Thread Adam Sotona
On Thu, 21 Sep 2023 02:38:08 GMT, Chen Liang wrote: >> Like #12077, this uses JDK's internal utilities to speed up ASCII reading in >> Class files, where most identifiers, from conventions to attribute names, >> are ASCII. See the JBS issue for more in-depth explanations. >> >> Before:

Re: RFR: 8294977: Convert test/jdk/java tests from ASM library to Classfile API [v9]

2023-09-21 Thread Adam Sotona
On Wed, 28 Jun 2023 07:02:17 GMT, Chen Liang wrote: >> Summaries: >> 1. A few recommendations about updating the constant API is made at >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-March/000233.html >> and I may update this patch shall the API changes be integrated before >>

Re: RFR: 8311084: Add typeSymbol() API for applicable constant pool entries [v3]

2023-09-20 Thread Adam Sotona
On Wed, 20 Sep 2023 07:35:40 GMT, Chen Liang wrote: >> 5 Constant Pool entries, namely ConstantDynamicEntry, InvokeDynamicEntry, >> FieldRefEntry, MethodRefEntry, and InterfaceMethodRefEntry should have a >> typeSymbol() API to return the nominal/symbolic descriptor (ClassDesc or >>

Re: RFR: 8313612: Use JUnit in lib-test/jdk tests [v4]

2023-09-20 Thread Adam Sotona
On Tue, 19 Sep 2023 18:30:10 GMT, Qing Xiao wrote: >> Modified all tests under lib-test/jdk to use JUnit > > Qing Xiao has updated the pull request incrementally with three additional > commits since the last revision: > > - Update

Integrated: 8294969: Convert jdk.jdeps javap to use the Classfile API

2023-09-18 Thread Adam Sotona
On Tue, 29 Nov 2022 10:26:31 GMT, Adam Sotona wrote: > javap uses proprietary com.sun.tools.classfile library to parse class files. > > This patch converts javap to use Classfile API. > > Please review. > > Thanks, > Adam This pull request has now been integrated. Ch

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v16]

2023-09-15 Thread Adam Sotona
> javap uses proprietary com.sun.tools.classfile library to parse class files. > > This patch converts javap to use Classfile API. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v15]

2023-09-15 Thread Adam Sotona
> javap uses proprietary com.sun.tools.classfile library to parse class files. > > This patch converts javap to use Classfile API. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v14]

2023-09-14 Thread Adam Sotona
> javap uses proprietary com.sun.tools.classfile library to parse class files. > > This patch converts javap to use Classfile API. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The p

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v13]

2023-09-14 Thread Adam Sotona
On Thu, 14 Sep 2023 16:38:36 GMT, Brian Goetz wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> applied suggested changes from review > > src/java.base/share/classes/jdk/internal/class

Integrated: 8313452: Improve Classfile API attributes handling safety

2023-09-14 Thread Adam Sotona
On Tue, 1 Aug 2023 08:36:01 GMT, Adam Sotona wrote: > This PR improved Classfile API attributes handling safety by introduction of > attribute stability indicator > and by extension of UnknownAttributesOption to more general > AttributesProcessingOption. This pull request

Re: RFR: 8313452: Improve Classfile API attributes handling safety [v4]

2023-09-14 Thread Adam Sotona
> This PR improved Classfile API attributes handling safety by introduction of > attribute stability indicator > and by extension of UnknownAttributesOption to more general > AttributesProcessingOption. Adam Sotona has updated the pull request incrementally with one additional

Re: RFR: 8313452: Improve Classfile API attributes handling safety [v3]

2023-09-14 Thread Adam Sotona
On Thu, 14 Sep 2023 16:30:21 GMT, Brian Goetz wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> magic moved to Util::isAttributeAllowed and fixed possible NPE > > src/java.base/share/

Integrated: 8313258: RuntimeInvisibleTypeAnnotationsAttribute.annotations() API Index out of Bound error

2023-09-14 Thread Adam Sotona
On Thu, 31 Aug 2023 11:09:05 GMT, Adam Sotona wrote: > Classfile API suppose to throw IllegalArgumentException in situations where > bytecode offset is out of allowed range. Such situation includes invalid > offset parsed from a TypeAnnotation as well as from other CodeAttribute >

Integrated: 8315678: Classfile API ConstantPool::entryCount and ConstantPool::entryByIndex methods are confusing

2023-09-14 Thread Adam Sotona
On Tue, 5 Sep 2023 14:18:08 GMT, Adam Sotona wrote: > Classfile API `ConstantPool::entryCount` and `ConstantPool::entryByIndex` > methods are confusing and unsafe to use without knowledge of constant pool > specification. > This patch renames `ConstantPool::entryCount` to `Consta

Re: RFR: 8315678: Classfile API ConstantPool::entryCount and ConstantPool::entryByIndex methods are confusing [v3]

2023-09-14 Thread Adam Sotona
On Thu, 14 Sep 2023 16:17:35 GMT, Brian Goetz wrote: >> Adam Sotona has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains four addi

Integrated: 8315541: Classfile API TypeAnnotation.TargetInfo factory methods accept null labels

2023-09-14 Thread Adam Sotona
On Tue, 5 Sep 2023 10:59:09 GMT, Adam Sotona wrote: > This patch performs null checks in to refuse null labels in > TypeAnnotation.TargetInfo implementations. > > Please review. > > Thanks, > Adam This pull request has now been integrated. Changeset: c7d306c6 Author

Re: RFR: 8315678: Classfile API ConstantPool::entryCount and ConstantPool::entryByIndex methods are confusing [v3]

2023-09-08 Thread Adam Sotona
ave been added to pool entries. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains fou

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v11]

2023-09-08 Thread Adam Sotona
On Thu, 7 Sep 2023 03:10:33 GMT, Vicente Romero wrote: >> Adam Sotona has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 227 commits: >> >> - Merge branch 'master' into JDK-8294969-javap >> - Merge br

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v13]

2023-09-08 Thread Adam Sotona
> javap uses proprietary com.sun.tools.classfile library to parse class files. > > This patch converts javap to use Classfile API. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the l

Re: RFR: 8315444: Convert test/jdk/tools to Classfile API [v3]

2023-09-07 Thread Adam Sotona
On Wed, 6 Sep 2023 16:44:15 GMT, Qing Xiao wrote: >> `/test/jdk/tools/lib/tests/JImageValidator.java`, tests in >> `/test/jdk/tools/jlink`, and `/test/jdk/tools/jimage`, >> `/test/jdk/java/time/nontestng/java/time/chrono/HijrahConfigTest.java` use >> on com.sun.tools.classfile and should be

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v12]

2023-09-07 Thread Adam Sotona
> javap uses proprietary com.sun.tools.classfile library to parse class files. > > This patch converts javap to use Classfile API. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The p

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v11]

2023-09-07 Thread Adam Sotona
On Wed, 6 Sep 2023 19:53:12 GMT, Vicente Romero wrote: >> Adam Sotona has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 227 commits: >> >> - Merge branch 'master' into JDK-8294969-javap >> - Merge br

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v11]

2023-09-07 Thread Adam Sotona
On Wed, 6 Sep 2023 19:57:19 GMT, Vicente Romero wrote: >> Adam Sotona has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 227 commits: >> >> - Merge branch 'master' into JDK-8294969-javap >> - Merge br

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v11]

2023-09-07 Thread Adam Sotona
On Wed, 6 Sep 2023 19:55:49 GMT, Vicente Romero wrote: >> Adam Sotona has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 227 commits: >> >> - Merge branch 'master' into JDK-8294969-javap >> - Merge br

Re: RFR: 8313452: Improve Classfile API attributes handling safety [v3]

2023-09-06 Thread Adam Sotona
> This PR improved Classfile API attributes handling safety by introduction of > attribute stability indicator > and by extension of UnknownAttributesOption to more general > AttributesProcessingOption. Adam Sotona has updated the pull request incrementally with one additional

Re: RFR: 8313452: Improve Classfile API attributes handling safety [v3]

2023-09-06 Thread Adam Sotona
On Wed, 6 Sep 2023 13:54:28 GMT, ExE Boss wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> magic moved to Util::isAttributeAllowed and fixed possible NPE > > src/java.base/share/class

Re: RFR: 8315678: Classfile API ConstantPool::entryCount and ConstantPool::entryByIndex methods are confusing [v2]

2023-09-06 Thread Adam Sotona
On Wed, 6 Sep 2023 08:10:12 GMT, ExE Boss wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed tests > > src/java.base/share/classes/jdk/internal/classfile/constantpool/Constant

Re: RFR: 8313452: Improve Classfile API attributes handling safety [v2]

2023-09-06 Thread Adam Sotona
> This PR improved Classfile API attributes handling safety by introduction of > attribute stability indicator > and by extension of UnknownAttributesOption to more general > AttributesProcessingOption. Adam Sotona has updated the pull request with a new target base due to a merge

Re: RFR: 8315444: Convert test/jdk/tools to Classfile API [v2]

2023-09-06 Thread Adam Sotona
On Tue, 5 Sep 2023 23:33:05 GMT, Chen Liang wrote: >> Qing Xiao has updated the pull request incrementally with one additional >> commit since the last revision: >> >> migrate >> test/jdk/java/time/nontestng/java/time/chrono/HijrahConfigTest.java use >> Classfile API > >

Re: RFR: 8313258: RuntimeInvisibleTypeAnnotationsAttribute.annotations() API Index out of Bound error

2023-09-05 Thread Adam Sotona
On Thu, 31 Aug 2023 14:18:00 GMT, Chen Liang wrote: >> Classfile API suppose to throw IllegalArgumentException in situations where >> bytecode offset is out of allowed range. Such situation includes invalid >> offset parsed from a TypeAnnotation as well as from other CodeAttribute >>

Re: RFR: 8315678: Classfile API ConstantPool::entryCount and ConstantPool::entryByIndex methods are confusing [v2]

2023-09-05 Thread Adam Sotona
ave been added to pool entries. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: fixed tests - Changes: - all: https://git.openjdk.org/jdk/pull/15567/files - new:

RFR: 8315678: Classfile API ConstantPool::entryCount and ConstantPool::entryByIndex methods are confusing

2023-09-05 Thread Adam Sotona
Classfile API `ConstantPool::entryCount` and `ConstantPool::entryByIndex` methods are confusing and unsafe to use without knowledge of constant pool specification. This patch renames `ConstantPool::entryCount` to `ConstantPool::size` and adds checks to `ConstantPool::entryByIndex` for invalid

RFR: 8315541: Classfile API TypeAnnotation.TargetInfo factory methods accept null labels

2023-09-05 Thread Adam Sotona
This patch performs null checks in to refuse null labels in TypeAnnotation.TargetInfo implementations. Please review. Thanks, Adam - Commit messages: - 8315541: Classfile API TypeAnnotation.TargetInfo factory methods accept null labels Changes:

RFR: 8313452: Improve Classfile API attributes handling safety

2023-09-05 Thread Adam Sotona
This PR improved Classfile API attributes handling safety by introduction of attribute stability indicator and by extension of UnknownAttributesOption to more general AttributesProcessingOption. - Commit messages: - fixed remaining listFromTrustedArrayNullsAllowed calls to

Integrated: 8312491: Update Classfile API snippets and examples

2023-09-05 Thread Adam Sotona
On Fri, 21 Jul 2023 09:37:10 GMT, Adam Sotona wrote: > This pull request updates Classfile API snippets and examples and adds > missing javadoc. > > Please review. > > Thanks, > Adam This pull request has now been integrated. Changeset: 744b3970 Author:Adam Soto

Re: RFR: 8315444: Convert test/jdk/tools to Classfile API

2023-09-04 Thread Adam Sotona
On Fri, 1 Sep 2023 08:14:26 GMT, Qing Xiao wrote: > /test/jdk/tools/lib/tests/JImageValidator.java, tests in > /test/jdk/tools/jlink and /test/jdk/tools/jimage use on > com.sun.tools.classfile and should be converted to Classfile API. Following tier2 test is affected by the change and fails:

Re: RFR: 8315444: Convert test/jdk/tools to Classfile API

2023-09-01 Thread Adam Sotona
On Fri, 1 Sep 2023 08:14:26 GMT, Qing Xiao wrote: > /test/jdk/tools/lib/tests/JImageValidator.java, tests in > /test/jdk/tools/jlink and /test/jdk/tools/jimage use on > com.sun.tools.classfile and should be converted to Classfile API. It looks good, thanks. - PR Comment:

Re: RFR: 8312491: Update Classfile API snippets and examples [v11]

2023-09-01 Thread Adam Sotona
> This pull request updates Classfile API snippets and examples and adds > missing javadoc. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: added notes to attributes -

Re: RFR: 8313983: jmod create --target-platform should replace existing ModuleTarget attribute

2023-09-01 Thread Adam Sotona
On Thu, 31 Aug 2023 16:47:07 GMT, Mandy Chung wrote: > Would you consider documenting in the javadoc of XXXAttribute in the > ClassFile API if it allows multiple? It will make clear to the readers. Yes, I'll add that information as a part of javadoc update #14968. Thanks! - PR

Integrated: 8313983: jmod create --target-platform should replace existing ModuleTarget attribute

2023-09-01 Thread Adam Sotona
On Thu, 31 Aug 2023 12:13:40 GMT, Adam Sotona wrote: > ModuleTarget and ModuleResolution attributes were flagged as 'allow multiple' > in the Classfile API. > This patch removed the flags and allows at most one instance of each > attribute. > > Please review. > > T

Re: RFR: 8312491: Update Classfile API snippets and examples [v10]

2023-08-31 Thread Adam Sotona
On Wed, 30 Aug 2023 12:39:45 GMT, Adam Sotona wrote: >> This pull request updates Classfile API snippets and examples and adds >> missing javadoc. >> >> Please review. >> >> Thanks, >> Adam > > Adam Sotona has updated the pull request incrementa

RFR: 8313983: jmod create --target-platform should replace existing ModuleTarget attribute

2023-08-31 Thread Adam Sotona
ModuleTarget and ModuleResolution attributes were flagged as 'allow multiple' in the Classfile API. This patch removed the flags and allows at most one instance of each attribute. Please review. Thanks, Adam - Commit messages: - 8313983: jmod create --target-platform should

RFR: 8313258: RuntimeInvisibleTypeAnnotationsAttribute.annotations() API Index out of Bound error

2023-08-31 Thread Adam Sotona
Classfile API suppose to throw IllegalArgumentException in situations where bytecode offset is out of allowed range. Such situation includes invalid offset parsed from a TypeAnnotation as well as from other CodeAttribute attributes. This patch throws IAE for invalid bytecode offset when

Re: RFR: 8312491: Update Classfile API snippets and examples [v10]

2023-08-30 Thread Adam Sotona
> This pull request updates Classfile API snippets and examples and adds > missing javadoc. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: fixing javadoc --

Re: RFR: 8312491: Update Classfile API snippets and examples [v9]

2023-08-30 Thread Adam Sotona
> This pull request updates Classfile API snippets and examples and adds > missing javadoc. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: fixing javadoc --

Re: RFR: 8312491: Update Classfile API snippets and examples [v8]

2023-08-30 Thread Adam Sotona
> This pull request updates Classfile API snippets and examples and adds > missing javadoc. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with two additional commits since the last revision: - fixing java

Re: RFR: 8297777: jdk.jlink StringSharingPlugin uses com.sun.tools.classfile library

2023-08-29 Thread Adam Sotona
On Wed, 23 Aug 2023 23:50:29 GMT, Qing Xiao wrote: > Migrate jdk.jlink StringSharingPlugin to use new classfile library Marked as reviewed by asotona (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/15408#pullrequestreview-1600806536

Re: RFR: 8297777: jdk.jlink StringSharingPlugin uses com.sun.tools.classfile library

2023-08-28 Thread Adam Sotona
On Wed, 23 Aug 2023 23:50:29 GMT, Qing Xiao wrote: > Migrate jdk.jlink StringSharingPlugin to use new classfile library It looks good, thanks. - PR Comment: https://git.openjdk.org/jdk/pull/15408#issuecomment-1695382042

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v11]

2023-08-28 Thread Adam Sotona
On Thu, 20 Jul 2023 09:11:20 GMT, Adam Sotona wrote: >> javap uses proprietary com.sun.tools.classfile library to parse class files. >> >> This patch converts javap to use Classfile API. >> >> Please review. >> >> Thanks, >> Adam > > Adam

Re: [jdk21] RFR: 8313312: Add missing classpath exception copyright header

2023-08-09 Thread Adam Sotona
On Tue, 8 Aug 2023 15:55:10 GMT, Roger Riggs wrote: > The same copyright updates are needed in JDK21. Marked as reviewed by asotona (Reviewer). - PR Review: https://git.openjdk.org/jdk21/pull/166#pullrequestreview-1569051344

Re: RFR: 8312491: Update Classfile API snippets and examples [v7]

2023-08-08 Thread Adam Sotona
> This pull request updates Classfile API snippets and examples and adds > missing javadoc. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: removed extra lines --

Re: RFR: 8313312: Add missing classpath exception copyright header [v2]

2023-08-02 Thread Adam Sotona
On Fri, 28 Jul 2023 17:39:18 GMT, Amit Kumar wrote: >> Adds `classpath exception` in multiple files, affects copyright header only. > > Amit Kumar has updated the pull request incrementally with one additional > commit since the last revision: > > revert java.lang.foreign changes Marked as

Re: RFR: 8312491: Update Classfile API snippets and examples [v6]

2023-07-28 Thread Adam Sotona
On Thu, 27 Jul 2023 15:16:33 GMT, Adam Sotona wrote: >> src/java.base/share/classes/jdk/internal/classfile/CodeBuilder.java line >> 1239: >> >>> 1237: return ldc(BytecodeHelpers.constantEntry(constantPool(), >>> value)); >>> 1238: }

Re: RFR: 8312491: Update Classfile API snippets and examples [v6]

2023-07-28 Thread Adam Sotona
> This pull request updates Classfile API snippets and examples and adds > missing javadoc. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with two additional commits since the last revision: - fixing java

Re: RFR: 8312491: Update Classfile API snippets and examples [v5]

2023-07-28 Thread Adam Sotona
> 8312491: Update Classfile API snippets and examples Adam Sotona has updated the pull request incrementally with two additional commits since the last revision: - fixing javadoc - fixing javadoc - Changes: - all: https://git.openjdk.org/jdk/pull/14968/files - new: ht

Re: RFR: 8312491: Update Classfile API snippets and examples [v4]

2023-07-28 Thread Adam Sotona
> 8312491: Update Classfile API snippets and examples Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: fixing javadoc - Changes: - all: https://git.openjdk.org/jdk/pull/14968/files - new: https://git.openjdk.org/

Re: RFR: 8294979: test/jdk/tools/jlink 3 test classes use ASM library

2023-07-27 Thread Adam Sotona
On Thu, 13 Jul 2023 18:35:42 GMT, Qing Xiao wrote: > Modified 3 of 3 test/jdk/tools/jlink test classes to replace > com.sun.tools.classfile library. I would suggest to minimise footprint of the patch and do not change unrelated code. Any unnecessary reformat can cause conflicts when merging

Re: RFR: 8294979: test/jdk/tools/jlink 3 test classes use ASM library

2023-07-27 Thread Adam Sotona
On Sun, 16 Jul 2023 12:37:44 GMT, Chen Liang wrote: > I think these exports can probably be removed completely; no test code uses > ASM, meaning the export was likely redundant from the very beginning. I can confirm, the tests are passing even without the exports. - PR Comment:

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v11]

2023-07-27 Thread Adam Sotona
On Thu, 20 Jul 2023 09:11:20 GMT, Adam Sotona wrote: >> javap uses proprietary com.sun.tools.classfile library to parse class files. >> >> This patch converts javap to use Classfile API. >> >> Please review. >> >> Thanks, >> Adam > > Adam

Re: RFR: 8312491: Update Classfile API snippets and examples [v3]

2023-07-27 Thread Adam Sotona
> 8312491: Update Classfile API snippets and examples Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: fixing javadoc - Changes: - all: https://git.openjdk.org/jdk/pull/14968/files - new: https://git.openjdk.org/

Re: RFR: 8312491: Update Classfile API snippets and examples [v2]

2023-07-27 Thread Adam Sotona
> 8312491: Update Classfile API snippets and examples Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: fixing javadoc - Changes: - all: https://git.openjdk.org/jdk/pull/14968/files - new: https://git.openjdk.org/

Re: RFR: 8312491: Update Classfile API snippets and examples

2023-07-27 Thread Adam Sotona
On Thu, 27 Jul 2023 14:59:49 GMT, Brian Goetz wrote: >> 8312491: Update Classfile API snippets and examples > > src/java.base/share/classes/jdk/internal/classfile/CodeBuilder.java line 1239: > >> 1237: return ldc(BytecodeHelpers.constantEntry(constantPool(), >> value)); >> 1238: }

RFR: 8312491: Update Classfile API snippets and examples

2023-07-27 Thread Adam Sotona
8312491: Update Classfile API snippets and examples - Commit messages: - 8312491: Update Classfile API snippets and examples Changes: https://git.openjdk.org/jdk/pull/14968/files Webrev: https://webrevs.openjdk.org/?repo=jdk=14968=00 Issue:

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v11]

2023-07-20 Thread Adam Sotona
> javap uses proprietary com.sun.tools.classfile library to parse class files. > > This patch converts javap to use Classfile API. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The p

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v10]

2023-07-17 Thread Adam Sotona
> javap uses proprietary com.sun.tools.classfile library to parse class files. > > This patch converts javap to use Classfile API. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The p

Re: RFR: 8311172: Classfile.PREVIEW_MINOR_VERSION doesn't match that read from class files

2023-07-17 Thread Adam Sotona
On Fri, 30 Jun 2023 13:10:55 GMT, Chen Liang wrote: > `Classfile.PREVIEW_MINOR_VERSION`, currently -1, is correct when passed to > `ClassBuilder::withVersion`, but is incorrect when compared to > `ClassModel::minorVersion`, which only sets the bits of 2 lowest bytes to 1 > (65536). Discovered

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v9]

2023-07-11 Thread Adam Sotona
> javap uses proprietary com.sun.tools.classfile library to parse class files. > > This patch converts javap to use Classfile API. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v8]

2023-06-30 Thread Adam Sotona
> javap uses proprietary com.sun.tools.classfile library to parse class files. > > This patch converts javap to use Classfile API. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v7]

2023-06-30 Thread Adam Sotona
> javap uses proprietary com.sun.tools.classfile library to parse class files. > > This patch converts javap to use Classfile API. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the la

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v6]

2023-06-29 Thread Adam Sotona
> javap uses proprietary com.sun.tools.classfile library to parse class files. > > This patch converts javap to use Classfile API. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The p

Re: RFR: 8311020: Typo cleanup in Classfile API [v2]

2023-06-28 Thread Adam Sotona
On Wed, 28 Jun 2023 14:12:12 GMT, Chen Liang wrote: >> This is a cleanup patch that fixes: >> 1. `ClassfileBuilder` should be sealed but was not; it's now sealed. >> 2. Various typo fixes, including spelling errors, wrong descriptions, and >> unnecessary full qualifications for classes in the

Re: RFR: 8310848: Convert ClassDesc and MethodTypeDesc to be stored in static final fields [v5]

2023-06-28 Thread Adam Sotona
On Wed, 28 Jun 2023 15:30:37 GMT, Chen Liang wrote: >> This would encourage Classfile API users to use the descriptors as >> constants, which can improve performance by avoiding repeated validation and >> reusing cached descriptor strings for MethodTypeDesc. This patch updates >> usages in

Re: RFR: 8310848: Convert ClassDesc and MethodTypeDesc to be stored in static final fields [v4]

2023-06-28 Thread Adam Sotona
On Tue, 27 Jun 2023 14:20:20 GMT, Chen Liang wrote: >> This would encourage Classfile API users to use the descriptors as >> constants, which can improve performance by avoiding repeated validation and >> reusing cached descriptor strings for MethodTypeDesc. This patch updates >> usages in

Re: RFR: 8311020: Typo cleanup in Classfile API

2023-06-28 Thread Adam Sotona
On Wed, 28 Jun 2023 06:09:08 GMT, Chen Liang wrote: > This is a cleanup patch that fixes: > 1. `ClassfileBuilder` should be sealed but was not; it's now sealed. > 2. Various typo fixes, including spelling errors, wrong descriptions, and > unnecessary full qualifications for classes in the same

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v5]

2023-06-27 Thread Adam Sotona
> javap uses proprietary com.sun.tools.classfile library to parse class files. > > This patch converts javap to use Classfile API. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The p

Integrated: 8308899: Introduce Classfile context and improve Classfile options

2023-06-26 Thread Adam Sotona
On Fri, 26 May 2023 14:56:57 GMT, Adam Sotona wrote: > Classfile context object and multi-state options have been discussed at > https://mail.openjdk.org/pipermail/classfile-api-dev/2023-May/000321.html > This patch implements the proposed changes in Classfile API and fixes all > a

Re: RFR: 8308899: Introduce Classfile context and improve Classfile options [v25]

2023-06-26 Thread Adam Sotona
On Mon, 26 Jun 2023 14:56:34 GMT, Chen Liang wrote: > I ran `make docs-classfile-api-javadoc` Thanks for pointing this out. The makefile patches accidentally fell into this PR. > One thing of note is that the JDK itself has a `@sealedGraph` taglet to > render the sealed class hierarchy of

Re: RFR: 8308899: Introduce Classfile context and improve Classfile options [v26]

2023-06-26 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: Revert "Classfile API javadoc make patch" This reverts commit dad094d1686e4e16ccd379c091db258bec0087c5. - Changes:

Re: RFR: 8308899: Introduce Classfile context and improve Classfile options [v25]

2023-06-26 Thread Adam Sotona
On Mon, 26 Jun 2023 15:40:39 GMT, Maurizio Cimadamore wrote: >> The API changes look great. I like the instance usages of ClassFile, and how >> CF is now used in a centralized fashion to double down as a cache/option >> store (and entry point for transformation). Seems like a step in a good

<    1   2   3   4   5   6   7   8   9   10   >