Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2014-07-23 06:49:05 +0000
committerGreg Wilkins2014-07-23 06:49:05 +0000
commit3a6879d3e8efb895bf27803735785428f7ed3659 (patch)
treeda489d9b9077b35db3ea20231f35805cf675cf15
parente199b671bb486432498a55b83e5ede89f75d212c (diff)
downloadorg.eclipse.jetty.project-3a6879d3e8efb895bf27803735785428f7ed3659.tar.gz
org.eclipse.jetty.project-3a6879d3e8efb895bf27803735785428f7ed3659.tar.xz
org.eclipse.jetty.project-3a6879d3e8efb895bf27803735785428f7ed3659.zip
expanded tabs in indents
-rw-r--r--jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java4
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/ssl/SslBytesServerTest.java14
-rw-r--r--jetty-deploy/src/test/java/org/eclipse/jetty/deploy/AppLifeCycleTest.java6
-rw-r--r--jetty-deploy/src/test/java/org/eclipse/jetty/deploy/providers/ScanningAppProviderStartupTest.java4
-rw-r--r--jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpContext.java4
-rw-r--r--jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpServer.java538
-rw-r--r--jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpServerProvider.java4
-rw-r--r--jetty-jaas/src/main/java/org/eclipse/jetty/jaas/JAASLoginService.java2
-rw-r--r--jetty-jmx/src/main/java/org/eclipse/jetty/jmx/ConnectorServer.java24
-rw-r--r--jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java4
-rw-r--r--jetty-monitor/src/main/java/org/eclipse/jetty/monitor/jmx/ServiceConnection.java2
-rw-r--r--jetty-nosql/src/main/java/org/eclipse/jetty/nosql/NoSqlSession.java2
-rw-r--r--jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionManager.java4
-rw-r--r--jetty-osgi/jetty-osgi-httpservice/src/main/java/org/eclipse/jetty/osgi/httpservice/HttpServiceErrorHandlerHelper.java22
-rw-r--r--jetty-osgi/jetty-osgi-httpservice/src/main/java/org/eclipse/jetty/osgi/httpservice/HttpServiceErrorPageErrorHandler.java80
-rw-r--r--jetty-overlay-deployer/src/test/java/org/eclipse/jetty/overlays/OverlayServer.java2
-rw-r--r--jetty-plus/src/main/java/org/eclipse/jetty/plus/annotation/ContainerInitializer.java2
-rw-r--r--jetty-rhttp/jetty-rhttp-gateway/src/main/java/org/eclipse/jetty/rhttp/gateway/GatewayServer.java4
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/authentication/DeferredAuthentication.java40
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticator.java8
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandlerCollection.java108
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SelectChannelServerSslTest.java10
-rw-r--r--jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterMapping.java30
-rw-r--r--jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Invoker.java2
-rw-r--r--jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletContextHandler.java6
-rw-r--r--jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java34
-rw-r--r--jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java2
-rw-r--r--jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextDispatchWithQueryStrings.java104
-rw-r--r--jetty-servlets/src/main/java/org/eclipse/jetty/servlets/WelcomeFilter.java6
-rw-r--r--jetty-servlets/src/test/java/org/eclipse/jetty/servlets/CloseableDoSFilterTest.java2
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java6
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java2
-rw-r--r--jetty-util/src/test/java/org/eclipse/jetty/util/URLEncodedTest.java2
-rw-r--r--jetty-util/src/test/java/org/eclipse/jetty/util/resource/ResourceTest.java6
-rw-r--r--jetty-webapp/src/main/java/org/eclipse/jetty/webapp/FragmentConfiguration.java8
-rw-r--r--jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppClassLoader.java2
-rw-r--r--jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java2
-rw-r--r--jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/ClientConnectTest.java22
-rw-r--r--jetty-xml/src/test/java/org/eclipse/jetty/xml/TestConfiguration.java2
-rw-r--r--tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BaseTest.java2
-rw-r--r--tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/SessionValueSavingTest.java32
-rw-r--r--tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionValueSavingTest.java20
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/Counter.java4
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/DateTag.java16
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/Dump.java16
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/HelloWorld.java2
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/LoginServlet.java2
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/RegTest.java2
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/SecureModeServlet.java2
-rw-r--r--tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/Bar.java8
50 files changed, 616 insertions, 616 deletions
diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java
index 2a79a43bd1..8b8d7e28df 100644
--- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java
+++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java
@@ -441,14 +441,14 @@ public class AnnotationConfiguration extends AbstractConfiguration
// Resolve container initializers
List<ContainerInitializer> initializers =
- (List<ContainerInitializer>)context.getAttribute(AnnotationConfiguration.CONTAINER_INITIALIZERS);
+ (List<ContainerInitializer>)context.getAttribute(AnnotationConfiguration.CONTAINER_INITIALIZERS);
if (initializers != null && initializers.size()>0)
{
Map<String, Set<String>> map = ( Map<String, Set<String>>) context.getAttribute(AnnotationConfiguration.CLASS_INHERITANCE_MAP);
if (map == null)
LOG.warn ("ServletContainerInitializers: detected. Class hierarchy: empty");
for (ContainerInitializer i : initializers)
- i.resolveClasses(context,map);
+ i.resolveClasses(context,map);
}
}
diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/ssl/SslBytesServerTest.java b/jetty-client/src/test/java/org/eclipse/jetty/client/ssl/SslBytesServerTest.java
index bdef5f21fd..1f4077f83c 100644
--- a/jetty-client/src/test/java/org/eclipse/jetty/client/ssl/SslBytesServerTest.java
+++ b/jetty-client/src/test/java/org/eclipse/jetty/client/ssl/SslBytesServerTest.java
@@ -1049,9 +1049,9 @@ public class SslBytesServerTest extends SslBytesTest
@Test
public void testRequestWithBigContentWriteBlockedThenReset() throws Exception
{
- // Don't run on Windows (buggy JVM)
- Assume.assumeTrue(!OS.IS_WINDOWS);
-
+ // Don't run on Windows (buggy JVM)
+ Assume.assumeTrue(!OS.IS_WINDOWS);
+
final SSLSocket client = newClient();
SimpleProxy.AutomaticFlow automaticProxyFlow = proxy.startAutomaticFlow();
@@ -1110,10 +1110,10 @@ public class SslBytesServerTest extends SslBytesTest
@Test
public void testRequestWithBigContentReadBlockedThenReset() throws Exception
{
- // Don't run on Windows (buggy JVM)
- Assume.assumeTrue(!OS.IS_WINDOWS);
-
- final SSLSocket client = newClient();
+ // Don't run on Windows (buggy JVM)
+ Assume.assumeTrue(!OS.IS_WINDOWS);
+
+ final SSLSocket client = newClient();
SimpleProxy.AutomaticFlow automaticProxyFlow = proxy.startAutomaticFlow();
client.startHandshake();
diff --git a/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/AppLifeCycleTest.java b/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/AppLifeCycleTest.java
index 78f113967d..d296611946 100644
--- a/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/AppLifeCycleTest.java
+++ b/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/AppLifeCycleTest.java
@@ -36,10 +36,10 @@ import org.junit.Test;
*/
public class AppLifeCycleTest
{
- @Rule
- public TestingDir testdir = new TestingDir();
+ @Rule
+ public TestingDir testdir = new TestingDir();
- private void assertNoPath(String from, String to)
+ private void assertNoPath(String from, String to)
{
assertPath(from,to,new ArrayList<String>());
}
diff --git a/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/providers/ScanningAppProviderStartupTest.java b/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/providers/ScanningAppProviderStartupTest.java
index eb7e0c0e69..949acfd626 100644
--- a/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/providers/ScanningAppProviderStartupTest.java
+++ b/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/providers/ScanningAppProviderStartupTest.java
@@ -30,8 +30,8 @@ import org.junit.Test;
*/
public class ScanningAppProviderStartupTest
{
- @Rule
- public TestingDir testdir = new TestingDir();
+ @Rule
+ public TestingDir testdir = new TestingDir();
private static XmlConfiguredJetty jetty;
@Before
diff --git a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpContext.java b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpContext.java
index 531e02464d..b7b838f274 100644
--- a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpContext.java
+++ b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpContext.java
@@ -97,8 +97,8 @@ public class JettyHttpContext extends com.sun.net.httpserver.HttpContext
@Override
public Authenticator setAuthenticator(Authenticator auth)
{
- Authenticator previous = _authenticator;
- _authenticator = auth;
+ Authenticator previous = _authenticator;
+ _authenticator = auth;
return previous;
}
diff --git a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpServer.java b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpServer.java
index 417169c0ce..7f1af098d4 100644
--- a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpServer.java
+++ b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpServer.java
@@ -1,271 +1,271 @@
-//
-// ========================================================================
-// Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
-// ------------------------------------------------------------------------
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// and Apache License v2.0 which accompanies this distribution.
-//
-// The Eclipse Public License is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// The Apache License v2.0 is available at
-// http://www.opensource.org/licenses/apache2.0.php
-//
-// You may elect to redistribute this code under either of these licenses.
-// ========================================================================
-//
-
-package org.eclipse.jetty.http.spi;
-
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.Executor;
-import java.util.concurrent.ThreadPoolExecutor;
-
-import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.Handler;
-import org.eclipse.jetty.server.NetworkConnector;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.ServerConnector;
-import org.eclipse.jetty.server.handler.ContextHandler;
-import org.eclipse.jetty.server.handler.ContextHandlerCollection;
-import org.eclipse.jetty.server.handler.HandlerCollection;
-import org.eclipse.jetty.util.log.Log;
-import org.eclipse.jetty.util.log.Logger;
-import org.eclipse.jetty.util.thread.ThreadPool;
-
-import com.sun.net.httpserver.HttpContext;
-import com.sun.net.httpserver.HttpHandler;
-
-/**
- * Jetty implementation of {@link com.sun.net.httpserver.HttpServer}.
- */
-public class JettyHttpServer extends com.sun.net.httpserver.HttpServer
+//
+// ========================================================================
+// Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
+// ------------------------------------------------------------------------
+// All rights reserved. This program and the accompanying materials
+// are made available under the terms of the Eclipse Public License v1.0
+// and Apache License v2.0 which accompanies this distribution.
+//
+// The Eclipse Public License is available at
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// The Apache License v2.0 is available at
+// http://www.opensource.org/licenses/apache2.0.php
+//
+// You may elect to redistribute this code under either of these licenses.
+// ========================================================================
+//
+
+package org.eclipse.jetty.http.spi;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ThreadPoolExecutor;
+
+import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.Handler;
+import org.eclipse.jetty.server.NetworkConnector;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.server.handler.ContextHandler;
+import org.eclipse.jetty.server.handler.ContextHandlerCollection;
+import org.eclipse.jetty.server.handler.HandlerCollection;
+import org.eclipse.jetty.util.log.Log;
+import org.eclipse.jetty.util.log.Logger;
+import org.eclipse.jetty.util.thread.ThreadPool;
+
+import com.sun.net.httpserver.HttpContext;
+import com.sun.net.httpserver.HttpHandler;
+
+/**
+ * Jetty implementation of {@link com.sun.net.httpserver.HttpServer}.
+ */
+public class JettyHttpServer extends com.sun.net.httpserver.HttpServer
{
private static final Logger LOG = Log.getLogger(JettyHttpServer.class);
-
-
- private Server _server;
-
- private boolean _serverShared;
-
- private InetSocketAddress _addr;
-
- private ThreadPoolExecutor _executor;
-
- private Map<String, JettyHttpContext> _contexts = new HashMap<String, JettyHttpContext>();
-
- private Map<String, Connector> _connectors = new HashMap<String, Connector>();
-
-
- public JettyHttpServer(Server server, boolean shared)
- {
- this._server = server;
- this._serverShared = shared;
- }
-
- @Override
- public void bind(InetSocketAddress addr, int backlog) throws IOException
- {
- // check if there is already a connector listening
- Collection<NetworkConnector> connectors = _server.getBeans(NetworkConnector.class);
- if (connectors != null)
- {
- for (NetworkConnector connector : connectors)
- {
- if (connector.getPort() == addr.getPort()) {
- if (LOG.isDebugEnabled()) LOG.debug("server already bound to port " + addr.getPort() + ", no need to rebind");
- return;
- }
- }
- }
-
- if (_serverShared)
- throw new IOException("jetty server is not bound to port " + addr.getPort());
-
- this._addr = addr;
-
- if (LOG.isDebugEnabled()) LOG.debug("binding server to port " + addr.getPort());
- ServerConnector connector = new ServerConnector(_server);
- connector.setPort(addr.getPort());
- connector.setHost(addr.getHostName());
- _server.addConnector(connector);
-
- _connectors.put(addr.getHostName() + addr.getPort(), connector);
- }
-
- @Override
- public InetSocketAddress getAddress()
- {
- return _addr;
- }
-
- @Override
- public void start()
- {
- if (_serverShared) return;
-
- try
- {
- _server.start();
- }
- catch (Exception ex)
- {
- throw new RuntimeException(ex);
- }
- }
-
- @Override
- public void setExecutor(Executor executor)
- {
- if (executor == null)
- throw new IllegalArgumentException("missing required 'executor' argument");
- ThreadPool threadPool = _server.getThreadPool();
- if (threadPool instanceof DelegatingThreadPool)
- ((DelegatingThreadPool)_server.getThreadPool()).setExecutor(executor);
- else
- throw new UnsupportedOperationException("!DelegatingThreadPool");
- }
-
- @Override
- public Executor getExecutor()
- {
- ThreadPool threadPool = _server.getThreadPool();
- if (threadPool instanceof DelegatingThreadPool)
- return ((DelegatingThreadPool)_server.getThreadPool()).getExecutor();
- return threadPool;
- }
-
- @Override
- public void stop(int delay)
- {
- cleanUpContexts();
- cleanUpConnectors();
-
- if (_serverShared) return;
-
- try
- {
- _server.stop();
- }
- catch (Exception ex)
- {
- throw new RuntimeException(ex);
- }
- }
-
- private void cleanUpContexts()
- {
- for (Map.Entry<String, JettyHttpContext> stringJettyHttpContextEntry : _contexts.entrySet())
- {
- JettyHttpContext context = stringJettyHttpContextEntry.getValue();
- _server.removeBean(context.getJettyContextHandler());
- }
- _contexts.clear();
- }
-
- private void cleanUpConnectors()
- {
- for (Map.Entry<String, Connector> stringConnectorEntry : _connectors.entrySet())
- {
- Connector connector = stringConnectorEntry.getValue();
- try
- {
- connector.stop();
- } catch (Exception ex) {
- LOG.warn(ex);
- }
- _server.removeConnector(connector);
- }
- _connectors.clear();
- }
-
- @Override
- public HttpContext createContext(String path, HttpHandler httpHandler)
- {
- checkIfContextIsFree(path);
-
- JettyHttpContext context = new JettyHttpContext(this, path, httpHandler);
- HttpSpiContextHandler jettyContextHandler = context.getJettyContextHandler();
-
- ContextHandlerCollection chc = findContextHandlerCollection(_server.getHandlers());
- if (chc == null)
- throw new RuntimeException("could not find ContextHandlerCollection, you must configure one");
-
- chc.addHandler(jettyContextHandler);
- _contexts.put(path, context);
-
- return context;
- }
-
- private ContextHandlerCollection findContextHandlerCollection(Handler[] handlers)
- {
- if (handlers == null)
- return null;
-
- for (Handler handler : handlers)
- {
- if (handler instanceof ContextHandlerCollection)
- {
- return (ContextHandlerCollection) handler;
- }
-
- if (handler instanceof HandlerCollection)
- {
- HandlerCollection hc = (HandlerCollection) handler;
- ContextHandlerCollection chc = findContextHandlerCollection(hc.getHandlers());
- if (chc != null)
- return chc;
- }
- }
- return null;
- }
-
- private void checkIfContextIsFree(String path)
- {
- Handler serverHandler = _server.getHandler();
- if (serverHandler instanceof ContextHandler)
- {
- ContextHandler ctx = (ContextHandler) serverHandler;
- if (ctx.getContextPath().equals(path))
- throw new RuntimeException("another context already bound to path " + path);
- }
-
- Handler[] handlers = _server.getHandlers();
- if (handlers == null) return;
-
- for (Handler handler : handlers)
- {
- if (handler instanceof ContextHandler) {
- ContextHandler ctx = (ContextHandler) handler;
- if (ctx.getContextPath().equals(path))
- throw new RuntimeException("another context already bound to path " + path);
- }
- }
- }
-
- @Override
- public HttpContext createContext(String path)
- {
- return createContext(path, null);
- }
-
- @Override
- public void removeContext(String path) throws IllegalArgumentException
- {
- JettyHttpContext context = _contexts.remove(path);
- if (context == null) return;
- _server.removeBean(context.getJettyContextHandler());
- }
-
- @Override
- public void removeContext(HttpContext context)
- {
- removeContext(context.getPath());
- }
-
-}
+
+
+ private Server _server;
+
+ private boolean _serverShared;
+
+ private InetSocketAddress _addr;
+
+ private ThreadPoolExecutor _executor;
+
+ private Map<String, JettyHttpContext> _contexts = new HashMap<String, JettyHttpContext>();
+
+ private Map<String, Connector> _connectors = new HashMap<String, Connector>();
+
+
+ public JettyHttpServer(Server server, boolean shared)
+ {
+ this._server = server;
+ this._serverShared = shared;
+ }
+
+ @Override
+ public void bind(InetSocketAddress addr, int backlog) throws IOException
+ {
+ // check if there is already a connector listening
+ Collection<NetworkConnector> connectors = _server.getBeans(NetworkConnector.class);
+ if (connectors != null)
+ {
+ for (NetworkConnector connector : connectors)
+ {
+ if (connector.getPort() == addr.getPort()) {
+ if (LOG.isDebugEnabled()) LOG.debug("server already bound to port " + addr.getPort() + ", no need to rebind");
+ return;
+ }
+ }
+ }
+
+ if (_serverShared)
+ throw new IOException("jetty server is not bound to port " + addr.getPort());
+
+ this._addr = addr;
+
+ if (LOG.isDebugEnabled()) LOG.debug("binding server to port " + addr.getPort());
+ ServerConnector connector = new ServerConnector(_server);
+ connector.setPort(addr.getPort());
+ connector.setHost(addr.getHostName());
+ _server.addConnector(connector);
+
+ _connectors.put(addr.getHostName() + addr.getPort(), connector);
+ }
+
+ @Override
+ public InetSocketAddress getAddress()
+ {
+ return _addr;
+ }
+
+ @Override
+ public void start()
+ {
+ if (_serverShared) return;
+
+ try
+ {
+ _server.start();
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ @Override
+ public void setExecutor(Executor executor)
+ {
+ if (executor == null)
+ throw new IllegalArgumentException("missing required 'executor' argument");
+ ThreadPool threadPool = _server.getThreadPool();
+ if (threadPool instanceof DelegatingThreadPool)
+ ((DelegatingThreadPool)_server.getThreadPool()).setExecutor(executor);
+ else
+ throw new UnsupportedOperationException("!DelegatingThreadPool");
+ }
+
+ @Override
+ public Executor getExecutor()
+ {
+ ThreadPool threadPool = _server.getThreadPool();
+ if (threadPool instanceof DelegatingThreadPool)
+ return ((DelegatingThreadPool)_server.getThreadPool()).getExecutor();
+ return threadPool;
+ }
+
+ @Override
+ public void stop(int delay)
+ {
+ cleanUpContexts();
+ cleanUpConnectors();
+
+ if (_serverShared) return;
+
+ try
+ {
+ _server.stop();
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ private void cleanUpContexts()
+ {
+ for (Map.Entry<String, JettyHttpContext> stringJettyHttpContextEntry : _contexts.entrySet())
+ {
+ JettyHttpContext context = stringJettyHttpContextEntry.getValue();
+ _server.removeBean(context.getJettyContextHandler());
+ }
+ _contexts.clear();
+ }
+
+ private void cleanUpConnectors()
+ {
+ for (Map.Entry<String, Connector> stringConnectorEntry : _connectors.entrySet())
+ {
+ Connector connector = stringConnectorEntry.getValue();
+ try
+ {
+ connector.stop();
+ } catch (Exception ex) {
+ LOG.warn(ex);
+ }
+ _server.removeConnector(connector);
+ }
+ _connectors.clear();
+ }
+
+ @Override
+ public HttpContext createContext(String path, HttpHandler httpHandler)
+ {
+ checkIfContextIsFree(path);
+
+ JettyHttpContext context = new JettyHttpContext(this, path, httpHandler);
+ HttpSpiContextHandler jettyContextHandler = context.getJettyContextHandler();
+
+ ContextHandlerCollection chc = findContextHandlerCollection(_server.getHandlers());
+ if (chc == null)
+ throw new RuntimeException("could not find ContextHandlerCollection, you must configure one");
+
+ chc.addHandler(jettyContextHandler);
+ _contexts.put(path, context);
+
+ return context;
+ }
+
+ private ContextHandlerCollection findContextHandlerCollection(Handler[] handlers)
+ {
+ if (handlers == null)
+ return null;
+
+ for (Handler handler : handlers)
+ {
+ if (handler instanceof ContextHandlerCollection)
+ {
+ return (ContextHandlerCollection) handler;
+ }
+
+ if (handler instanceof HandlerCollection)
+ {
+ HandlerCollection hc = (HandlerCollection) handler;
+ ContextHandlerCollection chc = findContextHandlerCollection(hc.getHandlers());
+ if (chc != null)
+ return chc;
+ }
+ }
+ return null;
+ }
+
+ private void checkIfContextIsFree(String path)
+ {
+ Handler serverHandler = _server.getHandler();
+ if (serverHandler instanceof ContextHandler)
+ {
+ ContextHandler ctx = (ContextHandler) serverHandler;
+ if (ctx.getContextPath().equals(path))
+ throw new RuntimeException("another context already bound to path " + path);
+ }
+
+ Handler[] handlers = _server.getHandlers();
+ if (handlers == null) return;
+
+ for (Handler handler : handlers)
+ {
+ if (handler instanceof ContextHandler) {
+ ContextHandler ctx = (ContextHandler) handler;
+ if (ctx.getContextPath().equals(path))
+ throw new RuntimeException("another context already bound to path " + path);
+ }
+ }
+ }
+
+ @Override
+ public HttpContext createContext(String path)
+ {
+ return createContext(path, null);
+ }
+
+ @Override
+ public void removeContext(String path) throws IllegalArgumentException
+ {
+ JettyHttpContext context = _contexts.remove(path);
+ if (context == null) return;
+ _server.removeBean(context.getJettyContextHandler());
+ }
+
+ @Override
+ public void removeContext(HttpContext context)
+ {
+ removeContext(context.getPath());
+ }
+
+}
diff --git a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpServerProvider.java b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpServerProvider.java
index 39083bb207..6cff91d55e 100644
--- a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpServerProvider.java
+++ b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpServerProvider.java
@@ -43,7 +43,7 @@ public class JettyHttpServerProvider extends HttpServerProvider
public static void setServer(Server server)
{
- _server = server;
+ _server = server;
}
@Override
@@ -51,7 +51,7 @@ public class JettyHttpServerProvider extends HttpServerProvider
throws IOException
{
Server server = _server;
- boolean shared = true;
+ boolean shared = true;
if (server == null)
{
diff --git a/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/JAASLoginService.java b/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/JAASLoginService.java
index a46ff32034..d850e65ad4 100644
--- a/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/JAASLoginService.java
+++ b/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/JAASLoginService.java
@@ -210,7 +210,7 @@ public class JAASLoginService extends AbstractLifeCycle implements LoginService
}
else if (callback instanceof RequestParameterCallback)
{
- HttpChannel channel = HttpChannel.getCurrentHttpChannel();
+ HttpChannel channel = HttpChannel.getCurrentHttpChannel();
if (channel == null)
return;
diff --git a/jetty-jmx/src/main/java/org/eclipse/jetty/jmx/ConnectorServer.java b/jetty-jmx/src/main/java/org/eclipse/jetty/jmx/ConnectorServer.java
index 4062400185..343de02d9b 100644
--- a/jetty-jmx/src/main/java/org/eclipse/jetty/jmx/ConnectorServer.java
+++ b/jetty-jmx/src/main/java/org/eclipse/jetty/jmx/ConnectorServer.java
@@ -82,23 +82,23 @@ public class ConnectorServer extends AbstractLifeCycle
public ConnectorServer(JMXServiceURL svcUrl, Map<String,?> environment, String name)
throws Exception
{
- String urlPath = svcUrl.getURLPath();
- int idx = urlPath.indexOf("rmi://");
- if (idx > 0)
- {
- String hostPort = urlPath.substring(idx+6, urlPath.indexOf('/', idx+6));
- String regHostPort = startRegistry(hostPort);
- if (regHostPort != null) {
- urlPath = urlPath.replace(hostPort,regHostPort);
- svcUrl = new JMXServiceURL(svcUrl.getProtocol(), svcUrl.getHost(), svcUrl.getPort(), urlPath);
- }
- }
+ String urlPath = svcUrl.getURLPath();
+ int idx = urlPath.indexOf("rmi://");
+ if (idx > 0)
+ {
+ String hostPort = urlPath.substring(idx+6, urlPath.indexOf('/', idx+6));
+ String regHostPort = startRegistry(hostPort);
+ if (regHostPort != null) {
+ urlPath = urlPath.replace(hostPort,regHostPort);
+ svcUrl = new JMXServiceURL(svcUrl.getProtocol(), svcUrl.getHost(), svcUrl.getPort(), urlPath);
+ }
+ }
MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();
_connectorServer = JMXConnectorServerFactory.newJMXConnectorServer(svcUrl, environment, mbeanServer);
mbeanServer.registerMBean(_connectorServer,new ObjectName(name));
}
- /* ------------------------------------------------------------ */
+ /* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart()
*/
diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java
index 265e2852a7..6bdb013412 100644
--- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java
+++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java
@@ -139,7 +139,7 @@ public class JettyWebAppContext extends WebAppContext
}
public void setContainerIncludeJarPattern(String pattern)
{
- _containerIncludeJarPattern = pattern;
+ _containerIncludeJarPattern = pattern;
}
public String getContainerIncludeJarPattern()
@@ -150,7 +150,7 @@ public class JettyWebAppContext extends WebAppContext
public String getWebInfIncludeJarPattern()
{
- return _webInfIncludeJarPattern;
+ return _webInfIncludeJarPattern;
}
public void setWebInfIncludeJarPattern(String pattern)
{
diff --git a/jetty-monitor/src/main/java/org/eclipse/jetty/monitor/jmx/ServiceConnection.java b/jetty-monitor/src/main/java/org/eclipse/jetty/monitor/jmx/ServiceConnection.java
index 0f11428ff7..bdce382fed 100644
--- a/jetty-monitor/src/main/java/org/eclipse/jetty/monitor/jmx/ServiceConnection.java
+++ b/jetty-monitor/src/main/java/org/eclipse/jetty/monitor/jmx/ServiceConnection.java
@@ -82,7 +82,7 @@ public class ServiceConnection
*/
public String getServiceUrl()
{
- return _serviceUrl;
+ return _serviceUrl;
}
/* ------------------------------------------------------------ */
diff --git a/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/NoSqlSession.java b/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/NoSqlSession.java
index 8b732d4d2b..ae92051e7a 100644
--- a/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/NoSqlSession.java
+++ b/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/NoSqlSession.java
@@ -207,7 +207,7 @@ public class NoSqlSession extends MemSession
/* ------------------------------------------------------------ */
public Object getVersion()
{
- return _version;
+ return _version;
}
@Override
diff --git a/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionManager.java b/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionManager.java
index d8556da87a..50384666f5 100644
--- a/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionManager.java
+++ b/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionManager.java
@@ -654,7 +654,7 @@ public class MongoSessionManager extends NoSqlSessionManager
/*------------------------------------------------------------ */
private String getContextKey()
{
- return __CONTEXT + "." + _contextId;
+ return __CONTEXT + "." + _contextId;
}
/*------------------------------------------------------------ */
@@ -664,7 +664,7 @@ public class MongoSessionManager extends NoSqlSessionManager
*/
private String getContextAttributeKey(String attr)
{
- return getContextKey()+ "." + attr;
+ return getContextKey()+ "." + attr;
}
@ManagedOperation(value="purge invalid sessions in the session store based on normal criteria", impact="ACTION")
diff --git a/jetty-osgi/jetty-osgi-httpservice/src/main/java/org/eclipse/jetty/osgi/httpservice/HttpServiceErrorHandlerHelper.java b/jetty-osgi/jetty-osgi-httpservice/src/main/java/org/eclipse/jetty/osgi/httpservice/HttpServiceErrorHandlerHelper.java
index 35f186681f..f8fdc636f8 100644
--- a/jetty-osgi/jetty-osgi-httpservice/src/main/java/org/eclipse/jetty/osgi/httpservice/HttpServiceErrorHandlerHelper.java
+++ b/jetty-osgi/jetty-osgi-httpservice/src/main/java/org/eclipse/jetty/osgi/httpservice/HttpServiceErrorHandlerHelper.java
@@ -30,16 +30,16 @@ import javax.servlet.http.HttpServlet;
*/
public class HttpServiceErrorHandlerHelper
{
- private static HttpServlet _customErrorHandler;
+ private static HttpServlet _customErrorHandler;
- public static HttpServlet getCustomErrorHandler()
- {
- return _customErrorHandler;
- }
-
- public static void setHttpServiceErrorHandler(HttpServlet servlet)
- {
- _customErrorHandler = servlet;
- }
-
+ public static HttpServlet getCustomErrorHandler()
+ {
+ return _customErrorHandler;
+ }
+
+ public static void setHttpServiceErrorHandler(HttpServlet servlet)
+ {
+ _customErrorHandler = servlet;
+ }
+
}
diff --git a/jetty-osgi/jetty-osgi-httpservice/src/main/java/org/eclipse/jetty/osgi/httpservice/HttpServiceErrorPageErrorHandler.java b/jetty-osgi/jetty-osgi-httpservice/src/main/java/org/eclipse/jetty/osgi/httpservice/HttpServiceErrorPageErrorHandler.java
index 1b08f9b13a..e9ebc85562 100644
--- a/jetty-osgi/jetty-osgi-httpservice/src/main/java/org/eclipse/jetty/osgi/httpservice/HttpServiceErrorPageErrorHandler.java
+++ b/jetty-osgi/jetty-osgi-httpservice/src/main/java/org/eclipse/jetty/osgi/httpservice/HttpServiceErrorPageErrorHandler.java
@@ -35,46 +35,46 @@ import org.eclipse.jetty.servlet.ErrorPageErrorHandler;
public class HttpServiceErrorPageErrorHandler extends ErrorPageErrorHandler
{
- private static HttpServiceErrorPageErrorHandler INSTANCE;
-
- public static HttpServiceErrorPageErrorHandler getInstance()
- {
- return INSTANCE;
- }
-
- public HttpServiceErrorPageErrorHandler()
- {
- INSTANCE = this;
- }
+ private static HttpServiceErrorPageErrorHandler INSTANCE;
+
+ public static HttpServiceErrorPageErrorHandler getInstance()
+ {
+ return INSTANCE;
+ }
+
+ public HttpServiceErrorPageErrorHandler()
+ {
+ INSTANCE = this;
+ }
- @Override
- public void handle(String target, Request baseRequest,
- HttpServletRequest request, HttpServletResponse response)
- throws IOException {
- if (HttpServiceErrorHandlerHelper.getCustomErrorHandler() != null)
- {
- try
- {
- HttpServiceErrorHandlerHelper.getCustomErrorHandler().service(request, response);
- }
- catch (ServletException e)
- {
- //well
- }
- }
- if (!response.isCommitted())
- {
- super.handle(target, baseRequest, request, response);
- }
- }
+ @Override
+ public void handle(String target, Request baseRequest,
+ HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
+ if (HttpServiceErrorHandlerHelper.getCustomErrorHandler() != null)
+ {
+ try
+ {
+ HttpServiceErrorHandlerHelper.getCustomErrorHandler().service(request, response);
+ }
+ catch (ServletException e)
+ {
+ //well
+ }
+ }
+ if (!response.isCommitted())
+ {
+ super.handle(target, baseRequest, request, response);
+ }
+ }
- @Override
- protected void doStop() throws Exception
- {
- INSTANCE = null;
- super.doStop();
- }
-
-
-
+ @Override
+ protected void doStop() throws Exception
+ {
+ INSTANCE = null;
+ super.doStop();
+ }
+
+
+
}
diff --git a/jetty-overlay-deployer/src/test/java/org/eclipse/jetty/overlays/OverlayServer.java b/jetty-overlay-deployer/src/test/java/org/eclipse/jetty/overlays/OverlayServer.java
index 8a6f4e7f7a..c7cb7d977e 100644
--- a/jetty-overlay-deployer/src/test/java/org/eclipse/jetty/overlays/OverlayServer.java
+++ b/jetty-overlay-deployer/src/test/java/org/eclipse/jetty/overlays/OverlayServer.java
@@ -86,7 +86,7 @@ public class OverlayServer
server.setStopAtShutdown(true);
//server.setSendServerVersion(true);
- // Uncomment to work with JNDI examples
+ // Uncomment to work with JNDI examples
// new org.eclipse.jetty.plus.jndi.Transaction(new com.atomikos.icatch.jta.UserTransactionImp());
diff --git a/jetty-plus/src/main/java/org/eclipse/jetty/plus/annotation/ContainerInitializer.java b/jetty-plus/src/main/java/org/eclipse/jetty/plus/annotation/ContainerInitializer.java
index 66557c5f25..8176916cc5 100644
--- a/jetty-plus/src/main/java/org/eclipse/jetty/plus/annotation/ContainerInitializer.java
+++ b/jetty-plus/src/main/java/org/eclipse/jetty/plus/annotation/ContainerInitializer.java
@@ -157,7 +157,7 @@ public class ContainerInitializer
interested.add(c.getName());
}
- return String.format("ContainerInitializer{%s,interested=%s,applicable=%s,annotated=%s}",_target.getClass().getName(),interested,_applicableTypeNames,_annotatedTypeNames);
+ return String.format("ContainerInitializer{%s,interested=%s,applicable=%s,annotated=%s}",_target.getClass().getName(),interested,_applicableTypeNames,_annotatedTypeNames);
}
public void resolveClasses(WebAppContext context, Map<String, Set<String>> classMap)
diff --git a/jetty-rhttp/jetty-rhttp-gateway/src/main/java/org/eclipse/jetty/rhttp/gateway/GatewayServer.java b/jetty-rhttp/jetty-rhttp-gateway/src/main/java/org/eclipse/jetty/rhttp/gateway/GatewayServer.java
index 83068d10d7..713b4fe0ee 100644
--- a/jetty-rhttp/jetty-rhttp-gateway/src/main/java/org/eclipse/jetty/rhttp/gateway/GatewayServer.java
+++ b/jetty-rhttp/jetty-rhttp-gateway/src/main/java/org/eclipse/jetty/rhttp/gateway/GatewayServer.java
@@ -102,7 +102,7 @@ public class GatewayServer extends Server
public GatewayServer()
{
- this("",DFT_EXT_PATH,DFT_CONNECT_PATH,new StandardTargetIdRetriever());
+ this("",DFT_EXT_PATH,DFT_CONNECT_PATH,new StandardTargetIdRetriever());
}
public GatewayServer(String contextPath, String externalServletPath,String gatewayServletPath, TargetIdRetriever targetIdRetriever)
@@ -145,7 +145,7 @@ public class GatewayServer extends Server
public Gateway getGateway()
{
- return gateway;
+ return gateway;
}
public ServletHolder getExternalServlet()
diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/DeferredAuthentication.java b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/DeferredAuthentication.java
index df0f7d92f3..fe4c64b8bb 100644
--- a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/DeferredAuthentication.java
+++ b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/DeferredAuthentication.java
@@ -331,28 +331,28 @@ public class DeferredAuthentication implements Authentication.Deferred
}
@Override
- public Collection<String> getHeaderNames()
- {
- return Collections.emptyList();
- }
-
- @Override
- public String getHeader(String arg0)
- {
- return null;
- }
-
- @Override
- public Collection<String> getHeaders(String arg0)
- {
+ public Collection<String> getHeaderNames()
+ {
return Collections.emptyList();
- }
+ }
+
+ @Override
+ public String getHeader(String arg0)
+ {
+ return null;
+ }
- @Override
- public int getStatus()
- {
- return 0;
- }
+ @Override
+ public Collection<String> getHeaders(String arg0)
+ {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public int getStatus()
+ {
+ return 0;
+ }
};
diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticator.java b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticator.java
index 8469c0a800..e0248b2e59 100644
--- a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticator.java
+++ b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticator.java
@@ -50,7 +50,7 @@ public class SpnegoAuthenticator extends LoginAuthenticator
*/
public SpnegoAuthenticator( String authMethod )
{
- _authMethod = authMethod;
+ _authMethod = authMethod;
}
@Override
@@ -77,10 +77,10 @@ public class SpnegoAuthenticator extends LoginAuthenticator
{
try
{
- if (DeferredAuthentication.isDeferred(res))
- {
+ if (DeferredAuthentication.isDeferred(res))
+ {
return Authentication.UNAUTHENTICATED;
- }
+ }
LOG.debug("SpengoAuthenticator: sending challenge");
res.setHeader(HttpHeader.WWW_AUTHENTICATE.asString(), HttpHeader.NEGOTIATE.asString());
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandlerCollection.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandlerCollection.java
index 19396d49ea..2d77d1c2af 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandlerCollection.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandlerCollection.java
@@ -173,64 +173,64 @@ public class ContextHandlerCollection extends HandlerCollection
{
Handler[] handlers = getHandlers();
if (handlers==null || handlers.length==0)
- return;
+ return;
- HttpChannelState async = baseRequest.getHttpChannelState();
- if (async.isAsync())
- {
- ContextHandler context=async.getContextHandler();
- if (context!=null)
- {
- Handler branch = _contextBranches.get(context);
-
- if (branch==null)
- context.handle(target,baseRequest,request, response);
- else
- branch.handle(target, baseRequest, request, response);
- return;
- }
- }
-
- // data structure which maps a request to a context; first-best match wins
- // { context path => [ context ] }
- // }
- if (target.startsWith("/"))
- {
- int limit = target.length()-1;
+ HttpChannelState async = baseRequest.getHttpChannelState();
+ if (async.isAsync())
+ {
+ ContextHandler context=async.getContextHandler();
+ if (context!=null)
+ {
+ Handler branch = _contextBranches.get(context);
+
+ if (branch==null)
+ context.handle(target,baseRequest,request, response);
+ else
+ branch.handle(target, baseRequest, request, response);
+ return;
+ }
+ }
+
+ // data structure which maps a request to a context; first-best match wins
+ // { context path => [ context ] }
+ // }
+ if (target.startsWith("/"))
+ {
+ int limit = target.length()-1;
- while (limit>=0)
- {
- // Get best match
- Map.Entry<String,Branch[]> branches = _pathBranches.getBest(target,1,limit);
-
-
- if (branches==null)
- break;
+ while (limit>=0)
+ {
+ // Get best match
+ Map.Entry<String,Branch[]> branches = _pathBranches.getBest(target,1,limit);
+
- int l=branches.getKey().length();
- if (l==1 || target.length()==l || target.charAt(l)=='/')
- {
- for (Branch branch : branches.getValue())
- {
- branch.getHandler().handle(target,baseRequest, request, response);
- if (baseRequest.isHandled())
- return;
- }
- }
-
- limit=l-2;
- }
- }
- else
- {
+ if (branches==null)
+ break;
+
+ int l=branches.getKey().length();
+ if (l==1 || target.length()==l || target.charAt(l)=='/')
+ {
+ for (Branch branch : branches.getValue())
+ {
+ branch.getHandler().handle(target,baseRequest, request, response);
+ if (baseRequest.isHandled())
+ return;
+ }
+ }
+
+ limit=l-2;
+ }
+ }
+ else
+ {
// This may not work in all circumstances... but then I think it should never be called
- for (int i=0;i<handlers.length;i++)
- {
- handlers[i].handle(target,baseRequest, request, response);
- if ( baseRequest.isHandled())
- return;
- }
- }
+ for (int i=0;i<handlers.length;i++)
+ {
+ handlers[i].handle(target,baseRequest, request, response);
+ if ( baseRequest.isHandled())
+ return;
+ }
+ }
}
/* ------------------------------------------------------------ */
diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SelectChannelServerSslTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SelectChannelServerSslTest.java
index 6cc241a9b0..6c5addb60d 100644
--- a/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SelectChannelServerSslTest.java
+++ b/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SelectChannelServerSslTest.java
@@ -63,9 +63,9 @@ public class SelectChannelServerSslTest extends HttpServerTestBase
@Override
public void testFullMethod() throws Exception
{
- // Don't run on Windows (buggy JVM)
- Assume.assumeTrue(!OS.IS_WINDOWS);
-
+ // Don't run on Windows (buggy JVM)
+ Assume.assumeTrue(!OS.IS_WINDOWS);
+
try
{
super.testFullMethod();
@@ -79,8 +79,8 @@ public class SelectChannelServerSslTest extends HttpServerTestBase
@Override
public void testFullURI() throws Exception
{
- // Don't run on Windows (buggy JVM)
- Assume.assumeTrue(!OS.IS_WINDOWS);
+ // Don't run on Windows (buggy JVM)
+ Assume.assumeTrue(!OS.IS_WINDOWS);
try
{
super.testFullURI();
diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterMapping.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterMapping.java
index 05eec85a86..d8265842f9 100644
--- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterMapping.java
+++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterMapping.java
@@ -66,19 +66,19 @@ public class FilterMapping implements Dumpable
*/
public static int dispatch(DispatcherType type)
{
- switch(type)
- {
- case REQUEST:
- return REQUEST;
- case ASYNC:
- return ASYNC;
- case FORWARD:
- return FORWARD;
- case INCLUDE:
- return INCLUDE;
- case ERROR:
- return ERROR;
- }
+ switch(type)
+ {
+ case REQUEST:
+ return REQUEST;
+ case ASYNC:
+ return ASYNC;
+ case FORWARD:
+ return FORWARD;
+ case INCLUDE:
+ return INCLUDE;
+ case ERROR:
+ return ERROR;
+ }
throw new IllegalArgumentException(type.toString());
}
@@ -123,8 +123,8 @@ public class FilterMapping implements Dumpable
*/
boolean appliesTo(int type)
{
- if (_dispatches==0)
- return type==REQUEST || type==ASYNC && _holder.isAsyncSupported();
+ if (_dispatches==0)
+ return type==REQUEST || type==ASYNC && _holder.isAsyncSupported();
return (_dispatches&type)!=0;
}
diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Invoker.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Invoker.java
index 62bd87ccef..b7f0e748f7 100644
--- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Invoker.java
+++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Invoker.java
@@ -112,7 +112,7 @@ public class Invoker extends HttpServlet
/* ------------------------------------------------------------ */
protected void service(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException
+ throws ServletException, IOException
{
// Get the requested path and info
boolean included=false;
diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletContextHandler.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletContextHandler.java
index e080e55ec6..7e2e22e6fc 100644
--- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletContextHandler.java
+++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletContextHandler.java
@@ -288,9 +288,9 @@ public class ServletContextHandler extends ContextHandler
decorator.decorate(holder.getListener());
}
}
- }
- }
-
+ }
+ }
+
super.startContext();
// OK to Initialize servlet handler now that all relevant object trees have been started
diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java
index 371ed3021b..e650a709fc 100644
--- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java
+++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java
@@ -751,23 +751,23 @@ public class ServletHandler extends ScopedHandler
final Map<String,FilterChain> cache=_chainCache[dispatch];
final Queue<String> lru=_chainLRU[dispatch];
- // Do we have too many cached chains?
- while (_maxFilterChainsCacheSize>0 && cache.size()>=_maxFilterChainsCacheSize)
- {
- // The LRU list is not atomic with the cache map, so be prepared to invalidate if
- // a key is not found to delete.
- // Delete by LRU (where U==created)
- String k=lru.poll();
- if (k==null)
- {
- cache.clear();
- break;
- }
- cache.remove(k);
- }
-
- cache.put(key,chain);
- lru.add(key);
+ // Do we have too many cached chains?
+ while (_maxFilterChainsCacheSize>0 && cache.size()>=_maxFilterChainsCacheSize)
+ {
+ // The LRU list is not atomic with the cache map, so be prepared to invalidate if
+ // a key is not found to delete.
+ // Delete by LRU (where U==created)
+ String k=lru.poll();
+ if (k==null)
+ {
+ cache.clear();
+ break;
+ }
+ cache.remove(k);
+ }
+
+ cache.put(key,chain);
+ lru.add(key);
}
else if (filters.size() > 0)
chain = new Chain(baseRequest,filters, servletHolder);
diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java
index 32a6d3de6c..ee57e2ab7d 100644
--- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java
+++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java
@@ -569,7 +569,7 @@ public class ServletHolder extends Holder<Servlet> implements UserIdentity.Scope
/* ------------------------------------------------------------ */
private void initServlet()
- throws ServletException
+ throws ServletException
{
Object old_run_as = null;
try
diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextDispatchWithQueryStrings.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextDispatchWithQueryStrings.java
index ce220866e0..ac91ca79f5 100644
--- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextDispatchWithQueryStrings.java
+++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextDispatchWithQueryStrings.java
@@ -45,67 +45,67 @@ import org.junit.Test;
*/
public class AsyncContextDispatchWithQueryStrings {
- private Server _server = new Server();
- private ServletContextHandler _contextHandler = new ServletContextHandler(ServletContextHandler.NO_SESSIONS);
- private LocalConnector _connector = new LocalConnector(_server);
+ private Server _server = new Server();
+ private ServletContextHandler _contextHandler = new ServletContextHandler(ServletContextHandler.NO_SESSIONS);
+ private LocalConnector _connector = new LocalConnector(_server);
- @Before
- public void setUp() throws Exception {
- _connector.setIdleTimeout(30000);
- _server.setConnectors(new Connector[] { _connector });
+ @Before
+ public void setUp() throws Exception {
+ _connector.setIdleTimeout(30000);
+ _server.setConnectors(new Connector[] { _connector });
- _contextHandler.setContextPath("/");
- _contextHandler.addServlet(new ServletHolder(new TestServlet()), "/initialCall");
- _contextHandler.addServlet(new ServletHolder(new TestServlet()), "/firstDispatchWithNewQueryString");
- _contextHandler.addServlet(new ServletHolder(new TestServlet()), "/secondDispatchNewValueForExistingQueryString");
+ _contextHandler.setContextPath("/");
+ _contextHandler.addServlet(new ServletHolder(new TestServlet()), "/initialCall");
+ _contextHandler.addServlet(new ServletHolder(new TestServlet()), "/firstDispatchWithNewQueryString");
+ _contextHandler.addServlet(new ServletHolder(new TestServlet()), "/secondDispatchNewValueForExistingQueryString");
- HandlerList handlers = new HandlerList();
- handlers.setHandlers(new Handler[] { _contextHandler, new DefaultHandler() });
+ HandlerList handlers = new HandlerList();
+ handlers.setHandlers(new Handler[] { _contextHandler, new DefaultHandler() });
- _server.setHandler(handlers);
- _server.start();
- }
+ _server.setHandler(handlers);
+ _server.start();
+ }
- @Test
- public void testMultipleDispatchesWithNewQueryStrings() throws Exception {
- String request = "GET /initialCall?initialParam=right HTTP/1.1\r\n" + "Host: localhost\r\n" + "Content-Type: application/x-www-form-urlencoded\r\n"
- + "Connection: close\r\n" + "\r\n";
- String responseString = _connector.getResponses(request);
- assertTrue("Not the expected response. Check STDOUT for details.", responseString.startsWith("HTTP/1.1 200"));
- }
+ @Test
+ public void testMultipleDispatchesWithNewQueryStrings() throws Exception {
+ String request = "GET /initialCall?initialParam=right HTTP/1.1\r\n" + "Host: localhost\r\n" + "Content-Type: application/x-www-form-urlencoded\r\n"
+ + "Connection: close\r\n" + "\r\n";
+ String responseString = _connector.getResponses(request);
+ assertTrue("Not the expected response. Check STDOUT for details.", responseString.startsWith("HTTP/1.1 200"));
+ }
- @After
- public void tearDown() throws Exception {
- _server.stop();
- _server.join();
- }
+ @After
+ public void tearDown() throws Exception {
+ _server.stop();
+ _server.join();
+ }
- private class TestServlet extends HttpServlet {
- private static final long serialVersionUID = 1L;
+ private class TestServlet extends HttpServlet {
+ private static final long serialVersionUID = 1L;
- @Override
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- String path = request.getRequestURI();
- String queryString = request.getQueryString();
- if ("/initialCall".equals(path))
- {
- AsyncContext async = request.startAsync();
- async.dispatch("/firstDispatchWithNewQueryString?newQueryString=initialValue");
- assertEquals("initialParam=right", queryString);
- }
- else if ("/firstDispatchWithNewQueryString".equals(path))
- {
+ @Override
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ String path = request.getRequestURI();
+ String queryString = request.getQueryString();
+ if ("/initialCall".equals(path))
+ {
+ AsyncContext async = request.startAsync();
+ async.dispatch("/firstDispatchWithNewQueryString?newQueryString=initialValue");
+ assertEquals("initialParam=right", queryString);
+ }
+ else if ("/firstDispatchWithNewQueryString".equals(path))
+ {
AsyncContext async = request.startAsync();
async.dispatch("/secondDispatchNewValueForExistingQueryString?newQueryString=newValue");
assertEquals("newQueryString=initialValue&initialParam=right", queryString);
- }
- else
- {
- response.setContentType("text/html");
- response.setStatus(HttpServletResponse.SC_OK);
- response.getWriter().println("<h1>woohhooooo</h1>");
- assertEquals("newQueryString=newValue&initialParam=right", queryString);
- }
- }
- }
+ }
+ else
+ {
+ response.setContentType("text/html");
+ response.setStatus(HttpServletResponse.SC_OK);
+ response.getWriter().println("<h1>woohhooooo</h1>");
+ assertEquals("newQueryString=newValue&initialParam=right", queryString);
+ }
+ }
+ }
}
diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/WelcomeFilter.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/WelcomeFilter.java
index e628ed1b5c..a17818e8d3 100644
--- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/WelcomeFilter.java
+++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/WelcomeFilter.java
@@ -49,15 +49,15 @@ public class WelcomeFilter implements Filter
public void init(FilterConfig filterConfig)
{
welcome=filterConfig.getInitParameter("welcome");
- if (welcome==null)
- welcome="index.html";
+ if (welcome==null)
+ welcome="index.html";
}
/* ------------------------------------------------------------ */
public void doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
- throws IOException, ServletException
+ throws IOException, ServletException
{
String path=((HttpServletRequest)request).getServletPath();
if (welcome!=null && path.endsWith("/"))
diff --git a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/CloseableDoSFilterTest.java b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/CloseableDoSFilterTest.java
index cb97090d5b..e0804d6781 100644
--- a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/CloseableDoSFilterTest.java
+++ b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/CloseableDoSFilterTest.java
@@ -57,6 +57,6 @@ public class CloseableDoSFilterTest extends AbstractDoSFilterTest
public void testUnresponsiveClient() throws Exception
{
// TODO work out why this intermittently fails
- LOG.warn("Ignored Closeable testUnresponsiveClient");
+ LOG.warn("Ignored Closeable testUnresponsiveClient");
}
}
diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java
index 5801421ca5..4aff293052 100644
--- a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java
+++ b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java
@@ -894,9 +894,9 @@ public class StartArgs
// only add non-duplicates
if (!propertyFileRefs.contains(arg))
{
- propertyFileRefs.add(arg);
+ propertyFileRefs.add(arg);
}
- return;
+ return;
}
// Anything else is unrecognized
@@ -938,7 +938,7 @@ public class StartArgs
Path propertyFile = baseHome.getPath(propertyFileRef);
if (!FS.exists(propertyFile))
{
- propertyFile = baseHome.getPath("etc/" + propertyFileRef);
+ propertyFile = baseHome.getPath("etc/" + propertyFileRef);
}
addUniquePropertyFile(propertyFileRef,propertyFile);
}
diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java b/jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java
index 181ccf0d2a..426b46ea42 100644
--- a/jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java
+++ b/jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java
@@ -549,7 +549,7 @@ public abstract class Resource implements ResourceFactory, Closeable
buf.append("</TD></TR>");
}
buf.append("</TABLE>\n");
- buf.append("</BODY></HTML>\n");
+ buf.append("</BODY></HTML>\n");
return buf.toString();
}
diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/URLEncodedTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/URLEncodedTest.java
index 297b8e1402..5614edfb3f 100644
--- a/jetty-util/src/test/java/org/eclipse/jetty/util/URLEncodedTest.java
+++ b/jetty-util/src/test/java/org/eclipse/jetty/util/URLEncodedTest.java
@@ -199,7 +199,7 @@ public class URLEncodedTest
/* -------------------------------------------------------------- */
@Test
public void testUrlEncodedStream()
- throws Exception
+ throws Exception
{
String [][] charsets = new String[][]
{
diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/resource/ResourceTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/resource/ResourceTest.java
index 852a06b293..688bb18ac8 100644
--- a/jetty-util/src/test/java/org/eclipse/jetty/util/resource/ResourceTest.java
+++ b/jetty-util/src/test/java/org/eclipse/jetty/util/resource/ResourceTest.java
@@ -124,9 +124,9 @@ public class ResourceTest
__userURL=uri.toURL();
__userURL = MavenTestingUtils.getTestResourcesDir().toURI().toURL();
- FilePermission perm = (FilePermission) __userURL.openConnection().getPermission();
- __userDir = new File(perm.getName()).getCanonicalPath() + File.separatorChar;
- __relDir = "src/test/resources/".replace('/', File.separatorChar);
+ FilePermission perm = (FilePermission) __userURL.openConnection().getPermission();
+ __userDir = new File(perm.getName()).getCanonicalPath() + File.separatorChar;
+ __relDir = "src/test/resources/".replace('/', File.separatorChar);
//System.err.println("User Dir="+__userDir);
//System.err.println("Rel Dir="+__relDir);
diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/FragmentConfiguration.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/FragmentConfiguration.java
index 4a7a04bb23..7bd19c7e3c 100644
--- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/FragmentConfiguration.java
+++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/FragmentConfiguration.java
@@ -75,10 +75,10 @@ public class FragmentConfiguration extends AbstractConfiguration
{
for (Resource key : frags.keySet())
{
- if (key.isDirectory()) //tolerate the case where the library is a directory, not a jar. useful for OSGi for example
- {
- metaData.addFragment(key, frags.get(key));
- }
+ if (key.isDirectory()) //tolerate the case where the library is a directory, not a jar. useful for OSGi for example
+ {
+ metaData.addFragment(key, frags.get(key));
+ }
else //the standard case: a jar most likely inside WEB-INF/lib
{
metaData.addFragment(key, frags.get(key));
diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppClassLoader.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppClassLoader.java
index 2ae1cae451..dfb2ee46bf 100644
--- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppClassLoader.java
+++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppClassLoader.java
@@ -221,7 +221,7 @@ public class WebAppClassLoader extends URLClassLoader
* with '/'.
*/
public void addClassPath(String classPath)
- throws IOException
+ throws IOException
{
if (classPath == null)
return;
diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java
index c2eec1e197..e55b578b42 100644
--- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java
+++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java
@@ -914,7 +914,7 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
/* ------------------------------------------------------------ */
protected void loadConfigurations()
- throws Exception
+ throws Exception
{
//if the configuration instances have been set explicitly, use them
if (_configurations.size()>0)
diff --git a/jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/ClientConnectTest.java b/jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/ClientConnectTest.java
index 1bc082eb75..ac4c4130f7 100644
--- a/jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/ClientConnectTest.java
+++ b/jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/ClientConnectTest.java
@@ -67,8 +67,8 @@ public class ClientConnectTest
Throwable cause = e.getCause();
if(!errorClass.isInstance(cause))
{
- cause.printStackTrace(System.err);
- Assert.assertThat("ExecutionException.cause",cause,instanceOf(errorClass));
+ cause.printStackTrace(System.err);
+ Assert.assertThat("ExecutionException.cause",cause,instanceOf(errorClass));
}
// Validate websocket captured cause
@@ -359,15 +359,15 @@ public class ClientConnectTest
}
catch (ExecutionException e)
{
- if(OS.IS_WINDOWS)
- {
- // On windows, this is a SocketTimeoutException
- assertExpectedError(e, wsocket, SocketTimeoutException.class);
- } else
- {
- // Expected path - java.net.ConnectException
- assertExpectedError(e,wsocket,ConnectException.class);
- }
+ if(OS.IS_WINDOWS)
+ {
+ // On windows, this is a SocketTimeoutException
+ assertExpectedError(e, wsocket, SocketTimeoutException.class);
+ } else
+ {
+ // Expected path - java.net.ConnectException
+ assertExpectedError(e,wsocket,ConnectException.class);
+ }
}
}
diff --git a/jetty-xml/src/test/java/org/eclipse/jetty/xml/TestConfiguration.java b/jetty-xml/src/test/java/org/eclipse/jetty/xml/TestConfiguration.java
index 673a1dabc0..678f95184a 100644
--- a/jetty-xml/src/test/java/org/eclipse/jetty/xml/TestConfiguration.java
+++ b/jetty-xml/src/test/java/org/eclipse/jetty/xml/TestConfiguration.java
@@ -79,7 +79,7 @@ public class TestConfiguration extends HashMap<String,Object>
public void setPropertyTest(int value)
{
- propValue=value;
+ propValue=value;
}
public TestConfiguration getNested()
diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BaseTest.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BaseTest.java
index b2a32225a0..ae891279c7 100644
--- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BaseTest.java
+++ b/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BaseTest.java
@@ -86,7 +86,7 @@ public abstract class RFC2616BaseTest
public static void setUpServer(TestableJettyServer testableserver, Class<?> testclazz) throws Exception
{
- File testWorkDir = MavenTestingUtils.getTargetTestingDir(testclazz.getName());
+ File testWorkDir = MavenTestingUtils.getTargetTestingDir(testclazz.getName());
FS.ensureDirExists(testWorkDir);
System.setProperty("java.io.tmpdir",testWorkDir.getAbsolutePath());
diff --git a/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/SessionValueSavingTest.java b/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/SessionValueSavingTest.java
index 6a37d8c700..9d1d92e39d 100644
--- a/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/SessionValueSavingTest.java
+++ b/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/SessionValueSavingTest.java
@@ -34,21 +34,21 @@ public class SessionValueSavingTest extends AbstractSessionValueSavingTest
return new JdbcTestServer(port,max,scavenge);
}
- @Test
- public void testSessionValueSaving() throws Exception
- {
- super.testSessionValueSaving();
- }
+ @Test
+ public void testSessionValueSaving() throws Exception
+ {
+ super.testSessionValueSaving();
+ }
- @After
- public void tearDown() throws Exception
- {
- try
- {
- DriverManager.getConnection( "jdbc:derby:sessions;shutdown=true" );
- }
- catch( SQLException expected )
- {
- }
- }
+ @After
+ public void tearDown() throws Exception
+ {
+ try
+ {
+ DriverManager.getConnection( "jdbc:derby:sessions;shutdown=true" );
+ }
+ catch( SQLException expected )
+ {
+ }
+ }
}
diff --git a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionValueSavingTest.java b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionValueSavingTest.java
index 85e3dd7d36..7cb0e9252b 100644
--- a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionValueSavingTest.java
+++ b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionValueSavingTest.java
@@ -133,8 +133,8 @@ public abstract class AbstractSessionValueSavingTest
System.out.println("not init call " + session);
if (session!=null)
{
- long value = System.currentTimeMillis();
- System.out.println("Setting test to : " + value);
+ long value = System.currentTimeMillis();
+ System.out.println("Setting test to : " + value);
session.setAttribute("test", value);
}
@@ -148,14 +148,14 @@ public abstract class AbstractSessionValueSavingTest
private void sendResult(HttpSession session, PrintWriter writer)
{
- if (session != null)
- {
- writer.print(session.getAttribute("test"));
- }
- else
- {
- writer.print(0);
- }
+ if (session != null)
+ {
+ writer.print(session.getAttribute("test"));
+ }
+ else
+ {
+ writer.print(0);
+ }
}
}
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/Counter.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/Counter.java
index 06d509c72a..71c97f2638 100644
--- a/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/Counter.java
+++ b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/Counter.java
@@ -26,8 +26,8 @@ public class Counter implements java.io.Serializable
public int getCount()
{
- counter++;
- return counter;
+ counter++;
+ return counter;
}
public void setLast(String uri) {
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/DateTag.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/DateTag.java
index 81cb9b7e22..19f79dcb73 100644
--- a/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/DateTag.java
+++ b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/DateTag.java
@@ -50,22 +50,22 @@ public class DateTag extends BodyTagSupport
public void doInitBody() throws JspException {}
public int doAfterBody() throws JspException {
- try
- {
+ try
+ {
SimpleDateFormat format = new SimpleDateFormat(body.getString());
format.setTimeZone(TimeZone.getTimeZone(tz));
- body.getEnclosingWriter().write(format.format(new Date()));
- return SKIP_BODY;
- }
- catch (Exception ex) {
+ body.getEnclosingWriter().write(format.format(new Date()));
+ return SKIP_BODY;
+ }
+ catch (Exception ex) {
ex.printStackTrace();
throw new JspTagException(ex.toString());
- }
+ }
}
public void release()
{
- body=null;
+ body=null;
}
}
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/Dump.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/Dump.java
index fe97a1eb26..ed36783d19 100644
--- a/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/Dump.java
+++ b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/Dump.java
@@ -68,16 +68,16 @@ public class Dump extends HttpServlet
@Override
public void init(ServletConfig config) throws ServletException
{
- super.init(config);
+ super.init(config);
- if (config.getInitParameter("unavailable")!=null && !fixed)
- {
+ if (config.getInitParameter("unavailable")!=null && !fixed)
+ {
- fixed=true;
- throw new UnavailableException("Unavailable test",Integer.parseInt(config.getInitParameter("unavailable")));
- }
+ fixed=true;
+ throw new UnavailableException("Unavailable test",Integer.parseInt(config.getInitParameter("unavailable")));
+ }
- _timer=new Timer(true);
+ _timer=new Timer(true);
}
/* ------------------------------------------------------------ */
@@ -118,7 +118,7 @@ public class Dump extends HttpServlet
}
catch(ServletException se)
{
- se.printStackTrace();
+ se.printStackTrace();
}
}
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/HelloWorld.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/HelloWorld.java
index ede15a8ffe..9970e4ad5a 100644
--- a/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/HelloWorld.java
+++ b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/HelloWorld.java
@@ -37,7 +37,7 @@ public class HelloWorld extends HttpServlet
@Override
public void init(ServletConfig config) throws ServletException
{
- super.init(config);
+ super.init(config);
}
/* ------------------------------------------------------------ */
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/LoginServlet.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/LoginServlet.java
index f83bdf668f..e31b7b72a8 100644
--- a/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/LoginServlet.java
+++ b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/LoginServlet.java
@@ -38,7 +38,7 @@ public class LoginServlet extends HttpServlet
@Override
public void init(ServletConfig config) throws ServletException
{
- super.init(config);
+ super.init(config);
}
/* ------------------------------------------------------------ */
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/RegTest.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/RegTest.java
index c867a1646e..dc0e812358 100644
--- a/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/RegTest.java
+++ b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/RegTest.java
@@ -44,7 +44,7 @@ public class RegTest extends HttpServlet
@Override
public void init(ServletConfig config) throws ServletException
{
- super.init(config);
+ super.init(config);
}
/* ------------------------------------------------------------ */
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/SecureModeServlet.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/SecureModeServlet.java
index 6ba2216ca0..3285b9c147 100644
--- a/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/SecureModeServlet.java
+++ b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/SecureModeServlet.java
@@ -48,7 +48,7 @@ public class SecureModeServlet extends HttpServlet
@Override
public void init(ServletConfig config) throws ServletException
{
- super.init(config);
+ super.init(config);
}
/* ------------------------------------------------------------ */
diff --git a/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/Bar.java b/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/Bar.java
index 01d21a5ca2..bbb083fb08 100644
--- a/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/Bar.java
+++ b/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/Bar.java
@@ -20,9 +20,9 @@ package com.acme;
public class Bar {
-
- @Foo(2)
- public void someMethod () {
- }
+
+ @Foo(2)
+ public void someMethod () {
+ }
}

Back to the top