Fix Raw XACML Decision API Serialization
[policy/xacml-pdp.git] / main / src / main / java / org / onap / policy / pdpx / main / rest / serialization / XacmlJsonMessageBodyHandler.java
index 9b59a00..907e0f1 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2022 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -98,6 +98,6 @@ public class XacmlJsonMessageBodyHandler implements MessageBodyReader<Request>,
             return false;
         }
         return ("xacml+json".equals(mediaType.getSubtype()))
-                && (type == Request.class || type == Response.class);
+                && (Request.class.isAssignableFrom(type) || Response.class.isAssignableFrom(type));
     }
 }
\ No newline at end of file