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

Annotation Arguments Change #60

Open
braxtonhall opened this issue Feb 19, 2021 · 1 comment
Open

Annotation Arguments Change #60

braxtonhall opened this issue Feb 19, 2021 · 1 comment

Comments

@braxtonhall
Copy link
Collaborator

At the moment any change to an annotation is just seen as a Yannotationchange, but to get a finer grained look, we could introduce a Yannotationargumentschange for when an argument to a parameterized annotation changes.

This may require changing Yannotationchange to hold onto a list of Yannotations that each have their own arguments instead of just a single string.

Example from @ishtiaque05

@JsonSerializable
public class Person {
    @JsonElement
    private String firstName;
    @JsonElement
    private String lastName;
    @JsonElement(key = "personAge")
    private String age;
    private String address;
    @Init
    private void initNames() {
        this.firstName = this.firstName.substring(0, 1).toUpperCase() 
          + this.firstName.substring(1);
        this.lastName = this.lastName.substring(0, 1).toUpperCase() 
          + this.lastName.substring(1);
    }
    // Standard getters and setters
}

In this example, "personAge" may change. This change would be kept as an Yannotationargschange

@braxtonhall
Copy link
Collaborator Author

Also an example from one of our own test cases:
apache/flink@6ba5fcd

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

No branches or pull requests

1 participant