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

New rule: Avoid String.valueOf(arg) where arg is a String #132

Open
dgroup opened this issue Apr 26, 2022 · 0 comments
Open

New rule: Avoid String.valueOf(arg) where arg is a String #132

dgroup opened this issue Apr 26, 2022 · 0 comments
Assignees
Labels

Comments

@dgroup
Copy link
Owner

dgroup commented Apr 26, 2022

Summary

Key Value
Rule AvoidStringValueOfForStringArg
Ruleset io/github/dgroup/arch4u/pmd/....xml
Category Error Prone
Framework ...
Since 0.3.+
Incidents in past at my experience 2+
Template false

Rule definition

<rule name="AvoidStringValueOfForStringArg"
      since="0.3.+"
      language="java"
      externalInfoUrl="https://github.com/dgroup/arch4u-pmd/discussions/..."
      message="...: https://github.com/dgroup/arch4u-pmd/discussions/..."
      class="io.github.dgroup.arch4u.pmd....">
    <priority>3</priority>
    <properties>
      <property name="types" value="java.lang.String|..."/>
    </properties>
</rule>

Why?

.consumes(String.valueOf(MediaType.APPLICATION_JSON))
@dgroup dgroup self-assigned this Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant