| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
@wengyingjian I think the current Junction expression is (A and not(isInterface())) or (B and not(isInterface())) or ... Is my understanding right? |
Sorry, something went wrong.
|
I think original request is all things should be not an interface. First or last are not accurate. It should use and with all other condition or before all other checks run. |
Sorry, something went wrong.
|
Yes, because I didn't find a place that required modifying the bytecode for interfaces, I think all matching rules should be non-interface based. If that's the case, adding and (not isInterface) in the for loop is indeed a safer approach. Additionally, I've noticed that some custom IndirectMatch instances include not interface, while some do not. |
Sorry, something went wrong.
|
In theory, there is no point to intrument an interface, especially we require to add new field to the target. |
Sorry, something went wrong.
…/apm/agent/core/plugin/PluginFinder.java
I think those are not necessary, but as the bug you are fixing, they may be added as it is. |
Sorry, something went wrong.
I think the logic error is, that the is not interface could be overridden by the or from the 2nd condition, as it is flat. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fix
Add a unit test to verify that the fix works.
Explain briefly why the bug exists and how to fix it.
According to the code principles of net.bytebuddy.matcher.ElementMatcher.Junction:
In the current code, the running effect can only ensure that the first NamedMatch satisfies not isInterface:
(((NamedMatch) and (not(isInterface))) or IndirectMatch) or...IndirectMatch.
After moving not isInterface to the end, the running effect can ensure that all rules satisfy not isInterface:
(((NamedMatch) or (IndirectMatch)) or...IndirectMatch) and not(isInterface).
If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
Update the CHANGES log.