Skip to content
New issue

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

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

Already on GitHub? # to your account

Fails to inject array-typed fields, or getters/setters for array-typed fields #1879

Closed
Xylus opened this issue Jun 28, 2016 · 0 comments · Fixed by #1880
Closed

Fails to inject array-typed fields, or getters/setters for array-typed fields #1879

Xylus opened this issue Jun 28, 2016 · 0 comments · Fixed by #1880
Assignees
Labels
Milestone

Comments

@Xylus
Copy link
Contributor

Xylus commented Jun 28, 2016

https://groups.google.com/forum/#!topic/pinpoint_user/-PutLtVn5rc

When injecting array-typed fields:
The agent currently invokes Class.getName() on the field's type to generate the field signature when injecting a field into a class. The getName() method on an array class returns a form not suitable for generating signatures (ie int[] -> [I).

When adding getter/setter for array-typed fields
Type checking is done by comparing Javassist's CtClass.getName() and Class.getName(). This comparison fails for array classes due to reason similar to above.
For an array of int, CtClass.getName() returns int[] whereas Class.getName() again returns [I, failing the check.

@Xylus Xylus added the bug label Jun 28, 2016
@Xylus Xylus added this to the 1.6.0 milestone Jun 28, 2016
@Xylus Xylus self-assigned this Jun 28, 2016
Xylus added a commit to Xylus/pinpoint that referenced this issue Jun 29, 2016
Xylus added a commit to Xylus/pinpoint that referenced this issue Jun 29, 2016
Xylus added a commit to Xylus/pinpoint that referenced this issue Jun 29, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant