From eaa17eaee5d15740364982642217f611b418c425 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Thu, 10 Sep 2009 23:53:11 +0000 Subject: [PATCH] minor cleanup git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@872 7e9141cc-0065-0410-87d8-b60c137991c4 --- .../main/java/org/eclipse/jetty/io/ByteArrayBuffer.java | 2 ++ .../org/eclipse/jetty/server/handler/ContextHandler.java | 8 +------- .../eclipse/jetty/server/handler/StatisticsHandler.java | 7 +------ 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/ByteArrayBuffer.java b/jetty-io/src/main/java/org/eclipse/jetty/io/ByteArrayBuffer.java index fd9fca0da2d..f1b75ac78d4 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/ByteArrayBuffer.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/ByteArrayBuffer.java @@ -334,6 +334,8 @@ public class ByteArrayBuffer extends AbstractBuffer */ public void wrap(byte[] b, int off, int len) { + if (b==null) + throw new IllegalArgumentException(); if (isReadOnly()) throw new IllegalStateException(__READONLY); if (isImmutable()) throw new IllegalStateException(__IMMUTABLE); _bytes=b; diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java index 1753cd7896c..56dce3972b9 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java @@ -81,7 +81,7 @@ import org.eclipse.jetty.util.resource.Resource; * * */ -public class ContextHandler extends ScopedHandler implements Attributes, Server.Graceful, CompleteHandler +public class ContextHandler extends ScopedHandler implements Attributes, Server.Graceful { private static final ThreadLocal __context=new ThreadLocal(); public static final String MANAGED_ATTRIBUTES = "org.eclipse.jetty.server.context.ManagedAttributes"; @@ -1431,12 +1431,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Server. return host; } - - public void complete(Request request) - { - // TODO Auto-generated method stub - - } /* ------------------------------------------------------------ */ /** Context. diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/StatisticsHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/StatisticsHandler.java index c41e316dd76..589ab91e230 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/StatisticsHandler.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/StatisticsHandler.java @@ -24,7 +24,7 @@ import org.eclipse.jetty.server.AsyncContinuation; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Response; -public class StatisticsHandler extends HandlerWrapper implements CompleteHandler +public class StatisticsHandler extends HandlerWrapper { private transient final AtomicLong _statsStartedAt = new AtomicLong(); private transient final AtomicInteger _requests = new AtomicInteger(); @@ -343,9 +343,4 @@ public class StatisticsHandler extends HandlerWrapper implements CompleteHandler { return _suspendTotalTime.get(); } - - public void complete(Request request) - { - updateResponse(request); - } }