Field mutability should identify external initialization

Issue #156 new
errt created an issue

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.

Comments (1)

  1. Log in to comment