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
Static inner classes can be manipulated by javassist #12
Conversation
@barthel @drochetti, I added the first unit tests with this commit as well. Sorry to have merged them with the current PR. So this PR also addresses issue #11. |
@stephanenicolas Thx for your work. I don't like to instrument inner classes by default in respect to the javassist documentation.
in http://www.csg.ci.i.u-tokyo.ac.jp/~chiba/javassist/tutorial/tutorial2.html (chapter 4.7). But perhaps we build a extended (configurable) transformer or a class file iterator implementation for doing so. |
Hi @barthel, I pushed a commit that makes this behavior optional, and defaults to not From a technical point of view, I believe the page you mentioned to be I fixed the code, docs and tests to take this change into account. S. 2014-05-19 17:36 GMT+02:00 barthel notifications@github.com:
|
@stephanenicolas |
Static inner classes can be manipulated by javassist
Thx for merging. I got 2 requests for you : 1) is to release on central and 2) is to add a PS : I would happily join the contributor team if there is some room left. S. |
More details on the static vs non static : |
In my company already runs a CI environment.
Please check and fix these tests. |
Hi @barthel, I could not reproduce the failing test, they all passed on my side. Can you be more precise about what breaks ? Any full stack trace ? I really S. 2014-05-19 23:12 GMT+02:00 barthel notifications@github.com:
|
If u like, create a travis CI.
|
I am working on it. I think I got it. I will update the PR and let you know Btw, I will also add a travis script. Would you mind to activate on the S. 2014-05-19 23:33 GMT+02:00 barthel notifications@github.com:
|
It will work with the last commit of the PR : Empty folders are not stored in a git tree, I had to create empty files in Travis script works for the project. Can you enable it ? Stéphane 2014-05-19 23:52 GMT+02:00 Stéphane NICOLAS steff.nicolas@gmail.com:
|
@stephanenicolas Thx for fixing the tests and enable travis. I would like to go the github way and work with PR. |
What do you mean by "Supports travis Java 6" ? @barthel , btw, I think we were wrong with the support for inner classes : they are even more supported than what I thought and it should not be an option. I got some details from the author of javassist : S. 2014-05-20 6:49 GMT+02:00 barthel notifications@github.com:
|
Thx @stephanenicolas for clarify the support of inner/nested classes.
I've not read the documentation on travis-ci.org. |
Yes it does, but why should we use it to build and pass tests ? |
I need a Java 6 compiled plugin. Btw. the source settings of the compiler plugin aren't set also. https://travis-ci.org/icon-Systemhaus-GmbH/javassist-maven-plugin#L1463 |
The static inner classes can be manipulated, but the non static inner classes can't (limitation of javassist documented in the plugin code).
This commit allows ClassTransformers to transform all inner classes, I think the javassist APIs don't allow to check wether a class is an inner class or not, and neither to check if an inner class is static or not.
Nevertheless, I needed to be able to transform static inner classes and I achieved to do it with the plugin thanks to this change.
Would you accept the PR ?