summaryrefslogtreecommitdiffstats
path: root/aai-resources/src/main/java/org
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-10-19 11:54:55 +0200
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-10-19 11:54:55 +0200
commitbe4c967659e73814dc14d9c144b8ad4156af4aca (patch)
treed07134dbd0c024d72595c7cfb17b5079449b160e /aai-resources/src/main/java/org
parent53208e359d28bebe8dc5116d295b19dba7010d68 (diff)
Upgrade spring-boot to 2.4
- update spring-boot to latest available 2.4.X release - Content-Type's on GET requests now result in 415 (instead of being ignored) which necessitates changes to the ConfigurationTest Issue-ID: AAI-3667 Change-Id: If6cbce8185b443a79b5e3b32fa3ffede5cabee60 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/interceptors/post/InvalidResponseStatus.java5
-rw-r--r--aai-resources/src/main/java/org/onap/aai/interceptors/pre/RequestTransactionLogging.java2
-rw-r--r--aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java1
3 files changed, 4 insertions, 4 deletions
diff --git a/aai-resources/src/main/java/org/onap/aai/interceptors/post/InvalidResponseStatus.java b/aai-resources/src/main/java/org/onap/aai/interceptors/post/InvalidResponseStatus.java
index 61ada79..1d20744 100644
--- a/aai-resources/src/main/java/org/onap/aai/interceptors/post/InvalidResponseStatus.java
+++ b/aai-resources/src/main/java/org/onap/aai/interceptors/post/InvalidResponseStatus.java
@@ -33,6 +33,7 @@ import javax.ws.rs.core.MediaType;
import org.onap.aai.exceptions.AAIException;
import org.onap.aai.interceptors.AAIContainerFilter;
import org.onap.aai.logging.ErrorLogHelper;
+import org.springframework.http.HttpStatus;
@Priority(AAIResponseFilterPriority.INVALID_RESPONSE_STATUS)
public class InvalidResponseStatus extends AAIContainerFilter implements ContainerResponseFilter {
@@ -41,9 +42,9 @@ public class InvalidResponseStatus extends AAIContainerFilter implements Contain
public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext)
throws IOException {
- if (responseContext.getStatus() == 405) {
+ if (responseContext.getStatus() == HttpStatus.METHOD_NOT_ALLOWED.value()) {
- responseContext.setStatus(400);
+ responseContext.setStatus(HttpStatus.BAD_REQUEST.value());
AAIException e = new AAIException("AAI_3012");
ArrayList<String> templateVars = new ArrayList<>();
diff --git a/aai-resources/src/main/java/org/onap/aai/interceptors/pre/RequestTransactionLogging.java b/aai-resources/src/main/java/org/onap/aai/interceptors/pre/RequestTransactionLogging.java
index 14c1f01..2d0dcdc 100644
--- a/aai-resources/src/main/java/org/onap/aai/interceptors/pre/RequestTransactionLogging.java
+++ b/aai-resources/src/main/java/org/onap/aai/interceptors/pre/RequestTransactionLogging.java
@@ -91,7 +91,7 @@ public class RequestTransactionLogging extends AAIContainerFilter implements Con
requestContext.getHeaders().putSingle(CONTENT_TYPE, DEFAULT_CONTENT_TYPE);
}
- if (WILDCARD.equals(acceptType) || StringUtils.isEmpty(acceptType) || acceptType.contains(TEXT_PLAIN)) {
+ if (WILDCARD.equals(acceptType) || acceptType.isEmpty() || !StringUtils.hasLength(acceptType) || acceptType.contains(TEXT_PLAIN)) {
UriInfo uriInfo = requestContext.getUriInfo();
if (uriInfo != null) {
MultivaluedMap<String, String> queryParameters = uriInfo.getQueryParameters();
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 5208726..c685071 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
@@ -21,7 +21,6 @@
package org.onap.aai.rest;
import io.micrometer.core.annotation.Timed;
-import io.swagger.jaxrs.PATCH;
import java.io.UnsupportedEncodingException;
import java.net.URI;