Skip to content

Commit

Permalink
8267509: Improve IllegalAccessException message to include the cause …
Browse files Browse the repository at this point in the history
…of the exception

Reviewed-by: liach, naoto
  • Loading branch information
Mandy Chung committed Oct 4, 2023
1 parent ddacf92 commit 36314a9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1719,7 +1719,8 @@ MethodHandle setVarargs(MemberName member) throws IllegalAccessException {
try {
return this.withVarargs(true);
} catch (IllegalArgumentException ex) {
throw member.makeAccessException("cannot make variable arity", null);
throw new IllegalAccessException("cannot make variable arity: " + member +
" does not have a trailing array parameter");
}
}

Expand Down

3 comments on commit 36314a9

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@shipilev
Copy link
Member

Choose a reason for hiding this comment

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

/backport jdk21u

@openjdk
Copy link

@openjdk openjdk bot commented on 36314a9 Oct 23, 2023

Choose a reason for hiding this comment

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

@shipilev the backport was successfully created on the branch shipilev-backport-36314a90 in my personal fork of openjdk/jdk21u. To create a pull request with this backport targeting openjdk/jdk21u: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 36314a90 from the openjdk/jdk repository.

The commit being backported was authored by Mandy Chung on 4 Oct 2023 and was reviewed by Chen Liang and Naoto Sato.

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:

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

Please sign in to comment.