ACTIVEMQ6-61 SelectorParser package conflict with openwire tests

The SelectorParser class in amq6 source code conflicts
with the same class in activemq 5 client jar. The activemq 5
client jar is needed to run openwire tests where the activemq5
client interacts with amq6 broker. In tests they are usually
in the same VM, so depending on the classpath order, whichever
class is loaded it will be used by both client and broker.
Unfortunately the method parse() in the class has different
return types in the client jar and broker side jar.
That will cause NoSuchMethod exception.

The fix moves the broker side class into a different package, i.e.
from
org.apache.activemq.selector.SelectorParser
to
org.apache.activemq.selector.impl.SelectorParser
This commit is contained in:
Howard Gao 2014-12-17 09:56:11 +08:00
parent f282c29661
commit 7ffa23799b
6 changed files with 6 additions and 4 deletions

View File

@ -52,7 +52,7 @@ import javax.transaction.xa.XAResource;
import org.apache.activemq.api.core.ActiveMQException;
import org.apache.activemq.api.core.ActiveMQQueueExistsException;
import org.apache.activemq.selector.filter.FilterException;
import org.apache.activemq.selector.SelectorParser;
import org.apache.activemq.selector.impl.SelectorParser;
import org.apache.activemq.api.core.SimpleString;
import org.apache.activemq.api.core.client.ClientConsumer;
import org.apache.activemq.api.core.client.ClientProducer;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.activemq.selector;
package org.apache.activemq.selector.impl;
import java.util.LinkedHashMap;
import java.util.Map;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.activemq.selector;
package org.apache.activemq.selector.impl;
import java.io.StringReader;

View File

@ -22,6 +22,7 @@ import org.apache.activemq.selector.filter.Expression;
import org.apache.activemq.selector.filter.LogicExpression;
import org.apache.activemq.selector.filter.PropertyExpression;
import org.apache.activemq.selector.filter.XPathExpression;
import org.apache.activemq.selector.impl.SelectorParser;
import org.junit.Assert;
import org.junit.Test;

View File

@ -21,6 +21,7 @@ import java.util.HashMap;
import org.apache.activemq.selector.filter.BooleanExpression;
import org.apache.activemq.selector.filter.FilterException;
import org.apache.activemq.selector.filter.Filterable;
import org.apache.activemq.selector.impl.SelectorParser;
import org.junit.Assert;
import org.junit.Test;

View File

@ -21,7 +21,7 @@ import org.apache.activemq.core.server.ActiveMQServerLogger;
import org.apache.activemq.selector.filter.BooleanExpression;
import org.apache.activemq.selector.filter.FilterException;
import org.apache.activemq.selector.filter.Filterable;
import org.apache.activemq.selector.SelectorParser;
import org.apache.activemq.selector.impl.SelectorParser;
import org.apache.activemq.api.core.FilterConstants;
import org.apache.activemq.api.core.SimpleString;
import org.apache.activemq.core.filter.Filter;