You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by sa...@apache.org on 2012/01/15 15:47:12 UTC
svn commit: r1231678 -
/axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/ListingAgent.java
Author: sagara
Date: Sun Jan 15 14:47:11 2012
New Revision: 1231678
URL: http://svn.apache.org/viewvc?rev=1231678&view=rev
Log:
Did few code cleanup and fixing java warning.
Modified:
axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/ListingAgent.java
Modified: axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/ListingAgent.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/ListingAgent.java?rev=1231678&r1=1231677&r2=1231678&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/ListingAgent.java (original)
+++ axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/ListingAgent.java Sun Jan 15 14:47:11 2012
@@ -116,12 +116,12 @@ public class ListingAgent extends Abstra
public void processExplicitSchemaAndWSDL(HttpServletRequest req,
HttpServletResponse res)
throws IOException, ServletException {
- HashMap services = configContext.getAxisConfiguration().getServices();
+ HashMap<String, AxisService> services = configContext.getAxisConfiguration().getServices();
String filePart = req.getRequestURL().toString();
String schema = filePart.substring(filePart.lastIndexOf("/") + 1,
filePart.length());
if ((services != null) && !services.isEmpty()) {
- Iterator i = services.values().iterator();
+ Iterator<AxisService> i = services.values().iterator();
while (i.hasNext()) {
AxisService service = (AxisService) i.next();
InputStream stream = service.getClassLoader().getResourceAsStream("META-INF/" + schema);
@@ -167,7 +167,7 @@ public class ListingAgent extends Abstra
String url = req.getRequestURL().toString();
String serviceName = extractServiceName(url);
- HashMap services = configContext.getAxisConfiguration().getServices();
+ HashMap<String, AxisService> services = configContext.getAxisConfiguration().getServices();
String query = req.getQueryString();
int wsdl2 = HttpUtils.indexOfIngnoreCase(query, "wsdl2");
int wsdl = HttpUtils.indexOfIngnoreCase(query, "wsdl");
@@ -175,9 +175,8 @@ public class ListingAgent extends Abstra
int policy = HttpUtils.indexOfIngnoreCase(query, "policy");
if ((services != null) && !services.isEmpty()) {
- Object serviceObj = services.get(serviceName);
- if (serviceObj != null) {
- AxisService axisService = (AxisService) serviceObj;
+ AxisService axisService = services.get(serviceName);
+ if (axisService != null) {
if (wsdl2 >= 0) {
handleWSDL2Request(req, res, url, axisService);
return;
@@ -191,7 +190,7 @@ public class ListingAgent extends Abstra
handlePolicyRequest(req, res, serviceName, axisService);
return;
} else {
- req.getSession().setAttribute(Constants.SINGLE_SERVICE, serviceObj);
+ req.getSession().setAttribute(Constants.SINGLE_SERVICE, axisService);
}
} else {
req.getSession().setAttribute(Constants.SINGLE_SERVICE, null);