Skip to content
Permalink
Browse files
8270184: [TESTBUG] Add coverage for jvmci ResolvedJavaType.toJavaName…
…() for lambdas

Reviewed-by: kvn
  • Loading branch information
jerboaa committed Jul 12, 2021
1 parent 86a2008 commit 6a9bc108736522897f03a75c83e90e2c2a183d27
Showing 1 changed file with 13 additions and 0 deletions.
@@ -162,6 +162,19 @@ public void isArrayTest() {
}
}

@Test
public void internalNameTest() {
// Verify that the last slash in lambda types are not replaced with a '.' as they
// are part of the type name.
Supplier<Runnable> lambda = () -> () -> System.out.println("run");
ResolvedJavaType lambdaType = metaAccess.lookupJavaType(lambda.getClass());
String typeName = lambdaType.getName();
int typeNameLen = TestResolvedJavaType.class.getSimpleName().length();
int index = typeName.indexOf(TestResolvedJavaType.class.getSimpleName());
String suffix = typeName.substring(index + typeNameLen, typeName.length() - 1);
assertEquals(TestResolvedJavaType.class.getName() + suffix, lambdaType.toJavaName());
}

@Test
public void getModifiersTest() {
for (Class<?> c : classes) {

5 comments on commit 6a9bc10

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 6a9bc10 Jul 12, 2021

Choose a reason for hiding this comment

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

@jerboaa
Copy link
Contributor Author

@jerboaa jerboaa commented on 6a9bc10 Jul 12, 2021

Choose a reason for hiding this comment

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

/backport jdk11u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 6a9bc10 Jul 12, 2021

Choose a reason for hiding this comment

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

@jerboaa could not automatically backport 6a9bc108 to openjdk/jdk11u-dev due to conflicts in the following files:

  • test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java

To manually resolve these conflicts run the following commands in your personal fork of openjdk/jdk11u-dev:

$ git checkout -b jerboaa-backport-6a9bc108
$ git fetch --no-tags https://git.openjdk.java.net/jdk 6a9bc108736522897f03a75c83e90e2c2a183d27
$ git cherry-pick --no-commit 6a9bc108736522897f03a75c83e90e2c2a183d27
$ # Resolve conflicts
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport 6a9bc108736522897f03a75c83e90e2c2a183d27'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk11u-dev with the title Backport 6a9bc108736522897f03a75c83e90e2c2a183d27.

@jerboaa
Copy link
Contributor Author

@jerboaa jerboaa commented on 6a9bc10 Jul 13, 2021

Choose a reason for hiding this comment

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

/backport jdk17

@openjdk
Copy link

@openjdk openjdk bot commented on 6a9bc10 Jul 13, 2021

Choose a reason for hiding this comment

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

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

The commit being backported was authored by Severin Gehwolf on 12 Jul 2021 and was reviewed by Vladimir Kozlov.

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/jdk17:

$ git fetch https://github.com/openjdk-bots/jdk17 jerboaa-backport-6a9bc108:jerboaa-backport-6a9bc108
$ git checkout jerboaa-backport-6a9bc108
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17 jerboaa-backport-6a9bc108

Please sign in to comment.