You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Tom Beerbower (JIRA)" <ji...@apache.org> on 2013/02/25 16:40:13 UTC

[jira] [Updated] (AMBARI-1480) Comparison predicate should account for null values.

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

Tom Beerbower updated AMBARI-1480:
----------------------------------

    Summary: Comparison predicate should account for null values.  (was: Comparison predicate should allow for null values.)
    
> Comparison predicate should account for null values.
> ----------------------------------------------------
>
>                 Key: AMBARI-1480
>                 URL: https://issues.apache.org/jira/browse/AMBARI-1480
>             Project: Ambari
>          Issue Type: Bug
>            Reporter: Tom Beerbower
>            Assignee: Tom Beerbower
>             Fix For: 1.3.0
>
>
> ComparisonPredicate does not allow for null values so we will end up with the following if the predicate is created with a null ...
> {code}
> SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
> java.lang.NullPointerException
> at org.apache.ambari.server.controller.predicate.ComparisonPredicate.compareValueTo(ComparisonPredicate.java:96)
> at org.apache.ambari.server.controller.predicate.EqualsPredicate.evaluate(EqualsPredicate.java:35)
> at org.apache.ambari.server.controller.predicate.AndPredicate.evaluate(AndPredicate.java:68)
> at org.apache.ambari.server.controller.internal.ClusterControllerImpl$ResourceIterator.getNextResource(ClusterControllerImpl.java:472)
> at org.apache.ambari.server.controller.internal.ClusterControllerImpl$ResourceIterator.<init>(ClusterControllerImpl.java:434)
> at org.apache.ambari.server.controller.internal.ClusterControllerImpl$ResourceIterator.<init>(ClusterControllerImpl.java:405)
> at org.apache.ambari.server.controller.internal.ClusterControllerImpl$ResourceIterable.iterator(ClusterControllerImpl.java:398)
> at org.apache.ambari.server.api.query.QueryImpl.execute(QueryImpl.java:139)
> at org.apache.ambari.server.api.handlers.ReadHandler.handleRequest(ReadHandler.java:61)
> at org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:68)
> at org.apache.ambari.server.api.services.HostComponentService.getHostComponents(HostComponentService.java:91)
> {code}
> The API may support "isNull(property)" in the future so the underlying predicates should be made to allow for nulls.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira