You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by ru...@apache.org on 2010/05/09 08:53:22 UTC
svn commit: r942495 -
/synapse/trunk/java/modules/commons/src/main/java/org/apache/synapse/commons/evaluators/config/MatchFactory.java
Author: ruwan
Date: Sun May 9 06:53:22 2010
New Revision: 942495
URL: http://svn.apache.org/viewvc?rev=942495&view=rev
Log:
Fixing an issue in the match factory
Modified:
synapse/trunk/java/modules/commons/src/main/java/org/apache/synapse/commons/evaluators/config/MatchFactory.java
Modified: synapse/trunk/java/modules/commons/src/main/java/org/apache/synapse/commons/evaluators/config/MatchFactory.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/commons/src/main/java/org/apache/synapse/commons/evaluators/config/MatchFactory.java?rev=942495&r1=942494&r2=942495&view=diff
==============================================================================
--- synapse/trunk/java/modules/commons/src/main/java/org/apache/synapse/commons/evaluators/config/MatchFactory.java (original)
+++ synapse/trunk/java/modules/commons/src/main/java/org/apache/synapse/commons/evaluators/config/MatchFactory.java Sun May 9 06:53:22 2010
@@ -63,12 +63,15 @@ public class MatchFactory implements Eva
equal.setType(type);
OMAttribute sourceAttr = e.getAttribute(new QName(EvaluatorConstants.SOURCE));
- if (type != 1 && sourceAttr == null) {
- handleException(EvaluatorConstants.SOURCE + " attribute is required");
- return null;
+ if (sourceAttr == null) {
+ if (type != 1) {
+ handleException(EvaluatorConstants.SOURCE + " attribute is required");
+ return null;
+ }
+ } else {
+ equal.setSource(sourceAttr.getAttributeValue());
}
- equal.setSource(sourceAttr.getAttributeValue());
OMAttribute regExAttr = e.getAttribute(new QName(EvaluatorConstants.REGEX));
if (regExAttr == null) {