From 56a15039437ba5bf5d0fb422551bfb12e1f59eb1 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 19 Jun 2020 14:32:10 -0400 Subject: Address checkstyle version issues in drools-pdp Also added serializationId to several classes to address eclipse warnings. Issue-ID: POLICY-2188 Change-Id: I3df5e8abaad8da9261c0d5cd19a93ed68dceb870 Signed-off-by: Jim Hahn --- policy-utils/src/main/java/org/onap/policy/drools/utils/Pair.java | 8 ++++---- .../src/main/java/org/onap/policy/drools/utils/PropertyUtil.java | 7 +++---- .../src/main/java/org/onap/policy/drools/utils/Triple.java | 8 ++++---- 3 files changed, 11 insertions(+), 12 deletions(-) (limited to 'policy-utils/src/main/java') diff --git a/policy-utils/src/main/java/org/onap/policy/drools/utils/Pair.java b/policy-utils/src/main/java/org/onap/policy/drools/utils/Pair.java index d044ca6f..c37084f4 100644 --- a/policy-utils/src/main/java/org/onap/policy/drools/utils/Pair.java +++ b/policy-utils/src/main/java/org/onap/policy/drools/utils/Pair.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,11 +20,11 @@ package org.onap.policy.drools.utils; -public class Pair { +public class Pair { protected F first; protected S second; - + public Pair(F first, S second) { this.first = first; this.second = second; diff --git a/policy-utils/src/main/java/org/onap/policy/drools/utils/PropertyUtil.java b/policy-utils/src/main/java/org/onap/policy/drools/utils/PropertyUtil.java index e6195fa4..4d287170 100644 --- a/policy-utils/src/main/java/org/onap/policy/drools/utils/PropertyUtil.java +++ b/policy-utils/src/main/java/org/onap/policy/drools/utils/PropertyUtil.java @@ -330,8 +330,7 @@ public class PropertyUtil { public void run() { try { poll(); - } - catch (Exception e) { + } catch (Exception e) { logger.warn("Polling for property changes", e); } } @@ -347,7 +346,7 @@ public class PropertyUtil { */ synchronized Properties addListener(Listener listener) { listeners.add(listener); - return (Properties)properties.clone(); + return (Properties) properties.clone(); } /** @@ -420,7 +419,7 @@ public class PropertyUtil { // Copy 'properties' and 'changedProperties', so it doesn't // cause problems if the recipient makes changes. final Properties tmpProperties = - (Properties)(properties.clone()); + (Properties) properties.clone(); final HashSet tmpChangedProperties = new HashSet<>(changedProperties); diff --git a/policy-utils/src/main/java/org/onap/policy/drools/utils/Triple.java b/policy-utils/src/main/java/org/onap/policy/drools/utils/Triple.java index 04817346..d37a5d92 100644 --- a/policy-utils/src/main/java/org/onap/policy/drools/utils/Triple.java +++ b/policy-utils/src/main/java/org/onap/policy/drools/utils/Triple.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +20,7 @@ package org.onap.policy.drools.utils; -public class Triple { +public class Triple { private F first; private S second; @@ -32,7 +32,7 @@ public class Triple { /** * Constructor. - * + * * @param first first * @param second second * @param third third -- cgit 1.2.3-korg