[ 
https://issues.apache.org/jira/browse/GROOVY-12133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18093862#comment-18093862
 ] 

ASF GitHub Bot commented on GROOVY-12133:
-----------------------------------------

testlens-app[bot] commented on PR #2669:
URL: https://github.com/apache/groovy/pull/2669#issuecomment-4887026466

   ## 🚨 TestLens detected 1 failed test 🚨
   
   Here is what you can do:
   
   1) Inspect the test failures carefully.
   2) If you are convinced that some of the tests are flaky, you can mute them 
below.
   3) Finally, trigger a rerun by checking the rerun checkbox.
   
   ### Test Summary
   
   #### [Build and test / lts \(21, 
ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/28749165886/job/85245172749?pr=2669)
 > :groovy-jmx:test
   
   | Test | Runs |
   |---|---|
   | JmxTest > testTomcat\(\) | ❌ |
   
   🏷️ Commit: c807c6edd448a0eb836f4dd83d6592fa6c5e712f
   ▶️ Tests:  21019 executed
   🟡 Checks: 5/29 completed
   
   ### Test Failures
   
   <details>
   
   <summary><strong>JmxTest > testTomcat()</strong> (:groovy-jmx:test in <a 
href="https://github.com/apache/groovy/actions/runs/28749165886/job/85245172749?pr=2669";>Build
 and test / lts (21, ubuntu-latest)</a>)</summary>
   
   ```
   org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
failed:
   TestScriptee76e6c620754dda853b13d3b22df94e.groovy: 13: unable to resolve 
class org.jfree.chart.ChartFactory
    @ line 13, column 20.
                  import org.jfree.chart.ChartFactory
                         ^
   
   TestScriptee76e6c620754dda853b13d3b22df94e.groovy: 14: unable to resolve 
class org.jfree.data.category.DefaultCategoryDataset
    @ line 14, column 20.
                  import org.jfree.data.category.DefaultCategoryDataset as 
Dataset
                         ^
   
   TestScriptee76e6c620754dda853b13d3b22df94e.groovy: 15: unable to resolve 
class org.jfree.chart.plot.PlotOrientation
    @ line 15, column 20.
                  import org.jfree.chart.plot.PlotOrientation as Orientation
                         ^
   
   3 errors
   
        at 
org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:333)
        at 
org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:989)
        at 
org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:749)
        at 
org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:723)
        at 
groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:423)
        at 
groovy.lang.GroovyClassLoader.lambda$parseClass$3(GroovyClassLoader.java:364)
        at 
org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:143)
        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:364)
        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:348)
        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:308)
        at 
gls.CompilableTestSupport.shouldCompile(CompilableTestSupport.groovy:95)
        at 
java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at 
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:502)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:298)
        at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1684)
        at JmxTest.testTomcat(JmxTest.groovy:137)
   ```
   
   </details>
   
   ### Muted Tests
   > [!NOTE]
   > Checks are currently running using the configuration below.
   
   Select tests to mute in this pull request:
   
   🔲 JmxTest > testTomcat\(\) <!

> Implement findBalanced utility to support Regex Balanced Groups
> ---------------------------------------------------------------
>
>                 Key: GROOVY-12133
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12133
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Daniel Sun
>            Priority: Major
>             Fix For: 6.0.0-beta-1
>
>
> *Context*
> Java's native regex engine lacks C#-style balanced group support (pushdown 
> automaton). This makes parsing infinitely nested structures (e.g., nested 
> parentheses, HTML tags, or code blocks) notoriously difficult, often leading 
> to ReDoS (Regular Expression Denial of Service) vulnerabilities if solved 
> purely via regex.
> *Proposed Solution*
> Introduce a highly optimized {{findBalanced}} method. It should use a 
> single-pass, stack-based scanner with dynamic subsumption (tail-absorption) 
> to mimic C# balanced group behavior while guaranteeing O(N) performance.
> *Acceptance Criteria*
>  * *Core Extraction:* Correctly extracts the balanced groups from deeply 
> nested strings (e.g., {{(A + (B * C))}} extracts the entire block).
>  * *Fault Tolerance:* Gracefully handles malformed/dangling boundaries 
> (unmatched open or close tags) without polluting the stack or crashing.
>  * *Ignore Options:* Supports an {{ignoreRegex}} configuration to safely 
> bypass escaped boundaries or string literals (e.g., ignoring {{"{}"}} inside 
> quotes).
>  * *Edge Stripping:* Supports an {{includeEdges}} configuration to optionally 
> strip the outer boundary tags from the result.
>  * *Performance:* Must guarantee strict O(N) time complexity. No 
> backtracking, recursion, or expensive sorting operations are allowed.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to