Skip to content

Normalize usage of this #116

Description

@sanderploegsma

It would be nice if the representer was able to normalize code such as the following two snippets into the same representation:

class SomeClass {
    private String someField = "";

    String getSomeField() {
        return someField;
    }

    void setSomeField(String someField) {
        this.someField = someField;
    }
}
class SomeClass {
    private String someField = "";

    String getSomeField() {
        return this.someField;
    }

    void setSomeField(String someField) {
        this.someField = someField;
    }
}

Right now, these variants both get their own representation because one uses this in getSomeField() while the other one doesn't. The easiest way to normalize would be to always add this when referencing instance fields or methods, since removing it will result in invalid code for setSomeField().

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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