Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return type is ignored in the 'type' check #517

Closed
jbachorik opened this issue Dec 26, 2021 · 0 comments
Closed

Return type is ignored in the 'type' check #517

jbachorik opened this issue Dec 26, 2021 · 0 comments
Assignees
Labels
Milestone

Comments

@jbachorik
Copy link
Collaborator

jbachorik commented Dec 26, 2021

When using the following probe definition

@OnMethod(clazz = "myClass", method = "/.*/", type = "long (int, java.lang.String)")
public static void onMethod(int arg1, String arg2) {
...
}

because of the missing constraint on the method return type (the probe is not capturing the return value) BTrace will match any target method using only the argument types, in spite of the user specifying the required return type.

The solution is to add the compatibility check for the return value type when the 'type' check is used.

@jbachorik jbachorik added the Core label Dec 26, 2021
@jbachorik jbachorik added this to the 2.2.1 milestone Dec 26, 2021
@jbachorik jbachorik self-assigned this Dec 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant