Skip to content

Fix: remove repeat argsLength matcher in MethodMatcherConvert - #354

Open
mawen12 wants to merge 1 commit into
megaease:masterfrom
mawen12:fix-duplicate-argslength-matcher
Open

Fix: remove repeat argsLength matcher in MethodMatcherConvert#354
mawen12 wants to merge 1 commit into
megaease:masterfrom
mawen12:fix-duplicate-argslength-matcher

Conversation

@mawen12

@mawen12 mawen12 commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

The removed code in MethodMatcherConvert duplicates lines 105-108. All of these lines check if argsLength >= 0, then pass the length to the Byte Buddy takesArguments(int) method.

This issue is highlighted in the test com.megaease.easeagent.core.matcher.MethodMatcherTest#testMatcher.

MethodMatcherTest#testMatcher

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR removes a duplicated argsLength matcher block in MethodMatcherConvert, ensuring takesArguments(int) is applied only once when argsLength >= 0, as surfaced by MethodMatcherTest#testMatcher.

Changes:

  • Removed a redundant matcher.getArgsLength() >= 0 / takesArguments(...) block that duplicated existing logic in MethodMatcherConvert.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants