Skip to content

GROOVY-11655: Create extension method to make StringBuilder like a stack#2215

Closed
dongwq wants to merge 0 commit into
apache:masterfrom
dongwq:master
Closed

GROOVY-11655: Create extension method to make StringBuilder like a stack#2215
dongwq wants to merge 0 commit into
apache:masterfrom
dongwq:master

Conversation

@dongwq
Copy link
Copy Markdown
Contributor

@dongwq dongwq commented May 6, 2025

@dongwq dongwq marked this pull request as draft May 6, 2025 15:44
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 6, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.

Project coverage is 68.9955%. Comparing base (5916bc5) to head (d66fd8d).

Files with missing lines Patch % Lines
...g/codehaus/groovy/runtime/StringGroovyMethods.java 66.6667% 3 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##               master      #2215        +/-   ##
==================================================
+ Coverage     68.9931%   68.9955%   +0.0024%     
- Complexity      29660      29665         +5     
==================================================
  Files            1423       1423                
  Lines          114323     114335        +12     
  Branches        19832      19833         +1     
==================================================
+ Hits            78875      78886        +11     
- Misses          28815      28816         +1     
  Partials         6633       6633                
Files with missing lines Coverage Δ
...g/codehaus/groovy/runtime/StringGroovyMethods.java 83.0769% <66.6667%> (-0.1262%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@paulk-asert
Copy link
Copy Markdown
Contributor

Nice idea, but personally, I am unsure whether it is compelling enough to be added to Groovy. I will provide some comments anyway.

Comment thread src/main/java/org/codehaus/groovy/runtime/StringGroovyMethods.java Outdated
Comment thread src/main/java/org/codehaus/groovy/runtime/StringGroovyMethods.java Outdated
Comment thread src/main/java/org/codehaus/groovy/runtime/StringGroovyMethods.java Outdated
@dongwq dongwq marked this pull request as ready for review May 7, 2025 02:31
@eric-milles
Copy link
Copy Markdown
Member

eric-milles commented May 7, 2025

I don't think there is much general value in providing "stack of chars" semantic. You can always provide these for your own projects through extension or category class.

@dongwq
Copy link
Copy Markdown
Contributor Author

dongwq commented May 8, 2025

I don't think there is much general value in providing "stack of chars" semantic. You can always provide these for your own projects through extension or category class.

@eric-milles ,
the issue try to solve the basic Use Case of String:

  • in algorithms where you need to modify strings dynamically, such as backtracking or parsing tasks.

given some examples code here: https://issues.apache.org/jira/browse/GROOVY-11655

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants