Fix several eclipse warnings of unused things, and other compiler warnings

This commit is contained in:
Daniel Kulp 2015-01-13 15:03:10 -05:00
parent 2128d4d246
commit ffa396ca2d
5 changed files with 4 additions and 6 deletions

View File

@ -30,6 +30,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class DiscoveryRegistryServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
private static final Logger LOG = LoggerFactory.getLogger(HTTPDiscoveryAgent.class);
long maxKeepAge = 1000*60*60; // 1 hour.

View File

@ -142,6 +142,7 @@ public class HTTPDiscoveryAgent implements DiscoveryAgent, Suspendable {
rc.add(service);
}
}
scanner.close();
return rc;
} catch (Exception e) {
LOG.debug("GET to " + url + " failed with: " + e);

View File

@ -31,7 +31,7 @@ public class HTTPDiscoveryAgentFactory extends DiscoveryAgentFactory {
protected DiscoveryAgent doCreateDiscoveryAgent(URI uri) throws IOException {
try {
Map options = URISupport.parseParameters(uri);
Map<String, String> options = URISupport.parseParameters(uri);
uri = URISupport.removeQuery(uri);
HTTPDiscoveryAgent rc = new HTTPDiscoveryAgent();

View File

@ -31,13 +31,9 @@ import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class HttpTransportServer extends WebTransportServerSupport {
private static final Logger LOG = LoggerFactory.getLogger(HttpTransportServer.class);
private TextWireFormat wireFormat;
private final HttpTransportFactory transportFactory;

View File

@ -142,7 +142,7 @@ public class AMQ2764Test extends TestCase {
protected int doSendMessage(int expectedMessagesReceived, MessageConsumer consumer, ActiveMQConnectionFactory connectionFactory) throws Exception {
int messagesReceived = 0;
for (int i=0; i<expectedMessagesReceived; i++) {
String messageId = sendMessage(connectionFactory);
sendMessage(connectionFactory);
Message message = consumer.receive(5000);
if ( message!=null ) {
messagesReceived++;