You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2014/05/29 00:43:06 UTC
git commit: AMBARI-5799. Add filter by regex and sort capabilities to
API. Fix for ClassCastException. (swagle)
Repository: ambari
Updated Branches:
refs/heads/trunk 60436ae70 -> c36bbc564
AMBARI-5799. Add filter by regex and sort capabilities to API. Fix for ClassCastException. (swagle)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c36bbc56
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c36bbc56
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c36bbc56
Branch: refs/heads/trunk
Commit: c36bbc564347cfbff6fe24583693045cac510d3e
Parents: 60436ae
Author: Siddharth Wagle <sw...@hortonworks.com>
Authored: Wed May 28 15:42:55 2014 -0700
Committer: Siddharth Wagle <sw...@hortonworks.com>
Committed: Wed May 28 15:42:55 2014 -0700
----------------------------------------------------------------------
.../ambari/server/controller/predicate/FilterPredicate.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/c36bbc56/ambari-server/src/main/java/org/apache/ambari/server/controller/predicate/FilterPredicate.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/predicate/FilterPredicate.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/predicate/FilterPredicate.java
index bf4a51d..e343e80 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/predicate/FilterPredicate.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/predicate/FilterPredicate.java
@@ -49,8 +49,8 @@ public class FilterPredicate extends ComparisonPredicate {
@Override
public boolean evaluate(Resource resource) {
- String propertyValue = (String) resource.getPropertyValue(getPropertyId());
- matcher.reset(propertyValue != null ? propertyValue : emptyString);
+ Object propertyValue = resource.getPropertyValue(getPropertyId());
+ matcher.reset(propertyValue != null ? propertyValue.toString() : emptyString);
return patternExpr == null ?
propertyValue == null :