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

Field mutability should identify external initialization #16

Open
florian-kuebler opened this issue Jan 7, 2020 · 0 comments
Open

Field mutability should identify external initialization #16

florian-kuebler opened this issue Jan 7, 2020 · 0 comments

Comments

@florian-kuebler
Copy link
Collaborator

Taken from Bitbucket#156

Sometimes, effectively final fields are not initialized via a constructor, but via direct assignments on a newly created, not yet escaped object. This pattern is common e.g. for implementing clone:

int i;

public Foo clone(){
Foo f = new Foo();
f.i = i;
return f;
}

Identifying such patters would improve the precision of the field mutability analysis.

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

No branches or pull requests

1 participant