diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-01-03 14:49:42 +0100 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-01-03 14:49:42 +0100 |
commit | 109f5f03539b10121ead67320c333e06eda126f6 (patch) | |
tree | f3f094c30e808243ed8aaa7589ffe4bdbf73a00d /aai-traversal/src/main/java | |
parent | 87cbabb974af4fa9b4777cd54b5cadfc7b9ee3fd (diff) |
Update spring-boot to 2.4
- update spring-boot to 2.4
- add junit vintage engine dependency to keep supporting junit 4 tests
- update mockito to version 3.4.0
Issue-ID: AAI-3681
Change-Id: I8b40529418f9d03179970edf1ab12992db1cb5e8
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'aai-traversal/src/main/java')
-rw-r--r-- | aai-traversal/src/main/java/org/onap/aai/interceptors/pre/RequestTransactionLogging.java | 11 | ||||
-rw-r--r-- | aai-traversal/src/main/java/org/onap/aai/rest/search/CustomQueryConfigDTO.java | 5 |
2 files changed, 4 insertions, 12 deletions
diff --git a/aai-traversal/src/main/java/org/onap/aai/interceptors/pre/RequestTransactionLogging.java b/aai-traversal/src/main/java/org/onap/aai/interceptors/pre/RequestTransactionLogging.java index 8c73033..6bae614 100644 --- a/aai-traversal/src/main/java/org/onap/aai/interceptors/pre/RequestTransactionLogging.java +++ b/aai-traversal/src/main/java/org/onap/aai/interceptors/pre/RequestTransactionLogging.java @@ -31,27 +31,20 @@ import java.util.Random; import java.util.UUID; import javax.annotation.Priority; -import javax.servlet.http.HttpServletRequest; import javax.ws.rs.container.ContainerRequestContext; import javax.ws.rs.container.ContainerRequestFilter; import javax.ws.rs.container.PreMatching; import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; -import org.apache.commons.io.Charsets; -import org.apache.commons.io.IOUtils; -import org.glassfish.jersey.message.internal.ReaderWriter; -import org.glassfish.jersey.server.ContainerException; import org.onap.aai.exceptions.AAIException; import org.onap.aai.interceptors.AAIContainerFilter; import org.onap.aai.interceptors.AAIHeaderProperties; import org.onap.aai.util.AAIConfig; import org.onap.aai.util.AAIConstants; import org.onap.aai.util.HbaseSaltPrefixer; -import org.springframework.util.StringUtils; +import org.springframework.util.ObjectUtils; -// Here @PreMatching @Priority(AAIRequestFilterPriority.REQUEST_TRANS_LOGGING) public class RequestTransactionLogging extends AAIContainerFilter @@ -85,7 +78,7 @@ public class RequestTransactionLogging extends AAIContainerFilter requestContext.getHeaders().putSingle(CONTENT_TYPE, DEFAULT_CONTENT_TYPE); } - if (WILDCARD.equals(acceptType) || StringUtils.isEmpty(acceptType) + if (WILDCARD.equals(acceptType) || ObjectUtils.isEmpty(acceptType) || acceptType.contains(TEXT_PLAIN)) { UriInfo uriInfo = requestContext.getUriInfo(); if (uriInfo != null) { diff --git a/aai-traversal/src/main/java/org/onap/aai/rest/search/CustomQueryConfigDTO.java b/aai-traversal/src/main/java/org/onap/aai/rest/search/CustomQueryConfigDTO.java index 7f90566..38b9b88 100644 --- a/aai-traversal/src/main/java/org/onap/aai/rest/search/CustomQueryConfigDTO.java +++ b/aai-traversal/src/main/java/org/onap/aai/rest/search/CustomQueryConfigDTO.java @@ -40,8 +40,7 @@ package org.onap.aai.rest.search; */ import com.fasterxml.jackson.annotation.JsonProperty; - -import org.springframework.util.StringUtils; +import org.springframework.util.ObjectUtils; public class CustomQueryConfigDTO { @@ -53,7 +52,7 @@ public class CustomQueryConfigDTO { public CustomQueryDTO getQueryDTO() { if (queryDTO == null) queryDTO = new CustomQueryDTO(); - if (!StringUtils.isEmpty(storedQuery)) { + if (!ObjectUtils.isEmpty(storedQuery)) { queryDTO.setQuery(storedQuery); } return queryDTO; |