Resolved errorprone MissingOverride warnings #2206

`@Override` was added to methods which were missing the annotation #2206

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2018-03-01 13:59:25 +11:00
parent 0b89ffd055
commit a639ee9275
342 changed files with 15215 additions and 5 deletions

View File

@ -121,6 +121,7 @@ public class AbstractRestServlet extends HttpServlet
return w; return w;
} }
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{ {
doGet(request, response); doGet(request, response);

View File

@ -40,6 +40,7 @@ import org.eclipse.jetty.util.ajax.JSON;
*/ */
public class SerialRestServlet extends AbstractRestServlet public class SerialRestServlet extends AbstractRestServlet
{ {
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{ {
long start = System.nanoTime(); long start = System.nanoTime();
@ -98,6 +99,7 @@ public class SerialRestServlet extends AbstractRestServlet
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
* response) * response)
*/ */
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{ {
doGet(request, response); doGet(request, response);

View File

@ -49,6 +49,7 @@ public class HelloHandler extends AbstractHandler
this.body = body; this.body = body;
} }
@Override
public void handle( String target, public void handle( String target,
Request baseRequest, Request baseRequest,
HttpServletRequest request, HttpServletRequest request,

View File

@ -72,6 +72,7 @@ public class ManyHandlers
*/ */
public static class ParamHandler extends AbstractHandler public static class ParamHandler extends AbstractHandler
{ {
@Override
public void handle( String target, public void handle( String target,
Request baseRequest, Request baseRequest,
HttpServletRequest request, HttpServletRequest request,

View File

@ -153,6 +153,7 @@ public class AnnotationConfiguration extends AbstractConfiguration
_stat = stat; _stat = stat;
} }
@Override
public Void call() throws Exception public Void call() throws Exception
{ {
if (_stat != null) if (_stat != null)
@ -261,6 +262,7 @@ public class AnnotationConfiguration extends AbstractConfiguration
return _indexMap.size(); return _indexMap.size();
} }
@Override
public String toString() public String toString()
{ {
if (_ordering == null) if (_ordering == null)

View File

@ -61,6 +61,7 @@ public class AnnotationIntrospector
_introspectAncestors = introspectAncestors; _introspectAncestors = introspectAncestors;
} }
@Override
public void handle(Class<?> clazz) public void handle(Class<?> clazz)
{ {
Class<?> c = clazz; Class<?> c = clazz;

View File

@ -44,6 +44,7 @@ public class ClassInheritanceHandler extends AbstractHandler
_inheritanceMap = map; _inheritanceMap = map;
} }
@Override
public void handle(ClassInfo classInfo) public void handle(ClassInfo classInfo)
{ {
try try

View File

@ -49,6 +49,7 @@ public class ContainerInitializerAnnotationHandler extends AbstractHandler
* *
* @see org.eclipse.jetty.annotations.AnnotationParser.Handler#handle(org.eclipse.jetty.annotations.AnnotationParser.ClassInfo, String) * @see org.eclipse.jetty.annotations.AnnotationParser.Handler#handle(org.eclipse.jetty.annotations.AnnotationParser.ClassInfo, String)
*/ */
@Override
public void handle(ClassInfo info, String annotationName) public void handle(ClassInfo info, String annotationName)
{ {
if (annotationName == null || !_annotation.getName().equals(annotationName)) if (annotationName == null || !_annotation.getName().equals(annotationName))
@ -62,6 +63,7 @@ public class ContainerInitializerAnnotationHandler extends AbstractHandler
* *
* @see org.eclipse.jetty.annotations.AnnotationParser.Handler#handle(org.eclipse.jetty.annotations.AnnotationParser.FieldInfo, String) * @see org.eclipse.jetty.annotations.AnnotationParser.Handler#handle(org.eclipse.jetty.annotations.AnnotationParser.FieldInfo, String)
*/ */
@Override
public void handle(FieldInfo info, String annotationName) public void handle(FieldInfo info, String annotationName)
{ {
if (annotationName == null || !_annotation.getName().equals(annotationName)) if (annotationName == null || !_annotation.getName().equals(annotationName))
@ -74,6 +76,7 @@ public class ContainerInitializerAnnotationHandler extends AbstractHandler
* *
* @see org.eclipse.jetty.annotations.AnnotationParser.Handler#handle(org.eclipse.jetty.annotations.AnnotationParser.MethodInfo, String) * @see org.eclipse.jetty.annotations.AnnotationParser.Handler#handle(org.eclipse.jetty.annotations.AnnotationParser.MethodInfo, String)
*/ */
@Override
public void handle(MethodInfo info, String annotationName) public void handle(MethodInfo info, String annotationName)
{ {
if (annotationName == null || !_annotation.getName().equals(annotationName)) if (annotationName == null || !_annotation.getName().equals(annotationName))

View File

@ -48,6 +48,7 @@ public class DeclareRolesAnnotationHandler extends AbstractIntrospectableAnnotat
/** /**
* @see org.eclipse.jetty.annotations.AnnotationIntrospector.AbstractIntrospectableAnnotationHandler#doHandle(java.lang.Class) * @see org.eclipse.jetty.annotations.AnnotationIntrospector.AbstractIntrospectableAnnotationHandler#doHandle(java.lang.Class)
*/ */
@Override
public void doHandle(Class clazz) public void doHandle(Class clazz)
{ {
if (!Servlet.class.isAssignableFrom(clazz)) if (!Servlet.class.isAssignableFrom(clazz))

View File

@ -46,6 +46,7 @@ public class MultiPartConfigAnnotationHandler extends AbstractIntrospectableAnno
/** /**
* @see org.eclipse.jetty.annotations.AnnotationIntrospector.AbstractIntrospectableAnnotationHandler#doHandle(java.lang.Class) * @see org.eclipse.jetty.annotations.AnnotationIntrospector.AbstractIntrospectableAnnotationHandler#doHandle(java.lang.Class)
*/ */
@Override
public void doHandle(Class clazz) public void doHandle(Class clazz)
{ {
if (!Servlet.class.isAssignableFrom(clazz)) if (!Servlet.class.isAssignableFrom(clazz))

View File

@ -41,6 +41,7 @@ public class PostConstructAnnotationHandler extends AbstractIntrospectableAnnota
} }
@Override
public void doHandle(Class clazz) public void doHandle(Class clazz)
{ {
//Check that the PostConstruct is on a class that we're interested in //Check that the PostConstruct is on a class that we're interested in

View File

@ -40,6 +40,7 @@ public class PreDestroyAnnotationHandler extends AbstractIntrospectableAnnotatio
_context = wac; _context = wac;
} }
@Override
public void doHandle(Class clazz) public void doHandle(Class clazz)
{ {
//Check that the PreDestroy is on a class that we're interested in //Check that the PreDestroy is on a class that we're interested in

View File

@ -61,6 +61,7 @@ public class ResourceAnnotationHandler extends AbstractIntrospectableAnnotationH
* environment that will be looked up at runtime. They do * environment that will be looked up at runtime. They do
* not specify an injection. * not specify an injection.
*/ */
@Override
public void doHandle(Class<?> clazz) public void doHandle(Class<?> clazz)
{ {
if (supportsResourceInjection(clazz)) if (supportsResourceInjection(clazz))

View File

@ -40,6 +40,7 @@ public class ResourcesAnnotationHandler extends AbstractIntrospectableAnnotation
_wac = wac; _wac = wac;
} }
@Override
public void doHandle (Class<?> clazz) public void doHandle (Class<?> clazz)
{ {
Resources resources = (Resources)clazz.getAnnotation(Resources.class); Resources resources = (Resources)clazz.getAnnotation(Resources.class);

View File

@ -44,6 +44,7 @@ public class RunAsAnnotationHandler extends AbstractIntrospectableAnnotationHand
_context = wac; _context = wac;
} }
@Override
public void doHandle (Class clazz) public void doHandle (Class clazz)
{ {
if (!Servlet.class.isAssignableFrom(clazz)) if (!Servlet.class.isAssignableFrom(clazz))

View File

@ -48,6 +48,7 @@ public class ServletContainerInitializersStarter extends AbstractLifeCycle imple
* Call the doStart method of the ServletContainerInitializers * Call the doStart method of the ServletContainerInitializers
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart() * @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart()
*/ */
@Override
public void doStart() public void doStart()
{ {
List<ContainerInitializer> initializers = (List<ContainerInitializer>)_context.getAttribute(AnnotationConfiguration.CONTAINER_INITIALIZERS); List<ContainerInitializer> initializers = (List<ContainerInitializer>)_context.getAttribute(AnnotationConfiguration.CONTAINER_INITIALIZERS);

View File

@ -69,6 +69,7 @@ public class ServletSecurityAnnotationHandler extends AbstractIntrospectableAnno
/** /**
* @see org.eclipse.jetty.annotations.AnnotationIntrospector.IntrospectableAnnotationHandler#handle(java.lang.Class) * @see org.eclipse.jetty.annotations.AnnotationIntrospector.IntrospectableAnnotationHandler#handle(java.lang.Class)
*/ */
@Override
public void doHandle(Class clazz) public void doHandle(Class clazz)
{ {
if (!(_context.getSecurityHandler() instanceof ConstraintAware)) if (!(_context.getSecurityHandler() instanceof ConstraintAware))

View File

@ -58,6 +58,7 @@ public class WebFilterAnnotation extends DiscoveredAnnotation
/** /**
* @see DiscoveredAnnotation#apply() * @see DiscoveredAnnotation#apply()
*/ */
@Override
public void apply() public void apply()
{ {
// TODO verify against rules for annotation v descriptor // TODO verify against rules for annotation v descriptor

View File

@ -58,6 +58,7 @@ public class WebListenerAnnotation extends DiscoveredAnnotation
/** /**
* @see DiscoveredAnnotation#apply() * @see DiscoveredAnnotation#apply()
*/ */
@Override
public void apply() public void apply()
{ {
Class<? extends java.util.EventListener> clazz = (Class<? extends EventListener>)getTargetClass(); Class<? extends java.util.EventListener> clazz = (Class<? extends EventListener>)getTargetClass();

View File

@ -34,6 +34,7 @@ public class WebListenerAnnotationHandler extends AbstractDiscoverableAnnotation
super(context); super(context);
} }
@Override
public void handle(ClassInfo info, String annotationName) public void handle(ClassInfo info, String annotationName)
{ {
if (annotationName == null || !"javax.servlet.annotation.WebListener".equals(annotationName)) if (annotationName == null || !"javax.servlet.annotation.WebListener".equals(annotationName))
@ -43,6 +44,7 @@ public class WebListenerAnnotationHandler extends AbstractDiscoverableAnnotation
addAnnotation(wlAnnotation); addAnnotation(wlAnnotation);
} }
@Override
public void handle(FieldInfo info, String annotationName) public void handle(FieldInfo info, String annotationName)
{ {
if (annotationName == null || !"javax.servlet.annotation.WebListener".equals(annotationName)) if (annotationName == null || !"javax.servlet.annotation.WebListener".equals(annotationName))
@ -50,6 +52,7 @@ public class WebListenerAnnotationHandler extends AbstractDiscoverableAnnotation
LOG.warn ("@WebListener is not applicable to fields: "+info.getClassInfo().getClassName()+"."+info.getFieldName()); LOG.warn ("@WebListener is not applicable to fields: "+info.getClassInfo().getClassName()+"."+info.getFieldName());
} }
@Override
public void handle(MethodInfo info, String annotationName) public void handle(MethodInfo info, String annotationName)
{ {
if (annotationName == null || !"javax.servlet.annotation.WebListener".equals(annotationName)) if (annotationName == null || !"javax.servlet.annotation.WebListener".equals(annotationName))

View File

@ -65,6 +65,7 @@ public class WebServletAnnotation extends DiscoveredAnnotation
/** /**
* @see DiscoveredAnnotation#apply() * @see DiscoveredAnnotation#apply()
*/ */
@Override
public void apply() public void apply()
{ {
//TODO check this algorithm with new rules for applying descriptors and annotations in order //TODO check this algorithm with new rules for applying descriptors and annotations in order

View File

@ -45,6 +45,7 @@ public class ClassB extends ClassA implements InterfaceD
System.err.println("ClassB.package"); System.err.println("ClassB.package");
} }
@Override
public void l() public void l()
{ {
System.err.println("Overridden method l has no annotation"); System.err.println("Overridden method l has no annotation");

View File

@ -57,6 +57,7 @@ public class FilterC implements Filter
} }
@Override
public void doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain arg2) public void doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain arg2)
throws IOException, ServletException throws IOException, ServletException
{ {
@ -69,10 +70,12 @@ public class FilterC implements Filter
arg2.doFilter(request, response); arg2.doFilter(request, response);
} }
@Override
public void destroy() public void destroy()
{ {
} }
@Override
public void init(FilterConfig arg0) throws ServletException public void init(FilterConfig arg0) throws ServletException
{ {
} }

View File

@ -26,11 +26,13 @@ import javax.servlet.annotation.WebListener;
public class ListenerC implements ServletContextListener public class ListenerC implements ServletContextListener
{ {
@Override
public void contextDestroyed(ServletContextEvent arg0) public void contextDestroyed(ServletContextEvent arg0)
{ {
} }
@Override
public void contextInitialized(ServletContextEvent arg0) public void contextInitialized(ServletContextEvent arg0)
{ {

View File

@ -58,6 +58,7 @@ public class ServletC extends HttpServlet
} }
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{ {
response.setContentType("text/html"); response.setContentType("text/html");

View File

@ -54,6 +54,7 @@ public class TestAnnotationInheritance
public final List<String> annotatedMethods = new ArrayList<String>(); public final List<String> annotatedMethods = new ArrayList<String>();
public final List<String> annotatedFields = new ArrayList<String>(); public final List<String> annotatedFields = new ArrayList<String>();
@Override
public void handle(ClassInfo info, String annotation) public void handle(ClassInfo info, String annotation)
{ {
if (annotation == null || !"org.eclipse.jetty.annotations.Sample".equals(annotation)) if (annotation == null || !"org.eclipse.jetty.annotations.Sample".equals(annotation))
@ -62,6 +63,7 @@ public class TestAnnotationInheritance
annotatedClassNames.add(info.getClassName()); annotatedClassNames.add(info.getClassName());
} }
@Override
public void handle(FieldInfo info, String annotation) public void handle(FieldInfo info, String annotation)
{ {
if (annotation == null || !"org.eclipse.jetty.annotations.Sample".equals(annotation)) if (annotation == null || !"org.eclipse.jetty.annotations.Sample".equals(annotation))
@ -69,6 +71,7 @@ public class TestAnnotationInheritance
annotatedFields.add(info.getClassInfo().getClassName()+"."+info.getFieldName()); annotatedFields.add(info.getClassInfo().getClassName()+"."+info.getFieldName());
} }
@Override
public void handle(MethodInfo info, String annotation) public void handle(MethodInfo info, String annotation)
{ {
if (annotation == null || !"org.eclipse.jetty.annotations.Sample".equals(annotation)) if (annotation == null || !"org.eclipse.jetty.annotations.Sample".equals(annotation))

View File

@ -116,6 +116,7 @@ public class TestAnnotationParser
{ {
private List<String> methods = Arrays.asList("a","b","c","d","l"); private List<String> methods = Arrays.asList("a","b","c","d","l");
@Override
public void handle(ClassInfo info, String annotation) public void handle(ClassInfo info, String annotation)
{ {
if (annotation == null || !"org.eclipse.jetty.annotations.Sample".equals(annotation)) if (annotation == null || !"org.eclipse.jetty.annotations.Sample".equals(annotation))
@ -124,6 +125,7 @@ public class TestAnnotationParser
assertEquals("org.eclipse.jetty.annotations.ClassA",info.getClassName()); assertEquals("org.eclipse.jetty.annotations.ClassA",info.getClassName());
} }
@Override
public void handle(FieldInfo info, String annotation) public void handle(FieldInfo info, String annotation)
{ {
if (annotation == null || !"org.eclipse.jetty.annotations.Sample".equals(annotation)) if (annotation == null || !"org.eclipse.jetty.annotations.Sample".equals(annotation))
@ -132,6 +134,7 @@ public class TestAnnotationParser
assertEquals(org.objectweb.asm.Type.OBJECT,org.objectweb.asm.Type.getType(info.getFieldType()).getSort()); assertEquals(org.objectweb.asm.Type.OBJECT,org.objectweb.asm.Type.getType(info.getFieldType()).getSort());
} }
@Override
public void handle(MethodInfo info, String annotation) public void handle(MethodInfo info, String annotation)
{ {
if (annotation == null || !"org.eclipse.jetty.annotations.Sample".equals(annotation)) if (annotation == null || !"org.eclipse.jetty.annotations.Sample".equals(annotation))
@ -158,6 +161,7 @@ public class TestAnnotationParser
class MultiAnnotationHandler extends AnnotationParser.AbstractHandler class MultiAnnotationHandler extends AnnotationParser.AbstractHandler
{ {
@Override
public void handle(ClassInfo info, String annotation) public void handle(ClassInfo info, String annotation)
{ {
if (annotation == null || ! "org.eclipse.jetty.annotations.Multi".equals(annotation)) if (annotation == null || ! "org.eclipse.jetty.annotations.Multi".equals(annotation))
@ -165,6 +169,7 @@ public class TestAnnotationParser
assertTrue("org.eclipse.jetty.annotations.ClassB".equals(info.getClassName())); assertTrue("org.eclipse.jetty.annotations.ClassB".equals(info.getClassName()));
} }
@Override
public void handle(FieldInfo info, String annotation) public void handle(FieldInfo info, String annotation)
{ {
if (annotation == null || ! "org.eclipse.jetty.annotations.Multi".equals(annotation)) if (annotation == null || ! "org.eclipse.jetty.annotations.Multi".equals(annotation))
@ -173,6 +178,7 @@ public class TestAnnotationParser
fail(); fail();
} }
@Override
public void handle(MethodInfo info, String annotation) public void handle(MethodInfo info, String annotation)
{ {
if (annotation == null || ! "org.eclipse.jetty.annotations.Multi".equals(annotation)) if (annotation == null || ! "org.eclipse.jetty.annotations.Multi".equals(annotation))

View File

@ -627,6 +627,7 @@ public class AntWebAppContext extends WebAppContext
/** /**
* *
*/ */
@Override
public void doStart() public void doStart()
{ {
try try
@ -662,6 +663,7 @@ public class AntWebAppContext extends WebAppContext
} }
} }
@Override
public void doStop() public void doStop()
{ {
try try

View File

@ -59,6 +59,7 @@ public class AntWebInfConfiguration extends WebInfConfiguration
//match any of the container jars //match any of the container jars
PatternMatcher containerJarNameMatcher = new PatternMatcher () PatternMatcher containerJarNameMatcher = new PatternMatcher ()
{ {
@Override
public void matched(URI uri) throws Exception public void matched(URI uri) throws Exception
{ {
context.getMetaData().addContainerResource(Resource.newResource(uri)); context.getMetaData().addContainerResource(Resource.newResource(uri));
@ -149,6 +150,7 @@ public class AntWebInfConfiguration extends WebInfConfiguration
* *
* @see WebXmlConfiguration#configure(WebAppContext) * @see WebXmlConfiguration#configure(WebAppContext)
*/ */
@Override
public void configure(WebAppContext context) throws Exception public void configure(WebAppContext context) throws Exception
{ {
if (context instanceof AntWebAppContext) if (context instanceof AntWebAppContext)

View File

@ -189,6 +189,7 @@ public class JettyRunTask extends Task
* *
* @throws BuildException if unable to build * @throws BuildException if unable to build
*/ */
@Override
public void execute() throws BuildException public void execute() throws BuildException
{ {

View File

@ -56,6 +56,7 @@ public class JettyStopTask extends Task
/** /**
* @see org.apache.tools.ant.Task#execute() * @see org.apache.tools.ant.Task#execute()
*/ */
@Override
public void execute() throws BuildException public void execute() throws BuildException
{ {
try try

View File

@ -115,6 +115,7 @@ public class ServerProxyImpl implements ServerProxy
this.awc = awc; this.awc = awc;
} }
@Override
public void filesChanged(List<String> changedFileNames) public void filesChanged(List<String> changedFileNames)
{ {
boolean isScanned = false; boolean isScanned = false;
@ -151,6 +152,7 @@ public class ServerProxyImpl implements ServerProxy
} }
@Override
public void addWebApplication(AntWebAppContext webApp) public void addWebApplication(AntWebAppContext webApp)
{ {
webApplications.add(webApp); webApplications.add(webApp);
@ -242,6 +244,7 @@ public class ServerProxyImpl implements ServerProxy
/** /**
* @see org.eclipse.jetty.ant.utils.ServerProxy#start() * @see org.eclipse.jetty.ant.utils.ServerProxy#start()
*/ */
@Override
public void start() public void start()
{ {
try try
@ -289,6 +292,7 @@ public class ServerProxyImpl implements ServerProxy
/** /**
* @see org.eclipse.jetty.ant.utils.ServerProxy#getProxiedObject() * @see org.eclipse.jetty.ant.utils.ServerProxy#getProxiedObject()
*/ */
@Override
public Object getProxiedObject() public Object getProxiedObject()
{ {
return server; return server;

View File

@ -265,6 +265,7 @@ public class AntBuild
this.parser = connector; this.parser = connector;
} }
@Override
public void run() public void run()
{ {
String line; String line;

View File

@ -26,6 +26,7 @@ public class NamedLiteral extends AnnotationLiteral<Named> implements Named
{ {
private final String value; private final String value;
@Override
public String value() public String value()
{ {
return value; return value;

View File

@ -30,11 +30,13 @@ import org.eclipse.jetty.webapp.WebAppContext;
@Deprecated @Deprecated
public class WeldDeploymentBinding implements AppLifeCycle.Binding public class WeldDeploymentBinding implements AppLifeCycle.Binding
{ {
@Override
public String[] getBindingTargets() public String[] getBindingTargets()
{ {
return new String[] { "deploying" }; return new String[] { "deploying" };
} }
@Override
public void processBinding(Node node, App app) throws Exception public void processBinding(Node node, App app) throws Exception
{ {
ContextHandler handler = app.getContextHandler(); ContextHandler handler = app.getContextHandler();

View File

@ -155,6 +155,7 @@ public class DuplexConnectionPool extends AbstractConnectionPool implements Swee
return active(connection); return active(connection);
} }
@Override
public boolean release(Connection connection) public boolean release(Connection connection)
{ {
boolean closed = isClosed(); boolean closed = isClosed();
@ -184,6 +185,7 @@ public class DuplexConnectionPool extends AbstractConnectionPool implements Swee
return idleConnections.offerFirst(connection); return idleConnections.offerFirst(connection);
} }
@Override
public boolean remove(Connection connection) public boolean remove(Connection connection)
{ {
return remove(connection, false); return remove(connection, false);
@ -212,6 +214,7 @@ public class DuplexConnectionPool extends AbstractConnectionPool implements Swee
return removed; return removed;
} }
@Override
public void close() public void close()
{ {
super.close(); super.close();

View File

@ -361,6 +361,7 @@ public abstract class HttpDestination extends ContainerLifeCycle implements Dest
protected abstract SendFailure send(Connection connection, HttpExchange exchange); protected abstract SendFailure send(Connection connection, HttpExchange exchange);
@Override
public void newConnection(Promise<Connection> promise) public void newConnection(Promise<Connection> promise)
{ {
createConnection(promise); createConnection(promise);
@ -376,6 +377,7 @@ public abstract class HttpDestination extends ContainerLifeCycle implements Dest
return exchanges.remove(exchange); return exchanges.remove(exchange);
} }
@Override
public void close() public void close()
{ {
abort(new AsynchronousCloseException()); abort(new AsynchronousCloseException());

View File

@ -49,6 +49,7 @@ public class HttpResponse implements Response
return request; return request;
} }
@Override
public HttpVersion getVersion() public HttpVersion getVersion()
{ {
return version; return version;
@ -72,6 +73,7 @@ public class HttpResponse implements Response
return this; return this;
} }
@Override
public String getReason() public String getReason()
{ {
return reason; return reason;

View File

@ -263,6 +263,7 @@ public class HttpReceiverOverHTTP extends HttpReceiver implements HttpParser.Res
process(); process();
} }
@Override
public void abort(Throwable x) public void abort(Throwable x)
{ {
failAndClose(x); failAndClose(x);

View File

@ -207,6 +207,7 @@ public class DeferredContentProvider implements AsyncContentProvider, Callback,
* No more content will be added to this content provider * No more content will be added to this content provider
* and notifies the listener that no more content is available. * and notifies the listener that no more content is available.
*/ */
@Override
public void close() public void close()
{ {
if (closed.compareAndSet(false, true)) if (closed.compareAndSet(false, true))

View File

@ -140,6 +140,7 @@ public abstract class SslBytesTest
serverSocket.close(); serverSocket.close();
} }
@Override
public void run() public void run()
{ {
try try

View File

@ -60,6 +60,7 @@ public class ContinuationFilter implements Filter
ServletContext _context; ServletContext _context;
private boolean _debug; private boolean _debug;
@Override
public void init(FilterConfig filterConfig) throws ServletException public void init(FilterConfig filterConfig) throws ServletException
{ {
filterConfig.getServletContext().log("WARNING: " + this.getClass().getName() + " is now DEPRECATED, use Servlet 3.0 AsyncContext instead."); filterConfig.getServletContext().log("WARNING: " + this.getClass().getName() + " is now DEPRECATED, use Servlet 3.0 AsyncContext instead.");
@ -88,6 +89,7 @@ public class ContinuationFilter implements Filter
_initialized=true; _initialized=true;
} }
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
{ {
if (_filtered) if (_filtered)
@ -155,6 +157,7 @@ public class ContinuationFilter implements Filter
} }
} }
@Override
public void destroy() public void destroy()
{ {
} }

View File

@ -40,11 +40,13 @@ public class DebugBinding implements AppLifeCycle.Binding
_targets=targets; _targets=targets;
} }
@Override
public String[] getBindingTargets() public String[] getBindingTargets()
{ {
return _targets; return _targets;
} }
@Override
public void processBinding(Node node, App app) throws Exception public void processBinding(Node node, App app) throws Exception
{ {
LOG.info("processBinding {} {}",node,app.getContextHandler()); LOG.info("processBinding {} {}",node,app.getContextHandler());

View File

@ -45,6 +45,7 @@ public class DebugListenerBinding extends DebugBinding
return _debugListener; return _debugListener;
} }
@Override
public void processBinding(Node node, App app) throws Exception public void processBinding(Node node, App app) throws Exception
{ {
app.getContextHandler().addEventListener(_debugListener); app.getContextHandler().addEventListener(_debugListener);

View File

@ -61,11 +61,13 @@ public class GlobalWebappConfigBinding implements AppLifeCycle.Binding
this._jettyXml = jettyXml; this._jettyXml = jettyXml;
} }
@Override
public String[] getBindingTargets() public String[] getBindingTargets()
{ {
return new String[] { "deploying" }; return new String[] { "deploying" };
} }
@Override
public void processBinding(Node node, App app) throws Exception public void processBinding(Node node, App app) throws Exception
{ {
ContextHandler handler = app.getContextHandler(); ContextHandler handler = app.getContextHandler();

View File

@ -63,11 +63,13 @@ public class OrderedGroupBinding implements AppLifeCycle.Binding
} }
} }
@Override
public String[] getBindingTargets() public String[] getBindingTargets()
{ {
return _bindingTargets; return _bindingTargets;
} }
@Override
public void processBinding(Node node, App app) throws Exception public void processBinding(Node node, App app) throws Exception
{ {
for ( AppLifeCycle.Binding binding : _orderedBindings ) for ( AppLifeCycle.Binding binding : _orderedBindings )

View File

@ -25,12 +25,14 @@ import org.eclipse.jetty.server.handler.ContextHandler;
public class StandardDeployer implements AppLifeCycle.Binding public class StandardDeployer implements AppLifeCycle.Binding
{ {
@Override
public String[] getBindingTargets() public String[] getBindingTargets()
{ {
return new String[] return new String[]
{ "deploying" }; { "deploying" };
} }
@Override
public void processBinding(Node node, App app) throws Exception public void processBinding(Node node, App app) throws Exception
{ {
ContextHandler handler = app.getContextHandler(); ContextHandler handler = app.getContextHandler();

View File

@ -50,6 +50,7 @@ public class GraphOutputDot
{ {
private Collator collator = Collator.getInstance(); private Collator collator = Collator.getInstance();
@Override
public int compare(Node o1, Node o2) public int compare(Node o1, Node o2)
{ {
if (o1.getName().equals(TOPNODE)) if (o1.getName().equals(TOPNODE))

View File

@ -41,12 +41,14 @@ public class AppLifeCyclePathCollector implements AppLifeCycle.Binding
return actualOrder; return actualOrder;
} }
@Override
public String[] getBindingTargets() public String[] getBindingTargets()
{ {
return new String[] return new String[]
{ "*" }; { "*" };
} }
@Override
public void processBinding(Node node, App app) throws Exception public void processBinding(Node node, App app) throws Exception
{ {
actualOrder.add(node); actualOrder.add(node);

View File

@ -33,6 +33,7 @@ public class MockAppProvider extends AbstractLifeCycle implements AppProvider
private DeploymentManager deployMan; private DeploymentManager deployMan;
private File webappsDir; private File webappsDir;
@Override
public void setDeploymentManager(DeploymentManager deploymentManager) public void setDeploymentManager(DeploymentManager deploymentManager)
{ {
this.deployMan = deploymentManager; this.deployMan = deploymentManager;
@ -50,6 +51,7 @@ public class MockAppProvider extends AbstractLifeCycle implements AppProvider
this.deployMan.addApp(app); this.deployMan.addApp(app);
} }
@Override
public ContextHandler createContextHandler(App app) throws Exception public ContextHandler createContextHandler(App app) throws Exception
{ {
WebAppContext context = new WebAppContext(); WebAppContext context = new WebAppContext();

View File

@ -80,6 +80,7 @@ public class ScanningAppProviderRuntimeUpdatesTest
_providers++; _providers++;
((ScanningAppProvider)provider).addScannerListener(new Scanner.ScanListener() ((ScanningAppProvider)provider).addScannerListener(new Scanner.ScanListener()
{ {
@Override
public void scan() public void scan()
{ {
_scans.incrementAndGet(); _scans.incrementAndGet();

View File

@ -916,6 +916,7 @@ public class GCloudSessionDataStore extends AbstractSessionDataStore
final AtomicReference<Exception> exception = new AtomicReference<Exception>(); final AtomicReference<Exception> exception = new AtomicReference<Exception>();
Runnable load = new Runnable() Runnable load = new Runnable()
{ {
@Override
public void run () public void run ()
{ {
try try

View File

@ -176,6 +176,7 @@ public class JettyHttpExchange extends HttpExchange implements JettyExchange
} }
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
@Override
public void setPrincipal(HttpPrincipal principal) public void setPrincipal(HttpPrincipal principal)
{ {
_delegate.setPrincipal(principal); _delegate.setPrincipal(principal);

View File

@ -160,6 +160,7 @@ public class JettyHttpsExchange extends HttpsExchange implements JettyExchange
return _delegate.getPrincipal(); return _delegate.getPrincipal();
} }
@Override
public void setPrincipal(HttpPrincipal principal) public void setPrincipal(HttpPrincipal principal)
{ {
_delegate.setPrincipal(principal); _delegate.setPrincipal(principal);

View File

@ -74,6 +74,7 @@ public class TestSPIServer
new HttpHandler() new HttpHandler()
{ {
@Override
public void handle(HttpExchange exchange) throws IOException public void handle(HttpExchange exchange) throws IOException
{ {
Headers responseHeaders = exchange.getResponseHeaders(); Headers responseHeaders = exchange.getResponseHeaders();
@ -163,6 +164,7 @@ public class TestSPIServer
new HttpHandler() new HttpHandler()
{ {
@Override
public void handle(HttpExchange exchange) throws IOException public void handle(HttpExchange exchange) throws IOException
{ {
Headers responseHeaders = exchange.getResponseHeaders(); Headers responseHeaders = exchange.getResponseHeaders();

View File

@ -1075,11 +1075,13 @@ public class HttpFields implements Iterable<HttpField>
int _cursor; // index of next element to return int _cursor; // index of next element to return
int _last=-1; int _last=-1;
@Override
public boolean hasNext() public boolean hasNext()
{ {
return _cursor != _size; return _cursor != _size;
} }
@Override
public HttpField next() public HttpField next()
{ {
int i = _cursor; int i = _cursor;
@ -1089,6 +1091,7 @@ public class HttpFields implements Iterable<HttpField>
return _fields[_last=i]; return _fields[_last=i];
} }
@Override
public void remove() public void remove()
{ {
if (_last<0) if (_last<0)

View File

@ -695,6 +695,7 @@ public class HttpURI
} }
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
@Override
public boolean equals(Object o) public boolean equals(Object o)
{ {
if (o==this) if (o==this)

View File

@ -123,6 +123,7 @@ public class MetaData implements Iterable<HttpField>
* @return an iterator over the HTTP fields * @return an iterator over the HTTP fields
* @see #getFields() * @see #getFields()
*/ */
@Override
public Iterator<HttpField> iterator() public Iterator<HttpField> iterator()
{ {
HttpFields fields = getFields(); HttpFields fields = getFields();
@ -180,6 +181,7 @@ public class MetaData implements Iterable<HttpField>
this(request.getMethod(),new HttpURI(request.getURI()), request.getHttpVersion(), new HttpFields(request.getFields()), request.getContentLength()); this(request.getMethod(),new HttpURI(request.getURI()), request.getHttpVersion(), new HttpFields(request.getFields()), request.getContentLength());
} }
@Override
public void recycle() public void recycle()
{ {
super.recycle(); super.recycle();

View File

@ -135,6 +135,7 @@ public class QuotedQualityCSV extends QuotedCSV implements Iterable<String>
} }
} }
@Override
public List<String> getValues() public List<String> getValues()
{ {
if (!_sorted) if (!_sorted)

View File

@ -1158,6 +1158,7 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
frameBytes -= bytesFlushed; frameBytes -= bytesFlushed;
} }
@Override
protected boolean generate(ByteBufferPool.Lease lease) protected boolean generate(ByteBufferPool.Lease lease)
{ {
bytes = frameBytes = generator.control(lease, frame); bytes = frameBytes = generator.control(lease, frame);
@ -1299,6 +1300,7 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
return dataBytes; return dataBytes;
} }
@Override
protected boolean generate(ByteBufferPool.Lease lease) protected boolean generate(ByteBufferPool.Lease lease)
{ {
int dataBytes = getDataBytesRemaining(); int dataBytes = getDataBytesRemaining();

View File

@ -430,6 +430,7 @@ public class HpackContext
return null; return null;
} }
@Override
public String toString() public String toString()
{ {
return String.format("{%s,%d,%s,%x}",isStatic()?"S":"D",_slot,_field,hashCode()); return String.format("{%s,%d,%s,%x}",isStatic()?"S":"D",_slot,_field,hashCode());

View File

@ -89,6 +89,7 @@ public class InfinispanSessionDataStore extends AbstractSessionDataStore
Runnable load = new Runnable() Runnable load = new Runnable()
{ {
@Override
public void run () public void run ()
{ {
try try
@ -269,6 +270,7 @@ public class InfinispanSessionDataStore extends AbstractSessionDataStore
Runnable load = new Runnable() Runnable load = new Runnable()
{ {
@Override
public void run () public void run ()
{ {
try try

View File

@ -494,6 +494,7 @@ public class ByteArrayEndPoint extends AbstractEndPoint
/** /**
* *
*/ */
@Override
public void reset() public void reset()
{ {
try(Locker.Lock lock = _locker.lock()) try(Locker.Lock lock = _locker.lock())

View File

@ -137,6 +137,7 @@ public abstract class CyclicTimeout implements Destroyable
* <p>Destroys this CyclicTimeout.</p> * <p>Destroys this CyclicTimeout.</p>
* <p>After being destroyed, this CyclicTimeout is not used anymore.</p> * <p>After being destroyed, this CyclicTimeout is not used anymore.</p>
*/ */
@Override
public void destroy() public void destroy()
{ {
Timeout timeout = _timeout.getAndSet(NOT_SET); Timeout timeout = _timeout.getAndSet(NOT_SET);

View File

@ -33,6 +33,7 @@ public class LeakTrackingByteBufferPool extends ContainerLifeCycle implements By
private final LeakDetector<ByteBuffer> leakDetector = new LeakDetector<ByteBuffer>() private final LeakDetector<ByteBuffer> leakDetector = new LeakDetector<ByteBuffer>()
{ {
@Override
public String id(ByteBuffer resource) public String id(ByteBuffer resource)
{ {
return BufferUtil.toIDString(resource); return BufferUtil.toIDString(resource);

View File

@ -81,18 +81,22 @@ public interface NetworkTrafficListener
*/ */
public static class Adapter implements NetworkTrafficListener public static class Adapter implements NetworkTrafficListener
{ {
@Override
public void opened(Socket socket) public void opened(Socket socket)
{ {
} }
@Override
public void incoming(Socket socket, ByteBuffer bytes) public void incoming(Socket socket, ByteBuffer bytes)
{ {
} }
@Override
public void outgoing(Socket socket, ByteBuffer bytes) public void outgoing(Socket socket, ByteBuffer bytes)
{ {
} }
@Override
public void closed(Socket socket) public void closed(Socket socket)
{ {
} }

View File

@ -55,11 +55,13 @@ public class SocketChannelEndPoint extends ChannelEndPoint
return _socket; return _socket;
} }
@Override
public InetSocketAddress getLocalAddress() public InetSocketAddress getLocalAddress()
{ {
return _local; return _local;
} }
@Override
public InetSocketAddress getRemoteAddress() public InetSocketAddress getRemoteAddress()
{ {
return _remote; return _remote;

View File

@ -745,6 +745,7 @@ public class SelectChannelEndPointTest
{ {
new Thread() new Thread()
{ {
@Override
public void run() public void run()
{ {
try(Socket client = newClient();) try(Socket client = newClient();)

View File

@ -38,21 +38,25 @@ public class JAASGroup implements Group
} }
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
@Override
public synchronized boolean addMember(Principal principal) public synchronized boolean addMember(Principal principal)
{ {
return _members.add(principal); return _members.add(principal);
} }
@Override
public synchronized boolean removeMember(Principal principal) public synchronized boolean removeMember(Principal principal)
{ {
return _members.remove(principal); return _members.remove(principal);
} }
@Override
public boolean isMember(Principal principal) public boolean isMember(Principal principal)
{ {
return _members.contains(principal); return _members.contains(principal);
} }
@Override
public Enumeration<? extends Principal> members() public Enumeration<? extends Principal> members()
{ {
@ -65,12 +69,14 @@ public class JAASGroup implements Group
this.itor = itor; this.itor = itor;
} }
@Override
public boolean hasMoreElements () public boolean hasMoreElements ()
{ {
return this.itor.hasNext(); return this.itor.hasNext();
} }
@Override
public Principal nextElement () public Principal nextElement ()
{ {
return this.itor.next(); return this.itor.next();
@ -81,11 +87,13 @@ public class JAASGroup implements Group
return new MembersEnumeration (_members.iterator()); return new MembersEnumeration (_members.iterator());
} }
@Override
public int hashCode() public int hashCode()
{ {
return getName().hashCode(); return getName().hashCode();
} }
@Override
public boolean equals(Object object) public boolean equals(Object object)
{ {
if (! (object instanceof JAASGroup)) if (! (object instanceof JAASGroup))
@ -94,11 +102,13 @@ public class JAASGroup implements Group
return ((JAASGroup)object).getName().equals(getName()); return ((JAASGroup)object).getName().equals(getName());
} }
@Override
public String toString() public String toString()
{ {
return getName(); return getName();
} }
@Override
public String getName() public String getName()
{ {

View File

@ -96,6 +96,7 @@ public class JAASLoginService extends AbstractLifeCycle implements LoginService
* *
* @return name or null if not set. * @return name or null if not set.
*/ */
@Override
public String getName() public String getName()
{ {
return _realmName; return _realmName;
@ -117,6 +118,7 @@ public class JAASLoginService extends AbstractLifeCycle implements LoginService
/** Get the identityService. /** Get the identityService.
* @return the identityService * @return the identityService
*/ */
@Override
public IdentityService getIdentityService() public IdentityService getIdentityService()
{ {
return _identityService; return _identityService;
@ -126,6 +128,7 @@ public class JAASLoginService extends AbstractLifeCycle implements LoginService
/** Set the identityService. /** Set the identityService.
* @param identityService the identityService to set * @param identityService the identityService to set
*/ */
@Override
public void setIdentityService(IdentityService identityService) public void setIdentityService(IdentityService identityService)
{ {
_identityService = identityService; _identityService = identityService;
@ -172,6 +175,7 @@ public class JAASLoginService extends AbstractLifeCycle implements LoginService
/** /**
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart() * @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart()
*/ */
@Override
protected void doStart() throws Exception protected void doStart() throws Exception
{ {
if (_identityService==null) if (_identityService==null)
@ -192,6 +196,7 @@ public class JAASLoginService extends AbstractLifeCycle implements LoginService
{ {
callbackHandler = new CallbackHandler() callbackHandler = new CallbackHandler()
{ {
@Override
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
{ {
for (Callback callback: callbacks) for (Callback callback: callbacks)
@ -266,6 +271,7 @@ public class JAASLoginService extends AbstractLifeCycle implements LoginService
} }
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
@Override
public boolean validate(UserIdentity user) public boolean validate(UserIdentity user)
{ {
// TODO optionally check user is still valid // TODO optionally check user is still valid
@ -281,6 +287,7 @@ public class JAASLoginService extends AbstractLifeCycle implements LoginService
} }
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
@Override
public void logout(UserIdentity user) public void logout(UserIdentity user)
{ {
Set<JAASUserPrincipal> userPrincipals = user.getSubject().getPrincipals(JAASUserPrincipal.class); Set<JAASUserPrincipal> userPrincipals = user.getSubject().getPrincipals(JAASUserPrincipal.class);

View File

@ -37,6 +37,7 @@ public class JAASPrincipal implements Principal, Serializable
this._name = userName; this._name = userName;
} }
@Override
public boolean equals (Object p) public boolean equals (Object p)
{ {
if (! (p instanceof JAASPrincipal)) if (! (p instanceof JAASPrincipal))
@ -45,16 +46,19 @@ public class JAASPrincipal implements Principal, Serializable
return getName().equals(((JAASPrincipal)p).getName()); return getName().equals(((JAASPrincipal)p).getName());
} }
@Override
public int hashCode () public int hashCode ()
{ {
return getName().hashCode(); return getName().hashCode();
} }
@Override
public String getName () public String getName ()
{ {
return this._name; return this._name;
} }
@Override
public String toString () public String toString ()
{ {
return getName(); return getName();

View File

@ -27,6 +27,7 @@ public class JAASRole extends JAASPrincipal
super (name); super (name);
} }
@Override
public boolean equals (Object o) public boolean equals (Object o)
{ {
if (! (o instanceof JAASRole)) if (! (o instanceof JAASRole))

View File

@ -46,6 +46,7 @@ public class JAASUserPrincipal implements Principal
/* ------------------------------------------------ */ /* ------------------------------------------------ */
/** Get the name identifying the user /** Get the name identifying the user
*/ */
@Override
public String getName () public String getName ()
{ {
return _name; return _name;
@ -66,6 +67,7 @@ public class JAASUserPrincipal implements Principal
return this._loginContext; return this._loginContext;
} }
@Override
public String toString() public String toString()
{ {
return getName(); return getName();

View File

@ -35,6 +35,7 @@ import java.util.Enumeration;
public class StrictRoleCheckPolicy implements RoleCheckPolicy public class StrictRoleCheckPolicy implements RoleCheckPolicy
{ {
@Override
public boolean checkRole (String roleName, Principal runAsRole, Group roles) public boolean checkRole (String roleName, Principal runAsRole, Group roles)
{ {
//check if this user has had any temporary role pushed onto //check if this user has had any temporary role pushed onto

View File

@ -51,6 +51,7 @@ public abstract class AbstractCallbackHandler implements CallbackHandler
return _credential; return _credential;
} }
@Override
public void handle (Callback[] callbacks) public void handle (Callback[] callbacks)
throws IOException, UnsupportedCallbackException throws IOException, UnsupportedCallbackException
{ {

View File

@ -41,6 +41,7 @@ public class DefaultCallbackHandler extends AbstractCallbackHandler
this._request = request; this._request = request;
} }
@Override
public void handle (Callback[] callbacks) public void handle (Callback[] callbacks)
throws IOException, UnsupportedCallbackException throws IOException, UnsupportedCallbackException
{ {

View File

@ -84,6 +84,7 @@ public abstract class AbstractDatabaseLoginModule extends AbstractLoginModule
* @param userName user info to load * @param userName user info to load
* @exception Exception if unable to get the user info * @exception Exception if unable to get the user info
*/ */
@Override
public UserInfo getUserInfo (String userName) public UserInfo getUserInfo (String userName)
throws Exception throws Exception
{ {
@ -146,6 +147,7 @@ public abstract class AbstractDatabaseLoginModule extends AbstractLoginModule
@Override
public void initialize(Subject subject, public void initialize(Subject subject,
CallbackHandler callbackHandler, CallbackHandler callbackHandler,
Map<String,?> sharedState, Map<String,?> sharedState,

View File

@ -168,6 +168,7 @@ public abstract class AbstractLoginModule implements LoginModule
* @see javax.security.auth.spi.LoginModule#abort() * @see javax.security.auth.spi.LoginModule#abort()
* @throws LoginException if unable to abort * @throws LoginException if unable to abort
*/ */
@Override
public boolean abort() throws LoginException public boolean abort() throws LoginException
{ {
this.currentUser = null; this.currentUser = null;
@ -179,6 +180,7 @@ public abstract class AbstractLoginModule implements LoginModule
* @return true if committed, false if not (likely not authenticated) * @return true if committed, false if not (likely not authenticated)
* @throws LoginException if unable to commit * @throws LoginException if unable to commit
*/ */
@Override
public boolean commit() throws LoginException public boolean commit() throws LoginException
{ {
if (!isAuthenticated()) if (!isAuthenticated())
@ -220,6 +222,7 @@ public abstract class AbstractLoginModule implements LoginModule
* @return true if is authenticated, false otherwise * @return true if is authenticated, false otherwise
* @throws LoginException if unable to login * @throws LoginException if unable to login
*/ */
@Override
public boolean login() throws LoginException public boolean login() throws LoginException
{ {
try try
@ -286,6 +289,7 @@ public abstract class AbstractLoginModule implements LoginModule
* @return true always * @return true always
* @throws LoginException if unable to logout * @throws LoginException if unable to logout
*/ */
@Override
public boolean logout() throws LoginException public boolean logout() throws LoginException
{ {
this.currentUser.unsetJAASInfo(this.subject); this.currentUser.unsetJAASInfo(this.subject);
@ -300,6 +304,7 @@ public abstract class AbstractLoginModule implements LoginModule
* @param sharedState the shared state map * @param sharedState the shared state map
* @param options the option map * @param options the option map
*/ */
@Override
public void initialize(Subject subject, CallbackHandler callbackHandler, public void initialize(Subject subject, CallbackHandler callbackHandler,
Map<String,?> sharedState, Map<String,?> options) Map<String,?> sharedState, Map<String,?> options)
{ {

View File

@ -52,6 +52,7 @@ public class DataSourceLoginModule extends AbstractDatabaseLoginModule
* @param sharedState the shared state map * @param sharedState the shared state map
* @param options the option map * @param options the option map
*/ */
@Override
public void initialize(Subject subject, public void initialize(Subject subject,
CallbackHandler callbackHandler, CallbackHandler callbackHandler,
Map<String,?> sharedState, Map<String,?> sharedState,
@ -79,6 +80,7 @@ public class DataSourceLoginModule extends AbstractDatabaseLoginModule
* @return the connection for the datasource * @return the connection for the datasource
* @throws Exception if unable to get the connection * @throws Exception if unable to get the connection
*/ */
@Override
public Connection getConnection () public Connection getConnection ()
throws Exception throws Exception
{ {

View File

@ -53,6 +53,7 @@ public class JDBCLoginModule extends AbstractDatabaseLoginModule
* @return the connection for this datasource * @return the connection for this datasource
* @throws Exception if unable to get the connection * @throws Exception if unable to get the connection
*/ */
@Override
public Connection getConnection () public Connection getConnection ()
throws Exception throws Exception
{ {
@ -81,6 +82,7 @@ public class JDBCLoginModule extends AbstractDatabaseLoginModule
* @param sharedState the shared state map * @param sharedState the shared state map
* @param options the options map * @param options the options map
*/ */
@Override
public void initialize(Subject subject, public void initialize(Subject subject,
CallbackHandler callbackHandler, CallbackHandler callbackHandler,
Map<String,?> sharedState, Map<String,?> sharedState,

View File

@ -215,6 +215,7 @@ public class LdapLoginModule extends AbstractLoginModule
* @return the userinfo for the username * @return the userinfo for the username
* @throws Exception if unable to get the user info * @throws Exception if unable to get the user info
*/ */
@Override
public UserInfo getUserInfo(String username) throws Exception public UserInfo getUserInfo(String username) throws Exception
{ {
Attributes attributes = getUserAttributes(username); Attributes attributes = getUserAttributes(username);
@ -397,6 +398,7 @@ public class LdapLoginModule extends AbstractLoginModule
* @return true if authenticated, false otherwise * @return true if authenticated, false otherwise
* @throws LoginException if unable to login * @throws LoginException if unable to login
*/ */
@Override
public boolean login() throws LoginException public boolean login() throws LoginException
{ {
try try
@ -568,6 +570,7 @@ public class LdapLoginModule extends AbstractLoginModule
* @param sharedState the shared state map * @param sharedState the shared state map
* @param options the option map * @param options the option map
*/ */
@Override
public void initialize(Subject subject, public void initialize(Subject subject,
CallbackHandler callbackHandler, CallbackHandler callbackHandler,
Map<String, ?> sharedState, Map<String, ?> sharedState,
@ -615,6 +618,7 @@ public class LdapLoginModule extends AbstractLoginModule
} }
} }
@Override
public boolean commit() throws LoginException public boolean commit() throws LoginException
{ {
try try
@ -629,6 +633,7 @@ public class LdapLoginModule extends AbstractLoginModule
return super.commit(); return super.commit();
} }
@Override
public boolean abort() throws LoginException public boolean abort() throws LoginException
{ {
try try

View File

@ -61,6 +61,7 @@ public class PropertyFileLoginModule extends AbstractLoginModule
* @param sharedState the shared state map * @param sharedState the shared state map
* @param options the options map * @param options the options map
*/ */
@Override
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options)
{ {
super.initialize(subject,callbackHandler,sharedState,options); super.initialize(subject,callbackHandler,sharedState,options);
@ -107,6 +108,7 @@ public class PropertyFileLoginModule extends AbstractLoginModule
* @param userName the user name * @param userName the user name
* @throws Exception if unable to get the user information * @throws Exception if unable to get the user information
*/ */
@Override
public UserInfo getUserInfo(String userName) throws Exception public UserInfo getUserInfo(String userName) throws Exception
{ {
PropertyUserStore propertyUserStore = _propertyUserStores.get(_filename); PropertyUserStore propertyUserStore = _propertyUserStores.get(_filename);

View File

@ -83,16 +83,19 @@ public class JaspiAuthenticator extends LoginAuthenticator
this._identityService = identityService; this._identityService = identityService;
} }
@Override
public void setConfiguration(AuthConfiguration configuration) public void setConfiguration(AuthConfiguration configuration)
{ {
super.setConfiguration(configuration); super.setConfiguration(configuration);
} }
@Override
public String getAuthMethod() public String getAuthMethod()
{ {
return "JASPI"; return "JASPI";
} }
@Override
public Authentication validateRequest(ServletRequest request, ServletResponse response, boolean mandatory) throws ServerAuthException public Authentication validateRequest(ServletRequest request, ServletResponse response, boolean mandatory) throws ServerAuthException
{ {
JaspiMessageInfo info = new JaspiMessageInfo(request, response, mandatory); JaspiMessageInfo info = new JaspiMessageInfo(request, response, mandatory);
@ -107,6 +110,7 @@ public class JaspiAuthenticator extends LoginAuthenticator
} }
// most likely validatedUser is not needed here. // most likely validatedUser is not needed here.
@Override
public boolean secureResponse(ServletRequest req, ServletResponse res, boolean mandatory, User validatedUser) throws ServerAuthException public boolean secureResponse(ServletRequest req, ServletResponse res, boolean mandatory, User validatedUser) throws ServerAuthException
{ {
JaspiMessageInfo info = (JaspiMessageInfo) req.getAttribute("org.eclipse.jetty.security.jaspi.info"); JaspiMessageInfo info = (JaspiMessageInfo) req.getAttribute("org.eclipse.jetty.security.jaspi.info");

View File

@ -88,6 +88,7 @@ public class JaspiAuthenticatorFactory extends DefaultAuthenticatorFactory
} }
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
@Override
public Authenticator getAuthenticator(Server server, ServletContext context, AuthConfiguration configuration, IdentityService identityService, LoginService loginService) public Authenticator getAuthenticator(Server server, ServletContext context, AuthConfiguration configuration, IdentityService identityService, LoginService loginService)
{ {
Authenticator authenticator=null; Authenticator authenticator=null;
@ -96,6 +97,7 @@ public class JaspiAuthenticatorFactory extends DefaultAuthenticatorFactory
AuthConfigFactory authConfigFactory = AuthConfigFactory.getFactory(); AuthConfigFactory authConfigFactory = AuthConfigFactory.getFactory();
RegistrationListener listener = new RegistrationListener() RegistrationListener listener = new RegistrationListener()
{ {
@Override
public void notify(String layer, String appContext) public void notify(String layer, String appContext)
{} {}
}; };

View File

@ -46,26 +46,31 @@ public class JaspiMessageInfo implements MessageInfo
map = new MIMap(isAuthMandatory); map = new MIMap(isAuthMandatory);
} }
@Override
public Map getMap() public Map getMap()
{ {
return map; return map;
} }
@Override
public Object getRequestMessage() public Object getRequestMessage()
{ {
return request; return request;
} }
@Override
public Object getResponseMessage() public Object getResponseMessage()
{ {
return response; return response;
} }
@Override
public void setRequestMessage(Object request) public void setRequestMessage(Object request)
{ {
this.request = (ServletRequest)request; this.request = (ServletRequest)request;
} }
@Override
public void setResponseMessage(Object response) public void setResponseMessage(Object response)
{ {
this.response = (ServletResponse)response; this.response = (ServletResponse)response;
@ -93,6 +98,7 @@ public class JaspiMessageInfo implements MessageInfo
isMandatory = mandatory; isMandatory = mandatory;
} }
@Override
public int size() public int size()
{ {
return (isMandatory? 1:0) + return (isMandatory? 1:0) +
@ -100,11 +106,13 @@ public class JaspiMessageInfo implements MessageInfo
(delegate == null? 0: delegate.size()); (delegate == null? 0: delegate.size());
} }
@Override
public boolean isEmpty() public boolean isEmpty()
{ {
return !isMandatory && authMethod == null && (delegate == null || delegate.isEmpty()); return !isMandatory && authMethod == null && (delegate == null || delegate.isEmpty());
} }
@Override
public boolean containsKey(Object key) public boolean containsKey(Object key)
{ {
if (MANDATORY_KEY.equals(key)) return isMandatory; if (MANDATORY_KEY.equals(key)) return isMandatory;
@ -112,6 +120,7 @@ public class JaspiMessageInfo implements MessageInfo
return delegate != null && delegate.containsKey(key); return delegate != null && delegate.containsKey(key);
} }
@Override
public boolean containsValue(Object value) public boolean containsValue(Object value)
{ {
if (isMandatory && "true".equals(value)) return true; if (isMandatory && "true".equals(value)) return true;
@ -119,6 +128,7 @@ public class JaspiMessageInfo implements MessageInfo
return delegate != null && delegate.containsValue(value); return delegate != null && delegate.containsValue(value);
} }
@Override
public Object get(Object key) public Object get(Object key)
{ {
if (MANDATORY_KEY.equals(key)) return isMandatory? "true": null; if (MANDATORY_KEY.equals(key)) return isMandatory? "true": null;
@ -127,6 +137,7 @@ public class JaspiMessageInfo implements MessageInfo
return delegate.get(key); return delegate.get(key);
} }
@Override
public Object put(Object key, Object value) public Object put(Object key, Object value)
{ {
if (MANDATORY_KEY.equals(key)) if (MANDATORY_KEY.equals(key))
@ -144,6 +155,7 @@ public class JaspiMessageInfo implements MessageInfo
return getDelegate(true).put(key, value); return getDelegate(true).put(key, value);
} }
@Override
public Object remove(Object key) public Object remove(Object key)
{ {
if (MANDATORY_KEY.equals(key)) if (MANDATORY_KEY.equals(key))
@ -161,6 +173,7 @@ public class JaspiMessageInfo implements MessageInfo
return delegate.remove(key); return delegate.remove(key);
} }
@Override
public void putAll(Map map) public void putAll(Map map)
{ {
if (map != null) if (map != null)
@ -173,22 +186,26 @@ public class JaspiMessageInfo implements MessageInfo
} }
} }
@Override
public void clear() public void clear()
{ {
authMethod = null; authMethod = null;
delegate = null; delegate = null;
} }
@Override
public Set keySet() public Set keySet()
{ {
return getDelegate(true).keySet(); return getDelegate(true).keySet();
} }
@Override
public Collection values() public Collection values()
{ {
return getDelegate(true).values(); return getDelegate(true).values();
} }
@Override
public Set entrySet() public Set entrySet()
{ {
return getDelegate(true).entrySet(); return getDelegate(true).entrySet();

View File

@ -53,6 +53,7 @@ public class ServletCallbackHandler implements CallbackHandler
_loginService = loginService; _loginService = loginService;
} }
@Override
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
{ {
for (Callback callback : callbacks) for (Callback callback : callbacks)

View File

@ -40,33 +40,39 @@ public class SimpleAuthConfig implements ServerAuthConfig
this._serverAuthContext = serverAuthContext; this._serverAuthContext = serverAuthContext;
} }
@Override
public ServerAuthContext getAuthContext(String authContextID, Subject serviceSubject, Map properties) throws AuthException public ServerAuthContext getAuthContext(String authContextID, Subject serviceSubject, Map properties) throws AuthException
{ {
return _serverAuthContext; return _serverAuthContext;
} }
// supposed to be of form host-name<space>context-path // supposed to be of form host-name<space>context-path
@Override
public String getAppContext() public String getAppContext()
{ {
return _appContext; return _appContext;
} }
// not used yet // not used yet
@Override
public String getAuthContextID(MessageInfo messageInfo) throws IllegalArgumentException public String getAuthContextID(MessageInfo messageInfo) throws IllegalArgumentException
{ {
return null; return null;
} }
@Override
public String getMessageLayer() public String getMessageLayer()
{ {
return HTTP_SERVLET; return HTTP_SERVLET;
} }
@Override
public boolean isProtected() public boolean isProtected()
{ {
return true; return true;
} }
@Override
public void refresh() public void refresh()
{ {
} }

View File

@ -53,6 +53,7 @@ public class BaseAuthModule implements ServerAuthModule, ServerAuthContext
protected CallbackHandler callbackHandler; protected CallbackHandler callbackHandler;
@Override
public Class[] getSupportedMessageTypes() public Class[] getSupportedMessageTypes()
{ {
return SUPPORTED_MESSAGE_TYPES; return SUPPORTED_MESSAGE_TYPES;
@ -67,11 +68,13 @@ public class BaseAuthModule implements ServerAuthModule, ServerAuthContext
this.callbackHandler = callbackHandler; this.callbackHandler = callbackHandler;
} }
@Override
public void initialize(MessagePolicy requestPolicy, MessagePolicy responsePolicy, CallbackHandler handler, Map options) throws AuthException public void initialize(MessagePolicy requestPolicy, MessagePolicy responsePolicy, CallbackHandler handler, Map options) throws AuthException
{ {
this.callbackHandler = handler; this.callbackHandler = handler;
} }
@Override
public void cleanSubject(MessageInfo messageInfo, Subject subject) throws AuthException public void cleanSubject(MessageInfo messageInfo, Subject subject) throws AuthException
{ {
// TODO apparently we either get the LoginCallback or the LoginService // TODO apparently we either get the LoginCallback or the LoginService
@ -88,12 +91,14 @@ public class BaseAuthModule implements ServerAuthModule, ServerAuthContext
// } // }
} }
@Override
public AuthStatus secureResponse(MessageInfo messageInfo, Subject serviceSubject) throws AuthException public AuthStatus secureResponse(MessageInfo messageInfo, Subject serviceSubject) throws AuthException
{ {
// servlets do not need secured responses // servlets do not need secured responses
return AuthStatus.SEND_SUCCESS; return AuthStatus.SEND_SUCCESS;
} }
@Override
public AuthStatus validateRequest(MessageInfo messageInfo, Subject clientSubject, Subject serviceSubject) throws AuthException public AuthStatus validateRequest(MessageInfo messageInfo, Subject clientSubject, Subject serviceSubject) throws AuthException
{ {
return AuthStatus.SEND_FAILURE; return AuthStatus.SEND_FAILURE;

View File

@ -257,6 +257,7 @@ public class ObjectMBean implements DynamicMBean
return this._mbeanContainer; return this._mbeanContainer;
} }
@Override
public MBeanInfo getMBeanInfo() public MBeanInfo getMBeanInfo()
{ {
try try
@ -348,6 +349,7 @@ public class ObjectMBean implements DynamicMBean
return _info; return _info;
} }
@Override
public Object getAttribute(String name) throws AttributeNotFoundException, ReflectionException public Object getAttribute(String name) throws AttributeNotFoundException, ReflectionException
{ {
Method getter = _getters.get(name); Method getter = _getters.get(name);
@ -429,6 +431,7 @@ public class ObjectMBean implements DynamicMBean
} }
} }
@Override
public AttributeList getAttributes(String[] names) public AttributeList getAttributes(String[] names)
{ {
AttributeList results = new AttributeList(names.length); AttributeList results = new AttributeList(names.length);
@ -446,6 +449,7 @@ public class ObjectMBean implements DynamicMBean
return results; return results;
} }
@Override
public void setAttribute(Attribute attr) throws AttributeNotFoundException, ReflectionException public void setAttribute(Attribute attr) throws AttributeNotFoundException, ReflectionException
{ {
if (attr == null) if (attr == null)
@ -496,6 +500,7 @@ public class ObjectMBean implements DynamicMBean
} }
} }
@Override
public AttributeList setAttributes(AttributeList attrs) public AttributeList setAttributes(AttributeList attrs)
{ {
if (LOG.isDebugEnabled()) if (LOG.isDebugEnabled())
@ -518,6 +523,7 @@ public class ObjectMBean implements DynamicMBean
return results; return results;
} }
@Override
public Object invoke(String name, Object[] params, String[] signature) throws MBeanException, ReflectionException public Object invoke(String name, Object[] params, String[] signature) throws MBeanException, ReflectionException
{ {
if (LOG.isDebugEnabled()) if (LOG.isDebugEnabled())

View File

@ -33,6 +33,7 @@ public class Derived extends Base implements Signature
SuperManaged superManagedInstance = new SuperManaged(); SuperManaged superManagedInstance = new SuperManaged();
@ManagedAttribute(value = "The full name of something", name = "fname", setter = "setFullName") @ManagedAttribute(value = "The full name of something", name = "fname", setter = "setFullName")
@Override
public String getFullName() public String getFullName()
{ {
return fname; return fname;
@ -44,6 +45,7 @@ public class Derived extends Base implements Signature
} }
@ManagedOperation("publish something") @ManagedOperation("publish something")
@Override
public void publish() public void publish()
{ {
System.err.println("publish"); System.err.println("publish");

View File

@ -79,6 +79,7 @@ public class DerivedManaged extends Base implements Signature
} }
@ManagedAttribute(value = "The full name of something", name = "fname", setter = "setFullName") @ManagedAttribute(value = "The full name of something", name = "fname", setter = "setFullName")
@Override
public String getFullName() public String getFullName()
{ {
return fname; return fname;
@ -90,6 +91,7 @@ public class DerivedManaged extends Base implements Signature
} }
@ManagedOperation("publish something") @ManagedOperation("publish something")
@Override
public void publish() public void publish()
{ {
System.err.println("publish"); System.err.println("publish");

View File

@ -37,17 +37,20 @@ public class BindingEnumeration implements NamingEnumeration<Binding>
_delegate = e; _delegate = e;
} }
@Override
public void close() public void close()
throws NamingException throws NamingException
{ {
} }
@Override
public boolean hasMore () public boolean hasMore ()
throws NamingException throws NamingException
{ {
return _delegate.hasNext(); return _delegate.hasNext();
} }
@Override
public Binding next() public Binding next()
throws NamingException throws NamingException
{ {
@ -55,11 +58,13 @@ public class BindingEnumeration implements NamingEnumeration<Binding>
return new Binding (b.getName(), b.getClassName(), b.getObject(), true); return new Binding (b.getName(), b.getClassName(), b.getObject(), true);
} }
@Override
public boolean hasMoreElements() public boolean hasMoreElements()
{ {
return _delegate.hasNext(); return _delegate.hasNext();
} }
@Override
public Binding nextElement() public Binding nextElement()
{ {
Binding b = (Binding)_delegate.next(); Binding b = (Binding)_delegate.next();

View File

@ -95,6 +95,7 @@ public class ContextFactory implements ObjectFactory
* return null. * return null.
* @see javax.naming.spi.ObjectFactory#getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable) * @see javax.naming.spi.ObjectFactory#getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)
*/ */
@Override
public Object getObjectInstance (Object obj, public Object getObjectInstance (Object obj,
Name name, Name name,
Context nameCtx, Context nameCtx,

View File

@ -55,6 +55,7 @@ public class InitialContextFactory implements javax.naming.spi.InitialContextFac
syntax.put("jndi.syntax.separator", "/"); syntax.put("jndi.syntax.separator", "/");
syntax.put("jndi.syntax.ignorecase", "false"); syntax.put("jndi.syntax.ignorecase", "false");
} }
@Override
public Name parse (String name) public Name parse (String name)
throws NamingException throws NamingException
{ {
@ -74,6 +75,7 @@ public class InitialContextFactory implements javax.naming.spi.InitialContextFac
* @param env a <code>Hashtable</code> value * @param env a <code>Hashtable</code> value
* @return a <code>Context</code> value * @return a <code>Context</code> value
*/ */
@Override
public Context getInitialContext(Hashtable env) public Context getInitialContext(Hashtable env)
{ {
__log.debug("InitialContextFactory.getInitialContext()"); __log.debug("InitialContextFactory.getInitialContext()");

View File

@ -37,17 +37,20 @@ public class NameEnumeration implements NamingEnumeration<NameClassPair>
_delegate = e; _delegate = e;
} }
@Override
public void close() public void close()
throws NamingException throws NamingException
{ {
} }
@Override
public boolean hasMore () public boolean hasMore ()
throws NamingException throws NamingException
{ {
return _delegate.hasNext(); return _delegate.hasNext();
} }
@Override
public NameClassPair next() public NameClassPair next()
throws NamingException throws NamingException
{ {
@ -55,11 +58,13 @@ public class NameEnumeration implements NamingEnumeration<NameClassPair>
return new NameClassPair(b.getName(),b.getClassName(),true); return new NameClassPair(b.getName(),b.getClassName(),true);
} }
@Override
public boolean hasMoreElements() public boolean hasMoreElements()
{ {
return _delegate.hasNext(); return _delegate.hasNext();
} }
@Override
public NameClassPair nextElement() public NameClassPair nextElement()
{ {
Binding b = _delegate.next(); Binding b = _delegate.next();

View File

@ -144,6 +144,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return copy of this NamingContext * @return copy of this NamingContext
* @exception CloneNotSupportedException if an error occurs * @exception CloneNotSupportedException if an error occurs
*/ */
@Override
public Object clone () public Object clone ()
throws CloneNotSupportedException throws CloneNotSupportedException
{ {
@ -211,6 +212,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param obj object to bind * @param obj object to bind
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public void bind(Name name, Object obj) public void bind(Name name, Object obj)
throws NamingException throws NamingException
{ {
@ -311,6 +313,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param obj an <code>Object</code> value * @param obj an <code>Object</code> value
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public void bind(String name, Object obj) public void bind(String name, Object obj)
throws NamingException throws NamingException
{ {
@ -326,6 +329,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return a <code>Context</code> value * @return a <code>Context</code> value
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public Context createSubcontext (Name name) public Context createSubcontext (Name name)
throws NamingException throws NamingException
{ {
@ -409,6 +413,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return a <code>Context</code> value * @return a <code>Context</code> value
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public Context createSubcontext (String name) public Context createSubcontext (String name)
throws NamingException throws NamingException
{ {
@ -424,6 +429,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param name name of subcontext to remove * @param name name of subcontext to remove
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public void destroySubcontext (String name) public void destroySubcontext (String name)
throws NamingException throws NamingException
{ {
@ -439,6 +445,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param name name of subcontext to remove * @param name name of subcontext to remove
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public void destroySubcontext (Name name) public void destroySubcontext (Name name)
throws NamingException throws NamingException
{ {
@ -452,6 +459,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param name name of bound object * @param name name of bound object
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public Object lookup(Name name) public Object lookup(Name name)
throws NamingException throws NamingException
{ {
@ -572,6 +580,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return object bound to name * @return object bound to name
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public Object lookup (String name) public Object lookup (String name)
throws NamingException throws NamingException
{ {
@ -588,6 +597,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return LinkRef or plain object bound at name * @return LinkRef or plain object bound at name
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public Object lookupLink (Name name) public Object lookupLink (Name name)
throws NamingException throws NamingException
{ {
@ -685,6 +695,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return LinkRef or plain object bound at name * @return LinkRef or plain object bound at name
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public Object lookupLink (String name) public Object lookupLink (String name)
throws NamingException throws NamingException
{ {
@ -700,6 +711,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return a <code>NamingEnumeration</code> value * @return a <code>NamingEnumeration</code> value
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public NamingEnumeration list(Name name) public NamingEnumeration list(Name name)
throws NamingException throws NamingException
{ {
@ -770,6 +782,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return a <code>NamingEnumeration</code> value * @return a <code>NamingEnumeration</code> value
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public NamingEnumeration list(String name) public NamingEnumeration list(String name)
throws NamingException throws NamingException
{ {
@ -786,6 +799,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return a <code>NamingEnumeration</code> value * @return a <code>NamingEnumeration</code> value
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public NamingEnumeration listBindings(Name name) public NamingEnumeration listBindings(Name name)
throws NamingException throws NamingException
{ {
@ -855,6 +869,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return a <code>NamingEnumeration</code> value * @return a <code>NamingEnumeration</code> value
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public NamingEnumeration listBindings(String name) public NamingEnumeration listBindings(String name)
throws NamingException throws NamingException
{ {
@ -870,6 +885,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param obj an <code>Object</code> value * @param obj an <code>Object</code> value
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public void rebind(Name name, public void rebind(Name name,
Object obj) Object obj)
throws NamingException throws NamingException
@ -956,6 +972,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param obj an <code>Object</code> value * @param obj an <code>Object</code> value
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public void rebind (String name, public void rebind (String name,
Object obj) Object obj)
throws NamingException throws NamingException
@ -970,6 +987,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param name a <code>String</code> value * @param name a <code>String</code> value
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public void unbind (String name) public void unbind (String name)
throws NamingException throws NamingException
{ {
@ -983,6 +1001,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param name a <code>String</code> value * @param name a <code>String</code> value
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public void unbind (Name name) public void unbind (Name name)
throws NamingException throws NamingException
{ {
@ -1062,6 +1081,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param newName a <code>Name</code> value * @param newName a <code>Name</code> value
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public void rename(Name oldName, public void rename(Name oldName,
Name newName) Name newName)
throws NamingException throws NamingException
@ -1077,7 +1097,9 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param oldName a <code>Name</code> value * @param oldName a <code>Name</code> value
* @param newName a <code>Name</code> value * @param newName a <code>Name</code> value
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ public void rename(String oldName, */
@Override
public void rename(String oldName,
String newName) String newName)
throws NamingException throws NamingException
{ {
@ -1095,6 +1117,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return a <code>Name</code> value * @return a <code>Name</code> value
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public Name composeName(Name name, public Name composeName(Name name,
Name prefix) Name prefix)
throws NamingException throws NamingException
@ -1120,6 +1143,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return a <code>Name</code> value * @return a <code>Name</code> value
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public String composeName (String name, public String composeName (String name,
String prefix) String prefix)
throws NamingException throws NamingException
@ -1141,6 +1165,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* *
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public void close () public void close ()
throws NamingException throws NamingException
{ {
@ -1154,6 +1179,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param name a <code>Name</code> value * @param name a <code>Name</code> value
* @return a <code>NameParser</code> value * @return a <code>NameParser</code> value
*/ */
@Override
public NameParser getNameParser (Name name) public NameParser getNameParser (Name name)
{ {
return _parser; return _parser;
@ -1166,6 +1192,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param name a <code>Name</code> value * @param name a <code>Name</code> value
* @return a <code>NameParser</code> value * @return a <code>NameParser</code> value
*/ */
@Override
public NameParser getNameParser (String name) public NameParser getNameParser (String name)
{ {
return _parser; return _parser;
@ -1183,6 +1210,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return the full name of this Context * @return the full name of this Context
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public String getNameInNamespace () public String getNameInNamespace ()
throws NamingException throws NamingException
{ {
@ -1209,6 +1237,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return propVal or previous value of the property * @return propVal or previous value of the property
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public Object addToEnvironment(String propName, public Object addToEnvironment(String propName,
Object propVal) Object propVal)
throws NamingException throws NamingException
@ -1228,6 +1257,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return value of property or null if it didn't exist * @return value of property or null if it didn't exist
* @exception NamingException if an error occurs * @exception NamingException if an error occurs
*/ */
@Override
public Object removeFromEnvironment(String propName) public Object removeFromEnvironment(String propName)
throws NamingException throws NamingException
{ {
@ -1244,6 +1274,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* *
* @return a copy of the environment of this Context. * @return a copy of the environment of this Context.
*/ */
@Override
public Hashtable getEnvironment () public Hashtable getEnvironment ()
{ {
return (Hashtable)_env.clone(); return (Hashtable)_env.clone();
@ -1372,6 +1403,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
@Override
public String dump() public String dump()
{ {
StringBuilder buf = new StringBuilder(); StringBuilder buf = new StringBuilder();
@ -1388,6 +1420,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
@Override
public void dump(Appendable out,String indent) throws IOException public void dump(Appendable out,String indent) throws IOException
{ {
out.append(this.getClass().getSimpleName()).append("@").append(Long.toHexString(this.hashCode())).append("\n"); out.append(this.getClass().getSimpleName()).append("@").append(Long.toHexString(this.hashCode())).append("\n");

View File

@ -69,6 +69,7 @@ public class MailSessionReference extends Reference implements ObjectFactory
passwordAuthentication = new PasswordAuthentication (user, (password.startsWith(Password.__OBFUSCATE)?Password.deobfuscate(password):password)); passwordAuthentication = new PasswordAuthentication (user, (password.startsWith(Password.__OBFUSCATE)?Password.deobfuscate(password):password));
} }
@Override
public PasswordAuthentication getPasswordAuthentication() public PasswordAuthentication getPasswordAuthentication()
{ {
return passwordAuthentication; return passwordAuthentication;
@ -110,6 +111,7 @@ public class MailSessionReference extends Reference implements ObjectFactory
* @return the object found * @return the object found
* @throws Exception if unable to get object instance * @throws Exception if unable to get object instance
*/ */
@Override
public Object getObjectInstance(Object ref, Name arg1, Context arg2, Hashtable arg3) throws Exception public Object getObjectInstance(Object ref, Name arg1, Context arg2, Hashtable arg3) throws Exception
{ {
if (ref == null) if (ref == null)

View File

@ -49,6 +49,7 @@ public class javaNameParser implements NameParser
* of this parser. * of this parser.
* @exception NamingException If a naming exception was encountered. * @exception NamingException If a naming exception was encountered.
*/ */
@Override
public Name parse(String name) throws NamingException public Name parse(String name) throws NamingException
{ {
return new CompoundName(name, syntax); return new CompoundName(name, syntax);

View File

@ -93,6 +93,7 @@ public class javaRootURLContext implements Context
_env = env; _env = env;
} }
@Override
public Object lookup(Name name) public Object lookup(Name name)
throws NamingException throws NamingException
{ {
@ -100,54 +101,63 @@ public class javaRootURLContext implements Context
} }
@Override
public Object lookup(String name) public Object lookup(String name)
throws NamingException throws NamingException
{ {
return getRoot().lookup(stripProtocol(name)); return getRoot().lookup(stripProtocol(name));
} }
@Override
public void bind(Name name, Object obj) public void bind(Name name, Object obj)
throws NamingException throws NamingException
{ {
getRoot().bind(stripProtocol(name), obj); getRoot().bind(stripProtocol(name), obj);
} }
@Override
public void bind(String name, Object obj) public void bind(String name, Object obj)
throws NamingException throws NamingException
{ {
getRoot().bind(stripProtocol(name), obj); getRoot().bind(stripProtocol(name), obj);
} }
@Override
public void unbind (String name) public void unbind (String name)
throws NamingException throws NamingException
{ {
getRoot().unbind(stripProtocol(name)); getRoot().unbind(stripProtocol(name));
} }
@Override
public void unbind (Name name) public void unbind (Name name)
throws NamingException throws NamingException
{ {
getRoot().unbind(stripProtocol(name)); getRoot().unbind(stripProtocol(name));
} }
@Override
public void rename (String oldStr, String newStr) public void rename (String oldStr, String newStr)
throws NamingException throws NamingException
{ {
getRoot().rename (stripProtocol(oldStr), stripProtocol(newStr)); getRoot().rename (stripProtocol(oldStr), stripProtocol(newStr));
} }
@Override
public void rename (Name oldName, Name newName) public void rename (Name oldName, Name newName)
throws NamingException throws NamingException
{ {
getRoot().rename (stripProtocol(oldName), stripProtocol(newName)); getRoot().rename (stripProtocol(oldName), stripProtocol(newName));
} }
@Override
public void rebind (Name name, Object obj) public void rebind (Name name, Object obj)
throws NamingException throws NamingException
{ {
getRoot().rebind(stripProtocol(name), obj); getRoot().rebind(stripProtocol(name), obj);
} }
@Override
public void rebind (String name, Object obj) public void rebind (String name, Object obj)
throws NamingException throws NamingException
{ {
@ -155,12 +165,14 @@ public class javaRootURLContext implements Context
} }
@Override
public Object lookupLink (Name name) public Object lookupLink (Name name)
throws NamingException throws NamingException
{ {
return getRoot().lookupLink(stripProtocol(name)); return getRoot().lookupLink(stripProtocol(name));
} }
@Override
public Object lookupLink (String name) public Object lookupLink (String name)
throws NamingException throws NamingException
{ {
@ -168,12 +180,14 @@ public class javaRootURLContext implements Context
} }
@Override
public Context createSubcontext (Name name) public Context createSubcontext (Name name)
throws NamingException throws NamingException
{ {
return getRoot().createSubcontext(stripProtocol(name)); return getRoot().createSubcontext(stripProtocol(name));
} }
@Override
public Context createSubcontext (String name) public Context createSubcontext (String name)
throws NamingException throws NamingException
{ {
@ -181,12 +195,14 @@ public class javaRootURLContext implements Context
} }
@Override
public void destroySubcontext (Name name) public void destroySubcontext (Name name)
throws NamingException throws NamingException
{ {
getRoot().destroySubcontext(stripProtocol(name)); getRoot().destroySubcontext(stripProtocol(name));
} }
@Override
public void destroySubcontext (String name) public void destroySubcontext (String name)
throws NamingException throws NamingException
{ {
@ -194,6 +210,7 @@ public class javaRootURLContext implements Context
} }
@Override
public NamingEnumeration list(Name name) public NamingEnumeration list(Name name)
throws NamingException throws NamingException
{ {
@ -201,18 +218,21 @@ public class javaRootURLContext implements Context
} }
@Override
public NamingEnumeration list(String name) public NamingEnumeration list(String name)
throws NamingException throws NamingException
{ {
return getRoot().list(stripProtocol(name)); return getRoot().list(stripProtocol(name));
} }
@Override
public NamingEnumeration listBindings(Name name) public NamingEnumeration listBindings(Name name)
throws NamingException throws NamingException
{ {
return getRoot().listBindings(stripProtocol(name)); return getRoot().listBindings(stripProtocol(name));
} }
@Override
public NamingEnumeration listBindings(String name) public NamingEnumeration listBindings(String name)
throws NamingException throws NamingException
{ {
@ -220,6 +240,7 @@ public class javaRootURLContext implements Context
} }
@Override
public Name composeName (Name name, public Name composeName (Name name,
Name prefix) Name prefix)
throws NamingException throws NamingException
@ -227,6 +248,7 @@ public class javaRootURLContext implements Context
return getRoot().composeName(name, prefix); return getRoot().composeName(name, prefix);
} }
@Override
public String composeName (String name, public String composeName (String name,
String prefix) String prefix)
throws NamingException throws NamingException
@ -235,23 +257,27 @@ public class javaRootURLContext implements Context
} }
@Override
public void close () public void close ()
throws NamingException throws NamingException
{ {
} }
@Override
public String getNameInNamespace () public String getNameInNamespace ()
throws NamingException throws NamingException
{ {
return URL_PREFIX; return URL_PREFIX;
} }
@Override
public NameParser getNameParser (Name name) public NameParser getNameParser (Name name)
throws NamingException throws NamingException
{ {
return __javaNameParser; return __javaNameParser;
} }
@Override
public NameParser getNameParser (String name) public NameParser getNameParser (String name)
throws NamingException throws NamingException
{ {
@ -259,6 +285,7 @@ public class javaRootURLContext implements Context
} }
@Override
public Object addToEnvironment(String propName, public Object addToEnvironment(String propName,
Object propVal) Object propVal)
throws NamingException throws NamingException
@ -266,12 +293,14 @@ public class javaRootURLContext implements Context
return _env.put (propName,propVal); return _env.put (propName,propVal);
} }
@Override
public Object removeFromEnvironment(String propName) public Object removeFromEnvironment(String propName)
throws NamingException throws NamingException
{ {
return _env.remove (propName); return _env.remove (propName);
} }
@Override
public Hashtable getEnvironment () public Hashtable getEnvironment ()
{ {
return _env; return _env;

View File

@ -48,6 +48,7 @@ public class javaURLContextFactory implements ObjectFactory
* @return a new context or the resolved object for the url * @return a new context or the resolved object for the url
* @exception Exception if an error occurs * @exception Exception if an error occurs
*/ */
@Override
public Object getObjectInstance(Object url, Name name, Context ctx, Hashtable env) public Object getObjectInstance(Object url, Name name, Context ctx, Hashtable env)
throws Exception throws Exception
{ {

Some files were not shown because too many files have changed in this diff Show More