[ 
https://issues.apache.org/jira/browse/AURORA-1650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15213642#comment-15213642
 ] 

John Sirois commented on AURORA-1650:
-------------------------------------

https://reviews.apache.org/r/45366/

> I* entity objects have incorrect isSet* methods for collection types
> --------------------------------------------------------------------
>
>                 Key: AURORA-1650
>                 URL: https://issues.apache.org/jira/browse/AURORA-1650
>             Project: Aurora
>          Issue Type: Bug
>          Components: Build, Scheduler
>            Reporter: John Sirois
>            Assignee: John Sirois
>
> For example, in {{ITaskQuery}} the {{taskIds}} set is populated like so:
> {noformat}
> this.taskIds = wrapped.isSetTaskIds()
>         ? ImmutableSet.copyOf(wrapped.getTaskIds())
>         : ImmutableSet.of();
> {noformat}
> And the {{isSet}} impl looks like so:
> {noformat}
> public boolean isSetTaskIds() {
>   return taskIds != null;
> }
> {noformat}
> So {{isSet}} for collections will always return {{true}}.  It seems the 
> generated {{isSet}} methods should only return true for non-empty collections 
> or else these {{isSet}} methods should be eliminated altogether.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to