DELTASPIKE-1316 skip interdyn with empty match or class config

Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/8cc2a7f6
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/8cc2a7f6
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/8cc2a7f6

Branch: refs/heads/master
Commit: 8cc2a7f6853c32e49d7aa93176b667502ce74f7c
Parents: 2c185bd
Author: Mark Struberg <strub...@apache.org>
Authored: Fri Feb 9 18:49:54 2018 +0100
Committer: Mark Struberg <strub...@apache.org>
Committed: Fri Feb 9 18:49:54 2018 +0100

----------------------------------------------------------------------
 .../apache/deltaspike/core/api/config/base/CoreBaseConfig.java    | 2 +-
 .../core/impl/interceptor/interdyn/InterDynExtension.java         | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/8cc2a7f6/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/base/CoreBaseConfig.java
----------------------------------------------------------------------
diff --git 
a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/base/CoreBaseConfig.java
 
b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/base/CoreBaseConfig.java
index 02312f4..e988f57 100644
--- 
a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/base/CoreBaseConfig.java
+++ 
b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/base/CoreBaseConfig.java
@@ -122,7 +122,7 @@ public interface CoreBaseConfig extends DeltaSpikeBaseConfig
          * A sample config might look like:
          * <pre>
          * deltaspike.interdyn.rule.1.match=com\.mycorp\..*Service.*
-         * 
deltaspike.interdyn.rule.1.annotation=org.apache.deltaspike.core.api.monitor.InvocationMonitored
+         * 
deltaspike.interdyn.rule.1.annotation=org.apache.deltaspike.core.api.monitoring.InvocationMonitored
          * </pre>
          */
         String INTERDYN_RULE_PREFIX = "deltaspike.interdyn.rule.";

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/8cc2a7f6/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/interceptor/interdyn/InterDynExtension.java
----------------------------------------------------------------------
diff --git 
a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/interceptor/interdyn/InterDynExtension.java
 
b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/interceptor/interdyn/InterDynExtension.java
index 61a60e7..d948722 100644
--- 
a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/interceptor/interdyn/InterDynExtension.java
+++ 
b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/interceptor/interdyn/InterDynExtension.java
@@ -94,7 +94,8 @@ public class InterDynExtension implements Deactivatable, 
Extension
             String match = ConfigResolver.getPropertyValue(ruleConfigKey + 
".match");
             String annotationClassName = 
ConfigResolver.getPropertyValue(ruleConfigKey + ".annotation");
 
-            if (match != null && annotationClassName != null)
+            if (match != null && annotationClassName != null &&
+                match.length() > 0 && annotationClassName.length() > 0)
             {
                 Annotation anno = 
getAnnotationImplementation(annotationClassName);
                 interceptorRules.add(new AnnotationRule(match, anno));

Reply via email to