-
Notifications
You must be signed in to change notification settings - Fork 208
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
Private non-static method can not debug and get "this" field #111
Comments
Hey Mrs. or Mr. Anonymous, modeling non-static private methods with static default-accessible methods is a trick of JANINO:
It is not enough to change accessibility from PRIVATE to PACKAGE, because PRIVATE-accessible methods are non-virtual, and PACKAGE-accessible methods are not. Sorry it breaks IDEA! The idea behind this is to avoid those ridiculous "access$000()" methods that Java generates to make private methods accessible for enclosing and enclosed classes. A very questionable concept anyway, because it pollutes the generated classes, the call stacks, and also adds security vulnerabilities. But I see your point and will think of a way to get around this problem. Stay tuned. |
the code is
When I generate the code by Janino and copy the code to a file
MyTest.java
,and step into thetest
function,I can't look the variablethis
andvalue
in Intellij IDEA.Then I debug the Janino 3.0.0,and find the logical in
UnitCompiler#compile(FunctionDeclarator, ClassFile)
is change the private non-static method to package static method, and add the "this" to the method's first argument."This" in IDEA is this object, but in Janino is the first augument, this cause the problem.
Can U support this debug function :)
The text was updated successfully, but these errors were encountered: