summaryrefslogtreecommitdiffstats
path: root/applications/native
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2020-03-11 14:06:42 -0400
committerPamela Dragosh <pdragosh@research.att.com>2020-03-12 09:12:22 -0400
commit2924fa7d806435a3bf9f2cb5abcdb01aa7295b00 (patch)
tree094c3b2140e492f8ffc700f0232405dcf83d2d2e /applications/native
parent2a65ced426b393e9a6fe34c2c64303b1cc83e1a0 (diff)
Better error handling for decisions
Throw exceptions when requests cannot be created and return error information back. Consolidated some code to avoid sonar duplication issues. Companion review to https://gerrit.onap.org/r/c/policy/models/+/103548 Issue-ID: POLICY-2242 Change-Id: Ic873af933dab82e3aeef6335f55939666be20385 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'applications/native')
-rw-r--r--applications/native/src/main/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTranslator.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/applications/native/src/main/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTranslator.java b/applications/native/src/main/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTranslator.java
index 98a1c657..546c29eb 100644
--- a/applications/native/src/main/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTranslator.java
+++ b/applications/native/src/main/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTranslator.java
@@ -95,11 +95,8 @@ public class NativePdpApplicationTranslator implements ToscaPolicyTranslator {
}
@Override
- public Request convertRequest(DecisionRequest request) {
- //
- // We do nothing to DecisionRequest for native xacml application
- //
- return null;
+ public Request convertRequest(DecisionRequest request) throws ToscaPolicyConversionException {
+ throw new ToscaPolicyConversionException("Do not call native convertRequest");
}
@Override