Skip to content
Snippets Groups Projects
Commit 523eeb76 authored by brinn's avatar brinn
Browse files

Be more lenient of what an empty queryEntityType is (null or "" both being OK)...

Be more lenient of what an empty queryEntityType is (null or "" both being OK) as the system may create "" when no entity_type was defined when the query is defined.

SVN: 28319
parent 0200253d
No related branches found
No related tags found
No related merge requests found
...@@ -25,6 +25,7 @@ import java.util.Map; ...@@ -25,6 +25,7 @@ import java.util.Map;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.dao.DataAccessException; import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -144,7 +145,7 @@ public class QueryServer extends AbstractServer<IQueryServer> implements IQueryS ...@@ -144,7 +145,7 @@ public class QueryServer extends AbstractServer<IQueryServer> implements IQueryS
{ {
final String queryEntityTypeCodePatternOrNull = final String queryEntityTypeCodePatternOrNull =
query.getEntityTypeCodePattern(); query.getEntityTypeCodePattern();
if (queryEntityTypeCodePatternOrNull == null if (StringUtils.isEmpty(queryEntityTypeCodePatternOrNull)
|| entityTypeCode.matches(queryEntityTypeCodePatternOrNull)) || entityTypeCode.matches(queryEntityTypeCodePatternOrNull))
{ {
filtered.add(query); filtered.add(query);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment