You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@aurora.apache.org by "John Sirois (JIRA)" <ji...@apache.org> on 2016/03/28 00:14:25 UTC

[jira] [Assigned] (AURORA-1650) I* entity objects have incorrect isSet* methods for collection types

     [ https://issues.apache.org/jira/browse/AURORA-1650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Sirois reassigned AURORA-1650:
-----------------------------------

    Assignee: John Sirois

> 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)