Java 17 Upgrade
[policy/models.git] / models-base / src / test / java / org / onap / policy / models / base / testconcepts / DummyPfKey.java
index 058ef37..594528b 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
- *  Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ *  Copyright (C) 2019, 2023 Nordix Foundation.
+ *  Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. 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.
 
 package org.onap.policy.models.base.testconcepts;
 
-import java.util.Arrays;
+import java.io.Serial;
 import java.util.List;
-
 import lombok.NonNull;
-
+import org.onap.policy.common.parameters.BeanValidationResult;
 import org.onap.policy.models.base.PfConcept;
 import org.onap.policy.models.base.PfKey;
-import org.onap.policy.models.base.PfValidationResult;
 
 public class DummyPfKey extends PfKey {
+    @Serial
     private static final long serialVersionUID = 1L;
 
-    public DummyPfKey() { }
+    public DummyPfKey() {
+        // Default constructor
+    }
 
     public DummyPfKey(DummyPfKey source) {
         super(source);
     }
 
     @Override
-    public int compareTo(PfConcept arg0) {
+    public int compareTo(@NonNull PfConcept arg0) {
         return 0;
     }
 
@@ -55,12 +56,12 @@ public class DummyPfKey extends PfKey {
     }
 
     @Override
-    public Compatibility getCompatibility(PfKey otherKey) {
+    public Compatibility getCompatibility(@NonNull PfKey otherKey) {
         return null;
     }
 
     @Override
-    public boolean isCompatible(PfKey otherKey) {
+    public boolean isCompatible(@NonNull PfKey otherKey) {
         return false;
     }
 
@@ -71,11 +72,11 @@ public class DummyPfKey extends PfKey {
 
     @Override
     public List<PfKey> getKeys() {
-        return Arrays.asList(getKey());
+        return List.of(getKey());
     }
 
     @Override
-    public PfValidationResult validate(PfValidationResult result) {
+    public BeanValidationResult validate(@NonNull String fieldName) {
         return null;
     }