Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8294966: Convert jdk.jartool/sun.tools.jar.FingerPrint to use the ClassFile API to parse JAR entries #11694

Closed
wants to merge 199 commits into from

Conversation

asotona
Copy link
Member

@asotona asotona commented Dec 15, 2022

8294966: Convert jdk.jartool/sun.tools.jar.FingerPrint to use the ClassFile API to parse JAR entries

Please review.
Thanks,
Adam


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8294966: Convert jdk.jartool/sun.tools.jar.FingerPrint to use the ClassFile API to parse JAR entries

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11694/head:pull/11694
$ git checkout pull/11694

Update a local copy of the PR:
$ git checkout pull/11694
$ git pull https://git.openjdk.org/jdk pull/11694/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11694

View PR using the GUI difftool:
$ git pr show -t 11694

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11694.diff

asotona and others added 30 commits June 10, 2022 14:20
…lang.reflect.AccesFlag in Classfile API and tests
…andleInfo

implemented RebuildingTransformation and added to Transforms and CorpusTest
reduced CorpusTestHelper output and adjusted TEST.properties
MethodParameterInfo name parameter changed to Optional
added MethodParameterInfo::ofParameter(Optional<String>,int)
implemented TemporaryConstantPool::stringEntry
adjusted BoundAttribute and RebuildingTransformation test helper
EnclosingMethodAttribute factory method changed to accept Optionals
added EnclosingMethodAttribute::of(ClassDesc,Optional<String>,Optional<MethodTypeDesc>)
added EnclosingMethodAttribute accessor methods
InnerClassInfo all factory methods changed to accept Optionals
added NestHostAttribute::of(ClassDesc)
added SourceIDAttribute::of(String)
changes reflected in BoundAttribute and RebuildTransformation test helper
* added TypeAnnotation factory methods accepting ClassDesc and AnnotationElement...
AnnotationValue.OfConstant sub-classed to allow switch pattern matching
RebuildingTransformation test helper adjusted

* added TypeAnnotation.TargetInfo factory methods with validity checking for multi-target types
adjusted RebuildTransformation test helper
…Symbol (openjdk#13)

refactored to FieldModel::fieldTypeSymbol and MethodModel::methodTypeSymbol (openjdk#13)
added round testing of signatures in RebuildTransformation test helper
… a frame type.

 Doing so, make the chop size available to consumers of frames.
@openjdk-notifier openjdk-notifier bot changed the base branch from pr/10982 to master March 9, 2023 15:29
@openjdk-notifier
Copy link

The parent pull request that this pull request depends on has now been integrated and the target branch of this pull request has been updated. This means that changes from the dependent pull request can start to show up as belonging to this pull request, which may be confusing for reviewers. To remedy this situation, simply merge the latest changes from the new target branch into this pull request by running commands similar to these in the local repository for your personal fork:

git checkout JDK-8294966
git fetch https://git.openjdk.org/jdk master
git merge FETCH_HEAD
# if there are conflicts, follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk
Copy link

openjdk bot commented Mar 9, 2023

⚠️ @asotona This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

@asotona asotona marked this pull request as ready for review March 9, 2023 17:34
@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 9, 2023
@mlbridge
Copy link

mlbridge bot commented Mar 9, 2023

Webrevs

@@ -25,3 +25,5 @@

DISABLED_WARNINGS_java += missing-explicit-ctor
JAVAC_FLAGS += -XDstringConcat=inline
JAVAC_FLAGS += --enable-preview
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is no longer needed. It's not a preview API.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately patterns in switch statements are still in preview. This flag and participation in preview can be removed once they are finalised.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification. I forgot about that.

@@ -152,6 +152,7 @@
jdk.compiler,
jdk.incubator.concurrent, // participates in preview features
jdk.incubator.vector, // participates in preview features
jdk.jartool, // participates in preview features
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer needed.

@@ -47,6 +49,7 @@
* @moduleGraph
* @since 9
*/
@ParticipatesInPreview
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. No needed.

@@ -25,3 +25,5 @@

DISABLED_WARNINGS_java += missing-explicit-ctor
JAVAC_FLAGS += -XDstringConcat=inline
JAVAC_FLAGS += --enable-preview
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification. I forgot about that.

@asotona asotona changed the title 8294966: jdk.jartool sun.tools.jar.FingerPrint uses ASM to parse class jar entries 8294966: Convert jdk.jartool/sun.tools.jar.FingerPrint to use the ClassFile API to parse JAR entries Mar 10, 2023
@openjdk
Copy link

openjdk bot commented Mar 10, 2023

@asotona This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8294966: Convert jdk.jartool/sun.tools.jar.FingerPrint to use the ClassFile API to parse JAR entries

Reviewed-by: mchung

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 15 new commits pushed to the master branch:

  • 94de0a7: 8302513: remove sun.awt.util.IdentityLinkedList
  • bf16b5b: 8303937: Corrupted heap dumps due to missing retries for os::write()
  • 6f54eda: 8299088: ClassLoader::defineClass2 throws OOME but JNI exception pending thrown by getUTF
  • a3358b1: 8303853: Update ISO 3166 country codes table
  • 206661d: 8281941: Change CDS warning messages to use Unified Logging
  • 9dd7b87: 8303674: JFR: TypeLibrary class not thread safe
  • c26e1d0: 8303495: Unused path parameter in ClassLoader::add_to_app_classpath_entries(JavaThread* current, char* path, ...)
  • 548d552: 8303548: Arguments::get_default_shared_archive_path() should cache the result for future use
  • f2a36b4: 8302666: Replace CHM with VarHandle in ForeachOrderedTask
  • a32ee5d: 8303949: gcc10 warning Linux ppc64le - note: the layout of aggregates containing vectors with 8-byte alignment has changed in GCC 5
  • ... and 5 more: https://git.openjdk.org/jdk/compare/b1d89f30663aed28783e839c5690f46a2b382002...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 10, 2023
@asotona
Copy link
Member Author

asotona commented Mar 13, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Mar 13, 2023

Going to push as commit 25e7ac2.
Since your change was applied there have been 28 commits pushed to the master branch:

  • 3018b47: 8303969: Limit printed failures within an object during G1 heap verification
  • b575e54: 8303963: Replace various encodings of UINT/SIZE_MAX in gc code
  • c183fce: 8300926: Several startup regressions ~6-70% in 21-b6 all platforms
  • 31e1e39: 8303646: [JVMCI] Add possibility to lookup ResolvedJavaType from jclass.
  • 1148a65: 8303678: [JVMCI] Add possibility to convert object JavaConstant to jobject.
  • d20bde2: 8294715: Add IR checks to the reduction vectorization tests
  • c313e1a: 8303922: build-test-lib target is broken
  • fbc76c2: 8304017: ProblemList com/sun/jdi/InvokeHangTest.java on windows-x64 in vthread mode
  • a06426a: 8274400: HotSpot Style Guide should permit use of alignof
  • 98a7a60: 8303863: RISC-V: TestArrayStructs.java fails after JDK-8303604
  • ... and 18 more: https://git.openjdk.org/jdk/compare/b1d89f30663aed28783e839c5690f46a2b382002...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 13, 2023
@openjdk openjdk bot closed this Mar 13, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 13, 2023
@openjdk
Copy link

openjdk bot commented Mar 13, 2023

@asotona Pushed as commit 25e7ac2.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler compiler-dev@openjdk.org core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
7 participants