[Yanel-commits] rev 60611 - public/yanel/trunk/src/core/java/org/wyona/yanel/core
michi at wyona.com
michi at wyona.com
Sun Sep 11 15:45:05 CEST 2011
Author: michi
Date: 2011-09-11 15:45:05 +0200 (Sun, 11 Sep 2011)
New Revision: 60611
Modified:
public/yanel/trunk/src/core/java/org/wyona/yanel/core/ResourceConfigurationMap.java
Log:
catch matcher without pattern attribute more fault tolerant
Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/ResourceConfigurationMap.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/ResourceConfigurationMap.java 2011-09-11 11:31:49 UTC (rev 60610)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/ResourceConfigurationMap.java 2011-09-11 13:45:05 UTC (rev 60611)
@@ -66,11 +66,15 @@
if (event == XMLStreamConstants.START_ELEMENT) {
if (parser.getLocalName().equals("matcher")) {
String pattern = parser.getAttributeValue("", "pattern");
- if (WildcardMatcherHelper.match(pattern, path) != null) {
- if (log.isDebugEnabled()) {
- log.debug("CoR pattern: '" + pattern + "' matched with path: '" + path + "'. will use following path int the RTIRepository to reach the rc: " + parser.getAttributeValue("", "rcpath"));
+ if (pattern != null) {
+ if (WildcardMatcherHelper.match(pattern, path) != null) {
+ if (log.isDebugEnabled()) {
+ log.debug("CoR pattern: '" + pattern + "' matched with path: '" + path + "'. will use following path int the RTIRepository to reach the rc: " + parser.getAttributeValue("", "rcpath"));
+ }
+ return parser.getAttributeValue("", "rcpath");
}
- return parser.getAttributeValue("", "rcpath");
+ } else {
+ log.warn("Matcher has no 'pattern' attribute, hence ignore.");
}
}
}
More information about the Yanel-commits
mailing list