Author: alessio.soldano(a)jboss.com
Date: 2013-06-04 05:27:13 -0400 (Tue, 04 Jun 2013)
New Revision: 17647
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java
Log:
Minor optimization / removal of duplicated code
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java 2013-06-04
08:58:46 UTC (rev 17646)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java 2013-06-04
09:27:13 UTC (rev 17647)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2013, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -76,14 +76,11 @@
if (contextPath.startsWith("/"))
contextPath = contextPath.substring(1);
- final StringBuilder name = new StringBuilder(Endpoint.SEPID_DOMAIN +
":");
- name.append(Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextPath +
",");
- name.append(Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName);
- Endpoint endpoint =
epRegistry.getEndpoint(ObjectNameFactory.create(name.toString()));
+ final ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN +
":" + Endpoint.SEPID_PROPERTY_CONTEXT
+ + "=" + contextPath + "," +
Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName);
+ Endpoint endpoint = epRegistry.getEndpoint(oname);
if (endpoint == null)
{
- ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN +
":" + Endpoint.SEPID_PROPERTY_CONTEXT
- + "=" + contextPath + "," +
Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName);
throw Messages.MESSAGES.cannotObtainEndpoint(oname);
}
Show replies by date