Skip to content

Commit

Permalink
Merge pull request #520 from gradle/asodja/another-lambda-fix
Browse files Browse the repository at this point in the history
Another fix to lambda pattern regex
  • Loading branch information
asodja authored Dec 1, 2023
2 parents ececa6b + bc3cff0 commit 0a62f87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public List<String> map(List<String> stack) {

private static class NormalizeLambda extends FrameWiseSanitizeFunction {

private static final Pattern LAMBDA_PATTERN = Pattern.compile(Pattern.quote("$$Lambda$") + "(?:[0-9]+[./][0-9]+|x[0-9a-fA-F]+)");
private static final Pattern LAMBDA_PATTERN = Pattern.compile(Pattern.quote("$$Lambda$") + "[0-9]+[./][0-9]+(?:x[0-9a-fA-F]+)?");

@Override
protected String mapFrame(String frame) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class FlameGraphSanitizerTest extends Specification {
expect:
normalizer.map(['DefaultPlanExecutor$ExecutorWorker$$Lambda$887.1827771163.execute']) == ['DefaultPlanExecutor$ExecutorWorker$$Lambda$.execute']
normalizer.map(['DefaultPlanExecutor$ExecutorWorker$$Lambda$887/1827771163.execute']) == ['DefaultPlanExecutor$ExecutorWorker$$Lambda$.execute']
normalizer.map(['DefaultPlanExecutor$ExecutorWorker$$Lambda$x00007fd5410e0c68.execute']) == ['DefaultPlanExecutor$ExecutorWorker$$Lambda$.execute']
normalizer.map(['DefaultPlanExecutor$ExecutorWorker$$Lambda$92.0x00007f9338139800.execute']) == ['DefaultPlanExecutor$ExecutorWorker$$Lambda$.execute']
}
}

0 comments on commit 0a62f87

Please sign in to comment.