-
Notifications
You must be signed in to change notification settings - Fork 366
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
Failure to write out type table for nested types in hibernate-core:6.5.1.Final
#4993
Comments
Notice above how the outerName has no relation to the class being written; I suppose we need to change these lines rewrite/rewrite-java/src/main/java/org/openrewrite/java/internal/parser/TypeTable.java Lines 206 to 213 in 7661418
to for (ClassDefinition innerClass : innerClasses) {
int lastIndexOf$ = innerClass.getName().lastIndexOf('$');
classWriter.visitInnerClass(
innerClass.getName(),
innerClass.getName().substring(0, lastIndexOf$),
innerClass.getName().substring(lastIndexOf$ + 1),
innerClass.getAccess()
);
} but even then we see the same access issues in |
@timtebeek I think it may be sufficient to just bitwise NOT out the flags that shouldn't be written in this case. |
There's a few more issues it seems; the tests were running without validation |
What version of OpenRewrite are you using?
I am using
How are you running OpenRewrite?
I'm running
./gradlew createTypeTable
against openrewrite/rewrite-hibernate through a locally installed version of this build pluginWhat is the smallest, simplest way to reproduce the problem?
./gradlew pTML
on said branchbuild.gradle.kts
to userecipe-library
versionlatest.integration
./gradlew createTypeTable
src/main/resources/META-INF/rewrite/classpath
What did you expect to see?
A successfully created type table used to pass the unit tests.
What did you see instead?
A failure to run the unit tests
What is the full stack trace of any errors you encountered?
When attempting to write out these values with ASM.
![Image](https://private-user-images.githubusercontent.com/1027334/410552752-a593675b-efc6-4b93-a4ad-bfb924793469.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjkyMTQsIm5iZiI6MTczOTE2ODkxNCwicGF0aCI6Ii8xMDI3MzM0LzQxMDU1Mjc1Mi1hNTkzNjc1Yi1lZmM2LTRiOTMtYTRhZC1iZmI5MjQ3OTM0NjkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMDYyODM0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NjM3YWViYWNjMzY4YzVmNDM1NDY0YjI2ZmUzMzEzYjgyMzc4YzM5YTk4MzgwMjdjZjg3MjE5NzBkM2NjNzQ4ZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.a3rxKPYEtFdQPSyLEYdtGzbHPeh4Snnra_40XzLqYfM)
The text was updated successfully, but these errors were encountered: