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

Fix static mode visibility injection when annotation present #622

Merged
merged 3 commits into from
Jan 10, 2023

Conversation

sampottinger
Copy link
Collaborator

Closes #619 - There is a problem with adding public to members when wrapping in “static” mode processing sketches introduced by removing the leading space in #609. Requires preproc to look for leading annnotations before injecting visibility modifier. Apologies @benfry and @knupel.

@sampottinger sampottinger marked this pull request as ready for review December 10, 2022 17:31
@@ -591,7 +591,7 @@ public void exitMethodDeclaration(ProcessingParser.MethodDeclarationContext ctx)
if (annoationPoint == null) {
insertBefore(possibleModifiers.getStart(), "public ");
} else {
insertAfter(annoationPoint.getStop(), "public ");
insertAfter(annoationPoint.getStop(), " public ");
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@benfry this is the actual fix. Everything else in this PR is just adding additional tests to prevent regressions.

@sampottinger sampottinger changed the title Fix static mode annotation injection. Fix static mode visibility injection when annotation present Dec 10, 2022
@benfry benfry merged commit 859984b into main Jan 10, 2023
@benfry benfry deleted the preproc-annotations-fix branch January 10, 2023 02:39
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cannot use @Override and @Deprecated in static mode
2 participants