Author: pferraro
Date: 2009-01-27 09:46:09 -0500 (Tue, 27 Jan 2009)
New Revision: 2220
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPHandler.java
Log:
Code cleanup ;)
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPHandler.java
===================================================================
---
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPHandler.java 2009-01-27
14:28:55 UTC (rev 2219)
+++
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPHandler.java 2009-01-27
14:46:09 UTC (rev 2220)
@@ -350,11 +350,15 @@
{
Proxy proxy = this.proxies.get(i);
String string = this.sendRequest(request, proxy);
- if (string != null) {
+
+ if (string != null)
+ {
if (result == null)
+ {
result = new StringBuilder();
- result.append("Proxy[").append(i).append("]:
[").append(proxy.getAddress()).append(':').append(proxy.getPort()).append("]:
\r\n");
- result.append(string).append("\r\n");
+ }
+ result.append("Proxy[").append(i).append("]:
[").append(proxy.getAddress()).append(':').append(proxy.getPort()).append("]:
").append(NEW_LINE);
+ result.append(string).append(NEW_LINE);
}
}
}
@@ -362,7 +366,8 @@
{
lock.unlock();
}
- return (result == null) ? null : result.toString();
+
+ return (result != null) ? result.toString() : null;
}
public InetAddress getLocalAddress() throws IOException
Show replies by date