You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ni...@apache.org on 2014/04/04 09:58:06 UTC
[4/4] git commit: CXF-5610 clean up the code
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/9c20cb35
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/9c20cb35
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/9c20cb35
Branch: refs/heads/2.6.x-fixes
Commit: 9c20cb35a81d773ad40e48a33885e081462fb34d
Parents: 44ce31d
Author: Willem Jiang <wi...@gmail.com>
Authored: Fri Apr 4 15:20:45 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Fri Apr 4 15:54:55 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/9c20cb35/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 071c1b2..003024a 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
@@ -278,16 +278,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/9c20cb35/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 4fbf1aa..2876a36 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);