From 3d4224b742aa37495c7fa81c6003a0eeeb5afcdb Mon Sep 17 00:00:00 2001 From: danielhanrahan Date: Mon, 5 Jan 2026 15:34:27 +0000 Subject: [PATCH] Refactor key version check Issue-ID: POLICY-5509 Change-Id: I11ddd0d0ba2ae4279c42998e52ce6cec1e9cb384 Signed-off-by: danielhanrahan --- .../acm/document/concepts/DocToscaCapabilityType.java | 8 ++++++-- .../document/concepts/DocToscaWithToscaProperties.java | 18 +----------------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/document/concepts/DocToscaCapabilityType.java b/models/src/main/java/org/onap/policy/clamp/models/acm/document/concepts/DocToscaCapabilityType.java index af6d942bc..be1d030b2 100644 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/document/concepts/DocToscaCapabilityType.java +++ b/models/src/main/java/org/onap/policy/clamp/models/acm/document/concepts/DocToscaCapabilityType.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2022 Nordix Foundation. + * Copyright (C) 2022-2026 OpenInfra Foundation Europe. 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. @@ -62,6 +62,10 @@ public class DocToscaCapabilityType extends DocToscaWithToscaProperties ext return tosca; } - /** - * Validates the fields of the object, including its key. - * - * @param fieldName name of the field containing this - * @return the result, or {@code null} - */ - protected BeanValidationResult validateWithKey(@NonNull String fieldName) { - var result = super.validate(fieldName); - - validateKeyVersionNotNull(result, "key", getConceptKey()); - - return result; - } - @Override public void fromAuthorative(T authorativeConcept) { super.fromAuthorative(authorativeConcept); -- 2.16.6