From 8d54fdee9b14e5e84b7840c0a7bb98334f22777b Mon Sep 17 00:00:00 2001 From: Joanna Jeremicz Date: Tue, 6 Nov 2018 15:09:13 +0100 Subject: Make CategoryParameter.getOptions() unmodifiable Change-Id: If7331577febe058d4415aab0d2336e60213fd7bb Issue-ID: VID-344 Signed-off-by: Joanna Jeremicz --- vid-app-common/src/main/java/org/onap/vid/model/CategoryParameter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vid-app-common/src/main/java/org/onap') diff --git a/vid-app-common/src/main/java/org/onap/vid/model/CategoryParameter.java b/vid-app-common/src/main/java/org/onap/vid/model/CategoryParameter.java index 91617ff42..85caac424 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/CategoryParameter.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/CategoryParameter.java @@ -22,6 +22,7 @@ package org.onap.vid.model; * ============LICENSE_END========================================================= */ +import java.util.Collections; import java.util.HashSet; import java.util.Objects; import java.util.Set; @@ -82,7 +83,7 @@ public class CategoryParameter extends VidBaseEntity { @OneToMany(fetch = FetchType.EAGER, mappedBy = "categoryParameter") public Set getOptions() { - return options; + return Collections.unmodifiableSet(options); } public void setOptions(Set options) { -- cgit 1.2.3-korg