diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-02-05 17:29:33 +0100 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-02-06 09:05:05 +0100 |
commit | 2ee4fd4b1c4436f2f295bc6f2eb566cdf0200464 (patch) | |
tree | eea856e09ea81eac60c2c87d4cbed7c0a9d75701 /aai-resources/src/main/java/org | |
parent | 8157f311a60aff0889f32d060312b24ec816d061 (diff) |
Update aai-common to 1.13.3 in resources
- update to 1.13.3 that contains fix for TraversalURIOptimizedQuery building
- disable tracing in tests
- disable log lines for schema generation in tests
Issue-ID: AAI-3761
Change-Id: Ifbe1a4ca716e73c1722c1368dc55719b23fe101a
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'aai-resources/src/main/java/org')
-rw-r--r-- | aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java b/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java index c685071..4912a00 100644 --- a/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java +++ b/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java @@ -290,9 +290,8 @@ public class LegacyMoxyConsumer extends RESTAPI { Introspector obj = loader.introspectorFromName(objType); DBRequest request = new DBRequest.Builder(HttpMethod.GET, uriObject, uriQuery, obj, headers, info, transId).build(); - List<DBRequest> requests = new ArrayList<>(); - requests.add(request); - if (resultIndex != null && !"-1".equals(resultIndex) && resultSize != null && !"-1".equals(resultSize)) { + List<DBRequest> requests = Collections.singletonList(request); + if (hasValidPaginationParams(resultIndex, resultSize)) { traversalUriHttpEntry.setPaginationIndex(Integer.parseInt(resultIndex)); traversalUriHttpEntry.setPaginationBucket(Integer.parseInt(resultSize)); } @@ -320,6 +319,10 @@ public class LegacyMoxyConsumer extends RESTAPI { return response; } + private boolean hasValidPaginationParams(String resultIndex, String resultSize) { + return resultIndex != null && !"-1".equals(resultIndex) && resultSize != null && !"-1".equals(resultSize); + } + private MultivaluedMap<String, String> removeNonFilterableParams(MultivaluedMap<String, String> params) { String[] toRemove = @@ -554,7 +557,7 @@ public class LegacyMoxyConsumer extends RESTAPI { .build(); List<DBRequest> requests = new ArrayList<>(); requests.add(request); - if (resultIndex != null && !"-1".equals(resultIndex) && resultSize != null && !"-1".equals(resultSize)) { + if (hasValidPaginationParams(resultIndex, resultSize)) { traversalUriHttpEntry.setPaginationIndex(Integer.parseInt(resultIndex)); traversalUriHttpEntry.setPaginationBucket(Integer.parseInt(resultSize)); } |