GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [java] UnnecessaryCaseChange can not detect the case like: foo.equals(bar.toLowerCase()) by Drofff · Pull Request #2662 · pmd/pmd

Conversation

@Drofff

@Drofff Drofff commented Jul 24, 2020

Copy link
Copy Markdown
Contributor

Describe the PR

A check whether toLowerCase() or toUpperCase() method is called in arguments of an equals method has been added.
Also I've refactored some other methods of the class.

Related issues

  • Fixes [java] UnnecessaryCaseChange can not detect the case like: foo.equals(bar.toLowerCase()) #2531

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by travis)
  • Added (in-code) documentation (if needed)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Drofff
[java] UnnecessaryCaseChange can not detect the case like: foo.equals…
b8d878b
…(bar.toLowerCase())
@ghost

ghost commented Jul 24, 2020 •
edited by ghost
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
1 Message
📖 This changeset introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 2 configuration errors.
Full report
✅ This changeset introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 2 configuration errors.
Full report
✅ This changeset introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 2 configuration errors.
Full report
✅ This changeset introduces 0 new violations, 2 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 2 configuration errors.
Full report

Generated by 🚫 Danger

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Drofff
UnnecessaryCaseChangeRule: NullPointerException in constructor fix
d69520f
adangel
adangel requested changes Jul 30, 2020
View reviewed changes

@adangel adangel left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks for the PR!
Please have a look at my comments.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...a/src/main/java/net/sourceforge/pmd/lang/java/rule/errorprone/UnnecessaryCaseChangeRule.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...a/src/main/java/net/sourceforge/pmd/lang/java/rule/errorprone/UnnecessaryCaseChangeRule.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...a/src/main/java/net/sourceforge/pmd/lang/java/rule/errorprone/UnnecessaryCaseChangeRule.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...c/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/UnnecessaryCaseChange.xml Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Drofff
UnnecessaryCaseChangeRule: violation reporting fix
b205806
@Drofff

Drofff commented Jul 30, 2020

Copy link
Copy Markdown
Contributor Author

@adangel thank you for the review! Changed in b205806

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

adangel
adangel reviewed Jul 31, 2020
View reviewed changes
Comment thread ...a/src/main/java/net/sourceforge/pmd/lang/java/rule/errorprone/UnnecessaryCaseChangeRule.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Drofff
UnnecessaryCaseChangeRule: nested expressions traversing fix
eca547b
@adangel adangel self-assigned this Aug 16, 2020
@adangel adangel added this to the 6.27.0 milestone Aug 16, 2020
adangel
adangel approved these changes Aug 16, 2020
View reviewed changes
adangel added a commit that referenced this pull request Aug 16, 2020
@adangel
[doc] Update release notes, fixes #2531, refs #2662
7a62f0b
adangel added a commit that referenced this pull request Aug 16, 2020
@adangel
Merge branch 'pr-2662' into master
44b5f9e
[java] UnnecessaryCaseChange can not detect the case like: foo.equals(bar.toLowerCase()) #2662
@adangel
adangel merged commit eca547b into pmd:master Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@adangel adangel adangel approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@adangel adangel

Labels

None yet

Projects

None yet

Milestone

6.27.0

Development

Successfully merging this pull request may close these issues.

[java] UnnecessaryCaseChange can not detect the case like: foo.equals(bar.toLowerCase())

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Drofff @adangel
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.