Skip to content

Field mutability should identify external initialization #16

@florian-kuebler

Description

@florian-kuebler

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions