Repository: cxf Updated Branches: refs/heads/2.6.x-fixes 44ce31d6a -> 9c20cb35a refs/heads/2.7.x-fixes 983e083a0 -> af593943e refs/heads/master 1ef40fca2 -> 7f7be98e9
CXF-5610 clean up the code Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/af593943 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/af593943 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/af593943 Branch: refs/heads/2.7.x-fixes Commit: af593943ee1ef43c22512ca29c7128ea1223b039 Parents: 983e083 Author: Willem Jiang <willem.ji...@gmail.com> Authored: Fri Apr 4 15:20:45 2014 +0800 Committer: Willem Jiang <willem.ji...@gmail.com> Committed: Fri Apr 4 15:23:35 2014 +0800 ---------------------------------------------------------------------- .../transport/http_jetty/JettyHTTPServerEngine.java | 9 +-------- .../http_jetty/JettyHTTPServerEngineTest.java | 15 --------------- 2 files changed, 1 insertion(+), 23 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/af593943/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java ---------------------------------------------------------------------- diff --git a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java index 8c40149..073805b 100644 --- a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java +++ b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java @@ -277,16 +277,9 @@ public class JettyHTTPServerEngine protected void checkRegistedContext(URL url) { String path = url.getPath(); for (String registedPath : registedPaths) { - if (path.equals(registedPath)) { - //|| HttpUrlUtil.checkContextPath(registedPath, path)) { - // Throw the address is already used exception + if (path.equals(registedPath)) { throw new Fault(new Message("ADD_HANDLER_CONTEXT_IS_USED_MSG", LOG, url, registedPath)); } - /* - if (HttpUrlUtil.checkContextPath(path, registedPath)) { - throw new Fault(new Message("ADD_HANDLER_CONTEXT_CONFILICT_MSG", LOG, url, registedPath)); - } - */ } } http://git-wip-us.apache.org/repos/asf/cxf/blob/af593943/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java ---------------------------------------------------------------------- diff --git a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java index 5132379..94aa022 100644 --- a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java +++ b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java @@ -199,21 +199,6 @@ public class JettyHTTPServerEngineTest extends Assert { } catch (Exception ex) { assertTrue("Get a wrong exception message", ex.getMessage().indexOf("hello/test") > 0); } - /* - try { - engine.addServant(new URL(urlStr + "/test"), handler2); - fail("We don't support to publish the two service at the same context path"); - } catch (Exception ex) { - assertTrue("Get a wrong exception message", ex.getMessage().indexOf("hello/test/test") > 0); - } - - try { - engine.addServant(new URL("http://localhost:" + PORT1 + "/hello"), handler2); - fail("We don't support to publish the two service at the same context path"); - } catch (Exception ex) { - assertTrue("Get a wrong exception message", ex.getMessage().indexOf("hello") > 0); - } - */ engine.addServant(new URL(urlStr2), handler2);