add line before binding and it's related #27
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
第一次提交PR,有描述不清楚的地方还请见谅并沟通,thanks
两个主要改动:
在
Location
基类中增加了filtered
的标记,代表该Location
被Matcher
处理后,是否被LocationFilter
过滤掉添加
BeforeLine
类型的Binding
及相关的Matcher
为什么需要暴露是否被过滤掉的状态呢?
InterceptorProcessor#process
)时发现如果没有明确出 匹配失败 和 被过滤 两种状态的话,在外层逻辑上没法做对应的处理(Arthas中无法判定是否需要注册listener)为什么需要定义一个BeforeLine呢?用Line不行嘛?
Binding
时行号传递: Line使用了LineNumberNode
中的行号,当我需要在 方法退出前 进行插入时,这边使用了-1来代表这个位置,所以Line无法给到-1这个值,在注册监听器时,这是个问题LocationFilter
过滤问题:LineLocationMatcher
目前是没有应用过滤的,也就是会导致重复增强LineLocationMatcher
时候会尝试增强多个相同行号,LineBeforeLocationMatcher
通过只取最前的一个来规避这个问题thanks again