diff options
author | Jim Hahn <jrh3@att.com> | 2019-11-11 20:03:18 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-11-11 20:03:18 +0000 |
commit | 6149ece02f525206242e0489ff1dcda8d9577484 (patch) | |
tree | b348535c02d6cb565a4051830f18805fa59f4e69 /policy-core/src | |
parent | a45c098afaf3b847fad14d8b42789999d73e0816 (diff) | |
parent | f38687b040bec7b8556fb4bde229343831fa43fd (diff) |
Merge "Miscellaneous code clean up"
Diffstat (limited to 'policy-core/src')
5 files changed, 18 insertions, 21 deletions
diff --git a/policy-core/src/main/java/org/onap/policy/drools/core/PolicySession.java b/policy-core/src/main/java/org/onap/policy/drools/core/PolicySession.java index c2b72fb5..69ca87cb 100644 --- a/policy-core/src/main/java/org/onap/policy/drools/core/PolicySession.java +++ b/policy-core/src/main/java/org/onap/policy/drools/core/PolicySession.java @@ -382,19 +382,19 @@ public class PolicySession /** * Start the thread or threads that do the 'KieSession' processing. */ - public void start(); + void start(); /** * Stop the thread or threads that do the 'KieSession' processing. */ - public void stop(); + void stop(); /** * This method is called to notify the running session that * 'KieContainer.updateToVersion(...)' has been called (meaning the * full name of this session has changed). */ - public default void updated() { + default void updated() { } } diff --git a/policy-core/src/main/java/org/onap/policy/drools/core/PolicySessionFeatureApi.java b/policy-core/src/main/java/org/onap/policy/drools/core/PolicySessionFeatureApi.java index f68747dd..181fbe55 100644 --- a/policy-core/src/main/java/org/onap/policy/drools/core/PolicySessionFeatureApi.java +++ b/policy-core/src/main/java/org/onap/policy/drools/core/PolicySessionFeatureApi.java @@ -40,7 +40,7 @@ public interface PolicySessionFeatureApi extends OrderedService { * @param args standard 'main' arguments, which are currently ignored * @param configDir the relative directory containing configuration files */ - public default void globalInit(String[] args, String configDir) {} + default void globalInit(String[] args, String configDir) {} /** * This method is used to create a 'KieSession' as part of a @@ -57,7 +57,7 @@ public interface PolicySessionFeatureApi extends OrderedService { * (this depends on the capabilities and state of the object implementing * this interface) */ - public default KieSession activatePolicySession(PolicyContainer policyContainer, String name, String kieBaseName) { + default KieSession activatePolicySession(PolicyContainer policyContainer, String name, String kieBaseName) { return null; } @@ -67,13 +67,13 @@ public interface PolicySessionFeatureApi extends OrderedService { * * @param policySession the new 'PolicySession' instance */ - public default void newPolicySession(PolicySession policySession) {} + default void newPolicySession(PolicySession policySession) {} /** * This method is called to select the 'ThreadModel' instance associated * with a 'PolicySession' instance. */ - public default PolicySession.ThreadModel selectThreadModel(PolicySession session) { + default PolicySession.ThreadModel selectThreadModel(PolicySession session) { return null; } @@ -88,7 +88,7 @@ public interface PolicySessionFeatureApi extends OrderedService { * @return 'true' if this feature is handling the operation, * and 'false' if not. */ - public default boolean insertDrools(PolicySession session, Object object) { + default boolean insertDrools(PolicySession session, Object object) { return false; } @@ -98,7 +98,7 @@ public interface PolicySessionFeatureApi extends OrderedService { * @param policySession the 'PolicySession' object that wrapped the * 'KieSession' */ - public default void disposeKieSession(PolicySession policySession) {} + default void disposeKieSession(PolicySession policySession) {} /** * This method is called after 'KieSession.destroy()' is called. @@ -106,5 +106,5 @@ public interface PolicySessionFeatureApi extends OrderedService { * @param policySession the 'PolicySession' object that wrapped the * 'KieSession' */ - public default void destroyKieSession(PolicySession policySession) {} + default void destroyKieSession(PolicySession policySession) {} } diff --git a/policy-core/src/main/java/org/onap/policy/drools/core/jmx/PdpJmxMBean.java b/policy-core/src/main/java/org/onap/policy/drools/core/jmx/PdpJmxMBean.java index d2c05f85..390e00e7 100644 --- a/policy-core/src/main/java/org/onap/policy/drools/core/jmx/PdpJmxMBean.java +++ b/policy-core/src/main/java/org/onap/policy/drools/core/jmx/PdpJmxMBean.java @@ -2,14 +2,14 @@ * ============LICENSE_START======================================================= * policy-core * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. * 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. @@ -22,7 +22,7 @@ package org.onap.policy.drools.core.jmx; public interface PdpJmxMBean { - public long getRulesFired(); - - public long getUpdates(); + long getRulesFired(); + + long getUpdates(); } diff --git a/policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockManager.java b/policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockManager.java index bbf7d229..905e31af 100644 --- a/policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockManager.java +++ b/policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockManager.java @@ -50,6 +50,6 @@ public interface PolicyResourceLockManager extends Startable, Lockable { * {@code false} otherwise * @return a new lock */ - public Lock createLock(String resourceId, String ownerKey, int holdSec, LockCallback callback, - boolean waitForLock); + Lock createLock(String resourceId, String ownerKey, int holdSec, LockCallback callback, + boolean waitForLock); } diff --git a/policy-core/src/main/java/org/onap/policy/drools/util/KieUtils.java b/policy-core/src/main/java/org/onap/policy/drools/util/KieUtils.java index babc0413..a5d577a6 100644 --- a/policy-core/src/main/java/org/onap/policy/drools/util/KieUtils.java +++ b/policy-core/src/main/java/org/onap/policy/drools/util/KieUtils.java @@ -24,7 +24,6 @@ import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; @@ -50,8 +49,6 @@ import org.slf4j.LoggerFactory; */ public class KieUtils { - private static final Logger logger = LoggerFactory.getLogger(KieUtils.class); - private KieUtils() { // Utility class } |