QPIDJMS-83: strip the query before using it to look up the file

Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/fe581f51
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/fe581f51
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/fe581f51

Branch: refs/heads/master
Commit: fe581f51d6962195583a36501efd90446ac0369b
Parents: 80c4e44
Author: Robert Gemmell <[email protected]>
Authored: Fri Jul 3 17:15:40 2015 +0100
Committer: Robert Gemmell <[email protected]>
Committed: Fri Jul 3 17:15:40 2015 +0100

----------------------------------------------------------------------
 .../jms/provider/discovery/file/FileWatcherDiscoveryAgent.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/fe581f51/qpid-jms-discovery/src/main/java/org/apache/qpid/jms/provider/discovery/file/FileWatcherDiscoveryAgent.java
----------------------------------------------------------------------
diff --git 
a/qpid-jms-discovery/src/main/java/org/apache/qpid/jms/provider/discovery/file/FileWatcherDiscoveryAgent.java
 
b/qpid-jms-discovery/src/main/java/org/apache/qpid/jms/provider/discovery/file/FileWatcherDiscoveryAgent.java
index 832d64c..514d2e4 100644
--- 
a/qpid-jms-discovery/src/main/java/org/apache/qpid/jms/provider/discovery/file/FileWatcherDiscoveryAgent.java
+++ 
b/qpid-jms-discovery/src/main/java/org/apache/qpid/jms/provider/discovery/file/FileWatcherDiscoveryAgent.java
@@ -22,6 +22,7 @@ import java.io.IOException;
 import java.io.InputStreamReader;
 import java.net.MalformedURLException;
 import java.net.URI;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.HashSet;
@@ -33,6 +34,7 @@ import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 
+import org.apache.qpid.jms.util.URISupport;
 import org.apache.qpid.jms.provider.discovery.DiscoveryAgent;
 import org.apache.qpid.jms.provider.discovery.DiscoveryListener;
 import org.apache.qpid.jms.util.ThreadPoolUtils;
@@ -59,8 +61,8 @@ public class FileWatcherDiscoveryAgent implements 
DiscoveryAgent {
     private int updateInterval = DEFAULT_UPDATE_INTERVAL;
     private boolean warnOnWatchedReadError;
 
-    public FileWatcherDiscoveryAgent(URI discoveryURI) {
-        this.discoveryURI = discoveryURI;
+    public FileWatcherDiscoveryAgent(URI discoveryURI) throws 
URISyntaxException {
+        this.discoveryURI = URISupport.removeQuery(discoveryURI);
     }
 
     @Override


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to