diff options
author | Jim Hahn <jrh3@att.com> | 2018-09-29 10:06:26 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2018-09-29 10:09:26 -0400 |
commit | 01badaecbe2fbbfd0494e15b9684cc3236dee8f9 (patch) | |
tree | 478911bbd45d16bfef1d85dfb33aa09adc7e2d5d /policy-endpoints/src/main | |
parent | 53f06d93dc2c4d292ea1c7dad24df0d72cc01dc5 (diff) |
Fix RestManager test issue
Apparently drools-pdp code depends on Dmaap topic factories throwing
IllegalArgumentException instead of IllegalStateException (which is what
the other topic factories throw) when an unknown topic name is requested.
Therefore, the change to make them consistent has been backed out.
Change-Id: Ia3d7e26a61027977eb626c9ddad6369982eae002
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'policy-endpoints/src/main')
2 files changed, 2 insertions, 2 deletions
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/DmaapTopicSinkFactory.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/DmaapTopicSinkFactory.java index dc207a84..09078720 100644 --- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/DmaapTopicSinkFactory.java +++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/DmaapTopicSinkFactory.java @@ -395,7 +395,7 @@ class IndexedDmaapTopicSinkFactory implements DmaapTopicSinkFactory { if (dmaapTopicWriters.containsKey(topic)) { return dmaapTopicWriters.get(topic); } else { - throw new IllegalStateException("DmaapTopicSink for " + topic + " not found"); + throw new IllegalArgumentException("DmaapTopicSink for " + topic + " not found"); } } } diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/DmaapTopicSourceFactory.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/DmaapTopicSourceFactory.java index ae6c6c3b..f45164f8 100644 --- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/DmaapTopicSourceFactory.java +++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/DmaapTopicSourceFactory.java @@ -448,7 +448,7 @@ class IndexedDmaapTopicSourceFactory implements DmaapTopicSourceFactory { if (dmaapTopicSources.containsKey(topic)) { return dmaapTopicSources.get(topic); } else { - throw new IllegalStateException("DmaapTopiceSource for " + topic + " not found"); + throw new IllegalArgumentException("DmaapTopiceSource for " + topic + " not found"); } } } |