From 956a7b52188918f0f2d301a06bf0a2e31249168f Mon Sep 17 00:00:00 2001 From: "Hockla, Ali (ah999m)" Date: Mon, 13 Jan 2020 14:11:46 -0600 Subject: policy/drools-pdp jdk11 upgrades Issue-ID: POLICY-1589 Change-Id: I0ed05c6e471a7da6658e02a4ba3115d3a117cedd Signed-off-by: Hockla, Ali (ah999m) --- .../onap/policy/drools/core/PolicySessionFeatureApi.java | 14 +++++++++----- .../main/java/org/onap/policy/drools/util/KieUtils.java | 11 +++++------ 2 files changed, 14 insertions(+), 11 deletions(-) (limited to 'policy-core/src/main') 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 181fbe55..535b1d8b 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 @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * policy-core * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-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. @@ -40,7 +40,8 @@ public interface PolicySessionFeatureApi extends OrderedService { * @param args standard 'main' arguments, which are currently ignored * @param configDir the relative directory containing configuration files */ - 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 @@ -67,7 +68,8 @@ public interface PolicySessionFeatureApi extends OrderedService { * * @param policySession the new 'PolicySession' instance */ - default void newPolicySession(PolicySession policySession) {} + default void newPolicySession(PolicySession policySession) { + } /** * This method is called to select the 'ThreadModel' instance associated @@ -98,7 +100,8 @@ public interface PolicySessionFeatureApi extends OrderedService { * @param policySession the 'PolicySession' object that wrapped the * 'KieSession' */ - default void disposeKieSession(PolicySession policySession) {} + default void disposeKieSession(PolicySession policySession) { + } /** * This method is called after 'KieSession.destroy()' is called. @@ -106,5 +109,6 @@ public interface PolicySessionFeatureApi extends OrderedService { * @param policySession the 'PolicySession' object that wrapped the * 'KieSession' */ - default void destroyKieSession(PolicySession policySession) {} + default void destroyKieSession(PolicySession policySession) { + } } 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 bd1c6cee..c260924b 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 @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018-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. @@ -24,18 +24,17 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.URL; -import java.nio.charset.StandardCharsets; import java.nio.file.Files; -import java.nio.file.Path; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Enumeration; import java.util.HashSet; import java.util.List; import java.util.stream.Collectors; + import lombok.NonNull; + import org.apache.commons.io.IOUtils; import org.drools.compiler.kie.builder.impl.InternalKieModule; import org.drools.compiler.kproject.models.KieModuleModelImpl; @@ -74,7 +73,7 @@ public class KieUtils { * Installs a rules artifact in the local maven repository. */ public static ReleaseId installArtifact(File kmodule, File pom, String drlKJarPath, @NonNull List drls) - throws IOException { + throws IOException { KieModuleModel kieModule = KieModuleModelImpl.fromXML(kmodule); final KieFileSystem kieFileSystem = KieServices.Factory.get().newKieFileSystem(); @@ -92,7 +91,7 @@ public class KieUtils { * Installs a rules artifact in the local maven repository. */ public static ReleaseId installArtifact(File kmodule, File pom, String drlKJarPath, File drl) - throws IOException { + throws IOException { return installArtifact(kmodule, pom, drlKJarPath, Collections.singletonList(drl)); } -- cgit 1.2.3-korg