Fix for ClassCastException on PfConceptContainer get method usages 69/127269/2
authorRashmi Pujar <rashmi.pujar1@bell.ca>
Thu, 24 Feb 2022 04:40:54 +0000 (23:40 -0500)
committerRashmi Pujar <rashmi.pujar1@bell.ca>
Thu, 24 Feb 2022 15:50:46 +0000 (10:50 -0500)
commitf0ae42bb24bd4ee98f6b7b3acf2e47d96946de1b
treee01758a4d1fca5ff785ee21c73553de789208cd0
parentc89f17af3cccff82d3f251e7fe73910ea8e26dbf
Fix for ClassCastException on PfConceptContainer get method usages

Typecasting Map to NavigableMap leads to ClassCastException.
The usages of the get methods in delete policy, policyType
endpoints in policy/api (using spring data jpa) cause the
unchecked class-cast exception. Fix is to instead copy the
Map entries into a newly created TreeMap instance.

Issue-ID: POLICY-3924
Signed-off-by: Rashmi Pujar <rashmi.pujar1@bell.ca>
Change-Id: I60625980d6f2692ffa7dd3bd9f53d10b43c13f4a
models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java