You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "David Radley (JIRA)" <ji...@apache.org> on 2017/07/21 15:33:00 UTC

[jira] [Updated] (ATLAS-1980) Improve validations for relationships

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

David Radley updated ATLAS-1980:
--------------------------------
    Summary: Improve validations for relationships  (was: Confusing error ATLAS-400-00-01A "invalid parameters: found null entity)

> Improve validations for relationships
> -------------------------------------
>
>                 Key: ATLAS-1980
>                 URL: https://issues.apache.org/jira/browse/ATLAS-1980
>             Project: Atlas
>          Issue Type: Bug
>            Reporter: David Radley
>            Assignee: David Radley
>
> When I am playing with creating relationship instances I get this error : {
>     "errorCode": "ATLAS-400-00-01A",
>     "errorMessage": "invalid parameters: found null entity"
> }
> This needs to be more descriptive. I have not clue what I have done wrong. The code logic is : 
> "
>  while (entityStream.hasNext()) {
>             AtlasEntity entity = entityStream.next();
>             if (entity == null) {
>                 throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "found null entity");
>             }
> "
> It doesn't not seem we should get the next entity in a stream and it be null . Normally in java collections if hasNext() is true, the next() should give an non null element.  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)