-
Notifications
You must be signed in to change notification settings - Fork 230
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
Fix elide-model-config build warnings #1971
base: master
Are you sure you want to change the base?
Conversation
b72df48
to
6c64ecb
Compare
private Set<String> tags = new LinkedHashSet<>(); | ||
|
||
@JsonProperty("arguments") | ||
@Singular | ||
@Builder.Default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we replacing Singular?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
60cf86f
to
323d96a
Compare
@@ -68,10 +66,10 @@ | |||
private String dbConnectionName; | |||
|
|||
@JsonProperty("isFact") | |||
private Boolean isFact = true; | |||
private Boolean isFact; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aklish are this fields purposely modifiable after building? Or should they all be final?
private Boolean isFact; | |
private final Boolean isFact; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we cannot declare all fields final, because we have inheritance logic
@@ -51,7 +50,6 @@ | |||
@Data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use builder for Jackson deserializer
@Data | |
@JsonDeserialize(builder = Table.TableBuilder.class) | |
@Data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor builders using JsonDeserialize and remove no arg constructors.
public Argument() { | ||
this.values = new LinkedHashSet<>(); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove and replace with JsonDeserialize builder.
public Argument() { | |
this.values = new LinkedHashSet<>(); | |
} |
@@ -33,7 +32,6 @@ | |||
@Data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Data | |
@JsonDeserialize(builder = Argument.ArgumentBuilder.class) | |
@Data |
@@ -48,14 +46,18 @@ | |||
|
|||
@JsonProperty("values") | |||
@JsonDeserialize(as = LinkedHashSet.class) | |||
private Set<String> values = new LinkedHashSet<>(); | |||
private Set<String> values; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private Set<String> values; | |
private final Set<String> values; |
public Dimension() { | ||
this.hidden = false; | ||
this.readAccess = "Prefab.Role.All"; | ||
this.grains = new ArrayList<>(); | ||
this.tags = new LinkedHashSet<>(); | ||
this.values = new LinkedHashSet<>(); | ||
this.arguments = new ArrayList<>(); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public Dimension() { | |
this.hidden = false; | |
this.readAccess = "Prefab.Role.All"; | |
this.grains = new ArrayList<>(); | |
this.tags = new LinkedHashSet<>(); | |
this.values = new LinkedHashSet<>(); | |
this.arguments = new ArrayList<>(); | |
} |
Resolves #1892
Description
Fix Build warnings for elide-model-config
How Has This Been Tested?
Existing tests pass.
License
I confirm that this contribution is made under an Apache 2.0 license and that I have the authority necessary to make this contribution on behalf of its copyright owner.