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

fixed for setters which has returns, such as chained setter #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wangzaixiang
Copy link

No description provided.

@wangzaixiang
Copy link
Author

e.g.

class User {

  public User setName(String name) {
     this.name = name;
     return this;
  }
}

The BulkBean.create not works for such as a class, the generated class can’t pass the JVM verify, and will generate more classes on next calls, that makes the JVM perm space OOM.

So this patch fix the problem.

@huang-gz
Copy link

huang-gz commented Apr 24, 2019

 BulkBean mClass = BulkBean.create(User.class, gettersTestAll, settersTestAll, typesTestAll);

This works fine when the code is running in spring-boot, but running it alone will give you an error
in spring-boot

User user = new User();
BulkBean mClass = BulkBean.create(User.class, gettersTestAll, settersTestAll, typesTestAll);
mClass.setPropertyValues(user, args);

mClass.setPropertyValues(user, args); will fail
Do you know why? How to solve, thanks

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