summaryrefslogtreecommitdiff
path: root/java/broker/src
diff options
context:
space:
mode:
authorRupert Smith <rupertlssmith@apache.org>2007-11-30 12:49:02 +0000
committerRupert Smith <rupertlssmith@apache.org>2007-11-30 12:49:02 +0000
commitb9857867db0ea728abb837027fc164f8d01b1191 (patch)
treeb75af72fd55e7889dcea1f4823d22df5f2b16009 /java/broker/src
parent26069a456f3e6b4f669887b668db67a8dd2a7827 (diff)
downloadqpid-python-b9857867db0ea728abb837027fc164f8d01b1191.tar.gz
Merged revisions 594992-595694,595697-596350,596352-596362,596364-598327 via svnmerge from
https://svn.apache.org/repos/asf/incubator/qpid/branches/M2 ........ r594992 | ritchiem | 2007-11-14 18:00:28 +0000 (Wed, 14 Nov 2007) | 1 line QPID-685 : Update to address dependency issues and update the NOTICE file. ........ r595687 | rajith | 2007-11-16 14:54:01 +0000 (Fri, 16 Nov 2007) | 1 line moved the keys file to the parent folder ........ r595688 | rajith | 2007-11-16 15:00:22 +0000 (Fri, 16 Nov 2007) | 1 line removed the KEYS file, as now it is in the parent folder ........ r595740 | ritchiem | 2007-11-16 17:06:04 +0000 (Fri, 16 Nov 2007) | 1 line Fixed runtime dependency in the management console. ........ r596342 | rajith | 2007-11-19 15:56:29 +0000 (Mon, 19 Nov 2007) | 1 line added eclipse license details to the NOTICE file ........ r596650 | ritchiem | 2007-11-20 13:14:32 +0000 (Tue, 20 Nov 2007) | 1 line Added the full text of the additional licenses. ........ r596655 | ritchiem | 2007-11-20 13:22:53 +0000 (Tue, 20 Nov 2007) | 2 lines Added the full text of the additional licenses. Moved ICU licence text from NOTICE to LICENSE ........ r596657 | gsim | 2007-11-20 13:32:25 +0000 (Tue, 20 Nov 2007) | 3 lines Added boost license ........ r596665 | ritchiem | 2007-11-20 13:49:34 +0000 (Tue, 20 Nov 2007) | 1 line Added source links for EPL and MPL libraries ........ r598292 | rupertlssmith | 2007-11-26 14:45:15 +0000 (Mon, 26 Nov 2007) | 1 line Added incubator disclaimer. ........ r598311 | rupertlssmith | 2007-11-26 15:40:54 +0000 (Mon, 26 Nov 2007) | 1 line Added AMQP licence information. ........ r598327 | rajith | 2007-11-26 16:04:50 +0000 (Mon, 26 Nov 2007) | 1 line added disclaimers and AMP license to all languages ........ git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2.1@599806 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker/src')
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/filter/XPathExpression.java29
1 files changed, 14 insertions, 15 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/filter/XPathExpression.java b/java/broker/src/main/java/org/apache/qpid/server/filter/XPathExpression.java
index 2fdea208f2..f5454afae5 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/filter/XPathExpression.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/filter/XPathExpression.java
@@ -20,27 +20,26 @@ package org.apache.qpid.server.filter;
// Based on like named file from r450141 of the Apache ActiveMQ project <http://www.activemq.org/site/home.html>
//
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.log4j.Logger;
import org.apache.qpid.AMQException;
import org.apache.qpid.server.queue.AMQMessage;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+
/**
* Used to evaluate an XPath Expression in a JMS selector.
*/
public final class XPathExpression implements BooleanExpression {
- private static final Log log = LogFactory.getLog(XPathExpression.class);
+ private static final Logger log = Logger.getLogger(XPathExpression.class);
private static final String EVALUATOR_SYSTEM_PROPERTY = "org.apache.qpid.server.filter.XPathEvaluatorClassName";
private static final String DEFAULT_EVALUATOR_CLASS_NAME=XalanXPathEvaluator.class.getName();
-
+
private static final Constructor EVALUATOR_CONSTRUCTOR;
-
+
static {
- String cn = System.getProperty(EVALUATOR_SYSTEM_PROPERTY, DEFAULT_EVALUATOR_CLASS_NAME);
+ String cn = System.getProperty(EVALUATOR_SYSTEM_PROPERTY, DEFAULT_EVALUATOR_CLASS_NAME);
Constructor m = null;
try {
try {
@@ -66,14 +65,14 @@ public final class XPathExpression implements BooleanExpression {
}
return c.getConstructor(new Class[]{String.class});
}
-
+
private final String xpath;
private final XPathEvaluator evaluator;
-
+
static public interface XPathEvaluator {
public boolean evaluate(AMQMessage message) throws AMQException;
- }
-
+ }
+
XPathExpression(String xpath) {
this.xpath = xpath;
this.evaluator = createEvaluator(xpath);
@@ -112,7 +111,7 @@ public final class XPathExpression implements BooleanExpression {
public String toString() {
return "XPATH "+ConstantExpression.encodeString(xpath);
}
-
+
/**
* @param message
* @return true if the expression evaluates to Boolean.TRUE.
@@ -121,7 +120,7 @@ public final class XPathExpression implements BooleanExpression {
public boolean matches(AMQMessage message) throws AMQException
{
Object object = evaluate(message);
- return object!=null && object==Boolean.TRUE;
+ return object!=null && object==Boolean.TRUE;
}
}