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 string concat to text block handling of redundant constructors #1264

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

jjohnstn
Copy link
Contributor

  • fix StringBuffer/StringBuilder to text block support when original code has one or more redundant constructors preceding the first append
  • fix StringBuffer/StringBuilder look-ahead to next constructor statement logic so it doesn't change next constructor to VariableDeclarationStatement if the initial declaration never gets removed (i.e. first concenatation was invalid for conversion)
  • add new test scenarios to CleanUpTest15
  • fixes Cleanup: "Convert String to TextBlock" breaks code #1238

What it does

Fixes more edge-case scenarios discovered by converting test suite to use text blocks.

How to test

See issue or new test scenarios.

Author checklist

- fix StringBuffer/StringBuilder to text block support when original
  code has one or more redundant constructors preceding the first
  append
- fix StringBuffer/StringBuilder look-ahead to next constructor
  statement logic so it doesn't change next constructor to
  VariableDeclarationStatement if the initial declaration never
  gets removed (i.e. first concenatation was invalid for conversion)
- add new test scenarios to CleanUpTest15
- fixes eclipse-jdt#1238
@jjohnstn jjohnstn self-assigned this Mar 16, 2024
@jjohnstn jjohnstn added the bug Something isn't working label Mar 16, 2024
@jjohnstn jjohnstn added this to the 4.32 M1 milestone Mar 16, 2024
@jjohnstn jjohnstn merged commit 448c988 into eclipse-jdt:master Mar 16, 2024
9 checks passed
@jjohnstn jjohnstn deleted the textblockbug6 branch March 16, 2024 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cleanup: "Convert String to TextBlock" breaks code
1 participant