summaryrefslogtreecommitdiffstats
path: root/policy-management/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'policy-management/src/main/java')
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java10
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/controller/internal/NullDroolsController.java2
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/protocol/coders/EventProtocolCoder.java14
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java2
4 files changed, 14 insertions, 14 deletions
diff --git a/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java b/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java
index 140d6769..97312042 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java
@@ -374,21 +374,21 @@ public class MavenDroolsController implements DroolsController {
@Override
public boolean ownsCoder(Class<? extends Object> coderClass, int modelHash) {
- if (!ReflectionUtil.isClass(this.policyContainer.getClassLoader(), coderClass.getCanonicalName())) {
- logger.error("{}{} cannot be retrieved. ", this, coderClass.getCanonicalName());
+ if (!ReflectionUtil.isClass(this.policyContainer.getClassLoader(), coderClass.getName())) {
+ logger.error("{}{} cannot be retrieved. ", this, coderClass.getName());
return false;
}
if (modelHash == this.modelClassLoaderHash) {
if (logger.isInfoEnabled()) {
- logger.info(coderClass.getCanonicalName()
+ logger.info(coderClass.getName()
+ this + " class loader matches original drools controller rules classloader "
+ coderClass.getClassLoader());
}
return true;
} else {
if (logger.isWarnEnabled()) {
- logger.warn(this + coderClass.getCanonicalName() + " class loaders don't match "
+ logger.warn(this + coderClass.getName() + " class loaders don't match "
+ coderClass.getClassLoader() + " vs "
+ this.policyContainer.getClassLoader());
}
@@ -837,7 +837,7 @@ public class MavenDroolsController implements DroolsController {
@Override
public <T> List<T> facts(@NonNull String sessionName, @NonNull Class<T> clazz) {
- return facts(sessionName, clazz.getCanonicalName(), false)
+ return facts(sessionName, clazz.getName(), false)
.stream()
.filter(clazz::isInstance)
.map(clazz::cast)
diff --git a/policy-management/src/main/java/org/onap/policy/drools/controller/internal/NullDroolsController.java b/policy-management/src/main/java/org/onap/policy/drools/controller/internal/NullDroolsController.java
index 3595f91a..4b38e722 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/controller/internal/NullDroolsController.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/controller/internal/NullDroolsController.java
@@ -214,6 +214,6 @@ public class NullDroolsController implements DroolsController {
}
private String makeInvokeMsg() {
- return this.getClass().getCanonicalName() + " invoked";
+ return this.getClass().getName() + " invoked";
}
}
diff --git a/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/EventProtocolCoder.java b/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/EventProtocolCoder.java
index 56eadad3..1297ff8c 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/EventProtocolCoder.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/EventProtocolCoder.java
@@ -920,7 +920,7 @@ abstract class GenericEventProtocolCoder {
throw new IllegalArgumentException("Invalid topic");
}
- String reverseKey = this.reverseCodersKey(topic, event.getClass().getCanonicalName());
+ String reverseKey = this.reverseCodersKey(topic, event.getClass().getName());
if (!this.reverseCoders.containsKey(reverseKey)) {
throw new IllegalArgumentException("no reverse coder has been found");
}
@@ -996,7 +996,7 @@ abstract class GenericEventProtocolCoder {
List<DroolsController> droolsControllers = new ArrayList<>();
- String reverseKey = this.reverseCodersKey(topic, encodedClass.getClass().getCanonicalName());
+ String reverseKey = this.reverseCodersKey(topic, encodedClass.getClass().getName());
if (!this.reverseCoders.containsKey(reverseKey)) {
logger.warn("{}: no reverse mapping for {}", this, reverseKey);
return droolsControllers;
@@ -1016,7 +1016,7 @@ abstract class GenericEventProtocolCoder {
"No Encoders toolsets available for topic "
+ topic
+ " encoder "
- + encodedClass.getClass().getCanonicalName());
+ + encodedClass.getClass().getName());
}
for (ProtocolCoderToolset encoderSet : toolsets) {
@@ -1025,7 +1025,7 @@ abstract class GenericEventProtocolCoder {
String artifactId = encoderSet.getArtifactId();
List<CoderFilters> coderFilters = encoderSet.getCoders();
for (CoderFilters coder : coderFilters) {
- if (coder.getCodedClass().equals(encodedClass.getClass().getCanonicalName())) {
+ if (coder.getCodedClass().equals(encodedClass.getClass().getName())) {
DroolsController droolsController = DroolsController.factory.get(groupId, artifactId, "");
if (droolsController.ownsCoder(
encodedClass.getClass(), coder.getModelClassLoaderHash())) {
@@ -1040,7 +1040,7 @@ abstract class GenericEventProtocolCoder {
"No Encoders toolsets available for "
+ topic
+ ":"
- + encodedClass.getClass().getCanonicalName());
+ + encodedClass.getClass().getName());
}
return droolsControllers;
@@ -1235,7 +1235,7 @@ abstract class GenericEventProtocolCoder {
this,
droolsControllers,
topic,
- fact.getClass().getCanonicalName());
+ fact.getClass().getName());
// continue
}
return droolsControllers.get(0);
@@ -1266,7 +1266,7 @@ abstract class GenericEventProtocolCoder {
this,
droolsControllers,
topic,
- fact.getClass().getCanonicalName());
+ fact.getClass().getName());
// continue
}
return droolsControllers;
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java
index 86655fff..963aced4 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java
@@ -521,7 +521,7 @@ class PolicyEngineManager implements PolicyEngine {
this.httpServers = getServletFactory().build(properties);
for (HttpServletServer server : this.httpServers) {
if (server.isAaf()) {
- server.addFilterClass(null, AafTelemetryAuthFilter.class.getCanonicalName());
+ server.addFilterClass(null, AafTelemetryAuthFilter.class.getName());
}
}
} catch (final IllegalArgumentException e) {