From 773d292b8e0591aae5f92ccfc7d0b89f0d44957d Mon Sep 17 00:00:00 2001 From: Jochen Berger Date: Mon, 13 May 2013 09:40:16 +0200 Subject: [PATCH] fix TYPE filter --- .../src/main/java/com/jayway/jsonpath/Criteria.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/json-path/src/main/java/com/jayway/jsonpath/Criteria.java b/json-path/src/main/java/com/jayway/jsonpath/Criteria.java index 18b84a6f..be238482 100644 --- a/json-path/src/main/java/com/jayway/jsonpath/Criteria.java +++ b/json-path/src/main/java/com/jayway/jsonpath/Criteria.java @@ -205,13 +205,8 @@ public class Criteria { } else if (CriteriaType.TYPE.equals(key)) { Class exp = (Class) expectedVal; - Class act = null; - if (map.containsKey(this.key)) { - Object actVal = map.get(this.key); - if (actVal != null) { - act = actVal.getClass(); - } - } + Class act = actualVal == null ? null : actualVal.getClass(); + if (act == null) { return false; } else {