[java] Remove usages of getImage in java module#4352
Closed
oowekyala wants to merge 21 commits into
Closed
Conversation
- parse value only once - dont create garbage strings when parsing - cache boxed value properly
adangel
requested changes
Jan 30, 2023
adangel
left a comment
Member
There was a problem hiding this comment.
There are a couple of test failures:
[ERROR] Tests run: 6410, Failures: 38, Errors: 0, Skipped: 4
Can you have a look at this? Thanks!
Comment on lines
36
to
37
| @Deprecated | ||
| public String getImage() { |
Member
There was a problem hiding this comment.
Would that be something, we keep deprecated in PMD 7? Or do we remove it?
Member
Author
There was a problem hiding this comment.
I'm not sure... If we remove it then the image will not be available in XPath rules (although there is @ConstValue which is slightly different). OTOH I want to avoid java rules using the image instead of the text if possible...
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
Make CharSequence an acceptable XPath attribute type, so that @LiteralText (Chars) is accessible
getImage is now deprecated in pmd-java and always returns null
adangel
added a commit
to adangel/pmd
that referenced
this pull request
Dec 14, 2023
- This improves ASTLiteral implementation - Adds ASTLiteral#getLiteralText() - not yet exposed as XPath attribute Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
adangel
added a commit
to adangel/pmd
that referenced
this pull request
Dec 14, 2023
- taken from pmd#4352 (avoid getImage()) - Exposes @LiteralText for ASTLiteral Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the PR
Related issues
Node::getImage#4318Ready?
./mvnw clean verifypasses (checked automatically by github actions)