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

JIRA JASSIST-227: include INCREMENT/DECREMENT on case IINC #13

Closed
wants to merge 3 commits into from

Conversation

caot
Copy link

@caot caot commented Jul 17, 2014

No description provided.

@chibash
Copy link
Member

chibash commented Jul 22, 2014

Why is the patch for ClassPool necessary? Could you explain?

@caot
Copy link
Author

caot commented Jul 22, 2014

int i = 0;
i1 += 5;
i1 -= 5;

the related bytecode:
Code:
0: iconst_0
1: istore_3
2: iinc 2, 5
5: iinc 2, -5

Obviously, the javassist ignjored the increament/decreament (5/-5), and
generated the following:

Code:
0: iconst_0
1: istore_3
2: iinc 2
5: iinc 2

On Mon, Jul 21, 2014 at 10:35 PM, Shigeru Chiba notifications@github.com
wrote:

Why is the patch for ClassPool necessary? Could you explain?


Reply to this email directly or view it on GitHub
#13 (comment)
.

@chibash
Copy link
Member

chibash commented Jul 23, 2014

That part is fine. I'm wondering about the necessity of the patch "classes of java.lang".

@caot
Copy link
Author

caot commented Jul 23, 2014

Otherwise, any classname under package java.lang will throw Exception in
the call of "get0(classname, true)" for it is not in classpool.

On Tue, Jul 22, 2014 at 9:24 PM, Shigeru Chiba notifications@github.com
wrote:

That part is fine. I'm wondering about the necessity of the patch "classes
of java.lang".


Reply to this email directly or view it on GitHub
#13 (comment)
.

@chibash
Copy link
Member

chibash commented Jul 23, 2014

Really? I could not reproduce that bug. Maybe because ClassPath is not appropriately given.

@chibash
Copy link
Member

chibash commented Jul 23, 2014

I've merged the first patch (d267e47).
Thank you!

@chibash chibash closed this Jul 23, 2014
@caot
Copy link
Author

caot commented Jul 23, 2014

To reproduce the bug through the return type String or other class under
package java.lang of a method.

On Wed, Jul 23, 2014 at 6:16 AM, Shigeru Chiba notifications@github.com
wrote:

I've merged the first patch (d267e47
d267e47).
Thank you!


Reply to this email directly or view it on GitHub
#13 (comment)
.

@chibash
Copy link
Member

chibash commented Jul 23, 2014

I did but I couldn't see the problem. Can you show me a program for reproduction?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants