Skip to content

Commit

Permalink
8313983: jmod create --target-platform should replace existing Module…
Browse files Browse the repository at this point in the history
…Target attribute

Reviewed-by: alanb, mchung
  • Loading branch information
asotona committed Sep 1, 2023
1 parent 81b5d22 commit c2e01eb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ protected void writeBody(BufWriter buf, ModulePackagesAttribute attr) {

/** Attribute mapper for the {@code ModuleResolution} attribute */
public static final AttributeMapper<ModuleResolutionAttribute>
MODULE_RESOLUTION = new AbstractAttributeMapper<>(NAME_MODULE_RESOLUTION, true, Classfile.JAVA_9_VERSION) {
MODULE_RESOLUTION = new AbstractAttributeMapper<>(NAME_MODULE_RESOLUTION, Classfile.JAVA_9_VERSION) {
@Override
public ModuleResolutionAttribute readAttribute(AttributedElement e, ClassReader cf, int p) {
return new BoundAttribute.BoundModuleResolutionAttribute(cf, this, p);
Expand All @@ -475,7 +475,7 @@ protected void writeBody(BufWriter buf, ModuleResolutionAttribute attr) {

/** Attribute mapper for the {@code ModuleTarget} attribute */
public static final AttributeMapper<ModuleTargetAttribute>
MODULE_TARGET = new AbstractAttributeMapper<>(NAME_MODULE_TARGET, true, Classfile.JAVA_9_VERSION) {
MODULE_TARGET = new AbstractAttributeMapper<>(NAME_MODULE_TARGET, Classfile.JAVA_9_VERSION) {
@Override
public ModuleTargetAttribute readAttribute(AttributedElement e, ClassReader cf, int p) {
return new BoundAttribute.BoundModuleTargetAttribute(cf, this, p);
Expand Down

3 comments on commit c2e01eb

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@mrserb
Copy link
Member

@mrserb mrserb commented on c2e01eb Jun 4, 2024

Choose a reason for hiding this comment

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

/backport jdk21u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on c2e01eb Jun 4, 2024

Choose a reason for hiding this comment

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

@mrserb the backport was successfully created on the branch backport-mrserb-c2e01eba-master in my personal fork of openjdk/jdk21u-dev. To create a pull request with this backport targeting openjdk/jdk21u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit c2e01eba from the openjdk/jdk repository.

The commit being backported was authored by Adam Sotona on 1 Sep 2023 and was reviewed by Alan Bateman and Mandy Chung.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21u-dev:

$ git fetch https://github.com/openjdk-bots/jdk21u-dev.git backport-mrserb-c2e01eba-master:backport-mrserb-c2e01eba-master
$ git checkout backport-mrserb-c2e01eba-master
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21u-dev.git backport-mrserb-c2e01eba-master

Please sign in to comment.