diff options
Diffstat (limited to 'aai-traversal/src/main/java')
-rw-r--r-- | aai-traversal/src/main/java/org/onap/aai/rest/QueryConsumer.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/aai-traversal/src/main/java/org/onap/aai/rest/QueryConsumer.java b/aai-traversal/src/main/java/org/onap/aai/rest/QueryConsumer.java index b5f2658..9e7edeb 100644 --- a/aai-traversal/src/main/java/org/onap/aai/rest/QueryConsumer.java +++ b/aai-traversal/src/main/java/org/onap/aai/rest/QueryConsumer.java @@ -70,6 +70,8 @@ import com.google.gson.JsonParser; @Path("{version: v9|v1[012]}/query") public class QueryConsumer extends RESTAPI { + + private static final String DEPTH = "depth"; /** The introspector factory type. */ private ModelType introspectorFactoryType = ModelType.MOXY; @@ -183,8 +185,8 @@ public class QueryConsumer extends RESTAPI { public void checkQueryParams(MultivaluedMap<String, String> params) throws AAIException { - if (params.containsKey("depth") && params.getFirst("depth").matches("\\d+")) { - String depth = params.getFirst("depth"); + if (params.containsKey(DEPTH) && params.getFirst(DEPTH).matches("\\d+")) { + String depth = params.getFirst(DEPTH); Integer i = Integer.parseInt(depth); if (i > 1) { throw new AAIException("AAI_3303"); |