RestconfDocumentedExceptionMapper not returning json
[netconf.git] / restconf / restconf-nb-bierman02 / src / main / java / org / opendaylight / netconf / sal / rest / impl / RestconfDocumentedExceptionMapper.java
index b4b2890954284b42da9d46bbeda7192f9cbaeabb..aa6b7c0b697b80a8e4d7dd9371e29fa91aa05729 100644 (file)
@@ -100,7 +100,8 @@ public class RestconfDocumentedExceptionMapper implements ExceptionMapper<Restco
         LOG.debug("In toResponse: {}", exception.getMessage());
 
         final MediaType mediaType = headers.getAcceptableMediaTypes().stream()
-                .filter(type -> type != MediaType.WILDCARD_TYPE).findFirst().orElse(MediaType.APPLICATION_JSON_TYPE);
+                .filter(type -> !type.equals(MediaType.WILDCARD_TYPE)).findFirst()
+                        .orElse(MediaType.APPLICATION_JSON_TYPE);
 
         LOG.debug("Using MediaType: {}", mediaType);