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;
}
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
doGet(request, response);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -44,6 +44,7 @@ public class ClassInheritanceHandler extends AbstractHandler
_inheritanceMap = map;
}
@Override
public void handle(ClassInfo classInfo)
{
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)
*/
@Override
public void handle(ClassInfo info, String 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)
*/
@Override
public void handle(FieldInfo info, String 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)
*/
@Override
public void handle(MethodInfo info, String 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)
*/
@Override
public void doHandle(Class 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)
*/
@Override
public void doHandle(Class clazz)
{
if (!Servlet.class.isAssignableFrom(clazz))

View File

@ -41,6 +41,7 @@ public class PostConstructAnnotationHandler extends AbstractIntrospectableAnnota
}
@Override
public void doHandle(Class clazz)
{
//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;
}
@Override
public void doHandle(Class clazz)
{
//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
* not specify an injection.
*/
@Override
public void doHandle(Class<?> clazz)
{
if (supportsResourceInjection(clazz))

View File

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

View File

@ -44,6 +44,7 @@ public class RunAsAnnotationHandler extends AbstractIntrospectableAnnotationHand
_context = wac;
}
@Override
public void doHandle (Class 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
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart()
*/
@Override
public void doStart()
{
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)
*/
@Override
public void doHandle(Class clazz)
{
if (!(_context.getSecurityHandler() instanceof ConstraintAware))

View File

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

View File

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

View File

@ -34,6 +34,7 @@ public class WebListenerAnnotationHandler extends AbstractDiscoverableAnnotation
super(context);
}
@Override
public void handle(ClassInfo info, String annotationName)
{
if (annotationName == null || !"javax.servlet.annotation.WebListener".equals(annotationName))
@ -43,6 +44,7 @@ public class WebListenerAnnotationHandler extends AbstractDiscoverableAnnotation
addAnnotation(wlAnnotation);
}
@Override
public void handle(FieldInfo info, String 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());
}
@Override
public void handle(MethodInfo info, String annotationName)
{
if (annotationName == null || !"javax.servlet.annotation.WebListener".equals(annotationName))

View File

@ -65,6 +65,7 @@ public class WebServletAnnotation extends DiscoveredAnnotation
/**
* @see DiscoveredAnnotation#apply()
*/
@Override
public void apply()
{
//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");
}
@Override
public void l()
{
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)
throws IOException, ServletException
{
@ -69,10 +70,12 @@ public class FilterC implements Filter
arg2.doFilter(request, response);
}
@Override
public void destroy()
{
}
@Override
public void init(FilterConfig arg0) throws ServletException
{
}

View File

@ -26,11 +26,13 @@ import javax.servlet.annotation.WebListener;
public class ListenerC implements ServletContextListener
{
@Override
public void contextDestroyed(ServletContextEvent arg0)
{
}
@Override
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
{
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> annotatedFields = new ArrayList<String>();
@Override
public void handle(ClassInfo info, String annotation)
{
if (annotation == null || !"org.eclipse.jetty.annotations.Sample".equals(annotation))
@ -62,6 +63,7 @@ public class TestAnnotationInheritance
annotatedClassNames.add(info.getClassName());
}
@Override
public void handle(FieldInfo info, String 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());
}
@Override
public void handle(MethodInfo info, String 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");
@Override
public void handle(ClassInfo info, String 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());
}
@Override
public void handle(FieldInfo info, String 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());
}
@Override
public void handle(MethodInfo info, String annotation)
{
if (annotation == null || !"org.eclipse.jetty.annotations.Sample".equals(annotation))
@ -158,6 +161,7 @@ public class TestAnnotationParser
class MultiAnnotationHandler extends AnnotationParser.AbstractHandler
{
@Override
public void handle(ClassInfo info, String 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()));
}
@Override
public void handle(FieldInfo info, String annotation)
{
if (annotation == null || ! "org.eclipse.jetty.annotations.Multi".equals(annotation))
@ -173,6 +178,7 @@ public class TestAnnotationParser
fail();
}
@Override
public void handle(MethodInfo info, String 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()
{
try
@ -662,6 +663,7 @@ public class AntWebAppContext extends WebAppContext
}
}
@Override
public void doStop()
{
try

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -155,6 +155,7 @@ public class DuplexConnectionPool extends AbstractConnectionPool implements Swee
return active(connection);
}
@Override
public boolean release(Connection connection)
{
boolean closed = isClosed();
@ -184,6 +185,7 @@ public class DuplexConnectionPool extends AbstractConnectionPool implements Swee
return idleConnections.offerFirst(connection);
}
@Override
public boolean remove(Connection connection)
{
return remove(connection, false);
@ -212,6 +214,7 @@ public class DuplexConnectionPool extends AbstractConnectionPool implements Swee
return removed;
}
@Override
public void 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);
@Override
public void newConnection(Promise<Connection> promise)
{
createConnection(promise);
@ -376,6 +377,7 @@ public abstract class HttpDestination extends ContainerLifeCycle implements Dest
return exchanges.remove(exchange);
}
@Override
public void close()
{
abort(new AsynchronousCloseException());

View File

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

View File

@ -263,6 +263,7 @@ public class HttpReceiverOverHTTP extends HttpReceiver implements HttpParser.Res
process();
}
@Override
public void abort(Throwable 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
* and notifies the listener that no more content is available.
*/
@Override
public void close()
{
if (closed.compareAndSet(false, true))

View File

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

View File

@ -60,6 +60,7 @@ public class ContinuationFilter implements Filter
ServletContext _context;
private boolean _debug;
@Override
public void init(FilterConfig filterConfig) throws ServletException
{
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;
}
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
{
if (_filtered)
@ -155,6 +157,7 @@ public class ContinuationFilter implements Filter
}
}
@Override
public void destroy()
{
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -74,6 +74,7 @@ public class TestSPIServer
new HttpHandler()
{
@Override
public void handle(HttpExchange exchange) throws IOException
{
Headers responseHeaders = exchange.getResponseHeaders();
@ -163,6 +164,7 @@ public class TestSPIServer
new HttpHandler()
{
@Override
public void handle(HttpExchange exchange) throws IOException
{
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 _last=-1;
@Override
public boolean hasNext()
{
return _cursor != _size;
}
@Override
public HttpField next()
{
int i = _cursor;
@ -1089,6 +1091,7 @@ public class HttpFields implements Iterable<HttpField>
return _fields[_last=i];
}
@Override
public void remove()
{
if (_last<0)

View File

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

View File

@ -123,6 +123,7 @@ public class MetaData implements Iterable<HttpField>
* @return an iterator over the HTTP fields
* @see #getFields()
*/
@Override
public Iterator<HttpField> iterator()
{
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());
}
@Override
public void recycle()
{
super.recycle();

View File

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

View File

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

View File

@ -430,6 +430,7 @@ public class HpackContext
return null;
}
@Override
public String toString()
{
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()
{
@Override
public void run ()
{
try
@ -269,6 +270,7 @@ public class InfinispanSessionDataStore extends AbstractSessionDataStore
Runnable load = new Runnable()
{
@Override
public void run ()
{
try

View File

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

View File

@ -137,6 +137,7 @@ public abstract class CyclicTimeout implements Destroyable
* <p>Destroys this CyclicTimeout.</p>
* <p>After being destroyed, this CyclicTimeout is not used anymore.</p>
*/
@Override
public void destroy()
{
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>()
{
@Override
public String id(ByteBuffer resource)
{
return BufferUtil.toIDString(resource);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -35,6 +35,7 @@ import java.util.Enumeration;
public class StrictRoleCheckPolicy implements RoleCheckPolicy
{
@Override
public boolean checkRole (String roleName, Principal runAsRole, Group roles)
{
//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;
}
@Override
public void handle (Callback[] callbacks)
throws IOException, UnsupportedCallbackException
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -83,16 +83,19 @@ public class JaspiAuthenticator extends LoginAuthenticator
this._identityService = identityService;
}
@Override
public void setConfiguration(AuthConfiguration configuration)
{
super.setConfiguration(configuration);
}
@Override
public String getAuthMethod()
{
return "JASPI";
}
@Override
public Authentication validateRequest(ServletRequest request, ServletResponse response, boolean mandatory) throws ServerAuthException
{
JaspiMessageInfo info = new JaspiMessageInfo(request, response, mandatory);
@ -107,6 +110,7 @@ public class JaspiAuthenticator extends LoginAuthenticator
}
// most likely validatedUser is not needed here.
@Override
public boolean secureResponse(ServletRequest req, ServletResponse res, boolean mandatory, User validatedUser) throws ServerAuthException
{
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)
{
Authenticator authenticator=null;
@ -96,6 +97,7 @@ public class JaspiAuthenticatorFactory extends DefaultAuthenticatorFactory
AuthConfigFactory authConfigFactory = AuthConfigFactory.getFactory();
RegistrationListener listener = new RegistrationListener()
{
@Override
public void notify(String layer, String appContext)
{}
};

View File

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

View File

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

View File

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

View File

@ -53,6 +53,7 @@ public class BaseAuthModule implements ServerAuthModule, ServerAuthContext
protected CallbackHandler callbackHandler;
@Override
public Class[] getSupportedMessageTypes()
{
return SUPPORTED_MESSAGE_TYPES;
@ -67,11 +68,13 @@ public class BaseAuthModule implements ServerAuthModule, ServerAuthContext
this.callbackHandler = callbackHandler;
}
@Override
public void initialize(MessagePolicy requestPolicy, MessagePolicy responsePolicy, CallbackHandler handler, Map options) throws AuthException
{
this.callbackHandler = handler;
}
@Override
public void cleanSubject(MessageInfo messageInfo, Subject subject) throws AuthException
{
// 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
{
// servlets do not need secured responses
return AuthStatus.SEND_SUCCESS;
}
@Override
public AuthStatus validateRequest(MessageInfo messageInfo, Subject clientSubject, Subject serviceSubject) throws AuthException
{
return AuthStatus.SEND_FAILURE;

View File

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

View File

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

View File

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

View File

@ -95,6 +95,7 @@ public class ContextFactory implements ObjectFactory
* return null.
* @see javax.naming.spi.ObjectFactory#getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)
*/
@Override
public Object getObjectInstance (Object obj,
Name name,
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.ignorecase", "false");
}
@Override
public Name parse (String name)
throws NamingException
{
@ -74,6 +75,7 @@ public class InitialContextFactory implements javax.naming.spi.InitialContextFac
* @param env a <code>Hashtable</code> value
* @return a <code>Context</code> value
*/
@Override
public Context getInitialContext(Hashtable env)
{
__log.debug("InitialContextFactory.getInitialContext()");

View File

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

View File

@ -144,6 +144,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return copy of this NamingContext
* @exception CloneNotSupportedException if an error occurs
*/
@Override
public Object clone ()
throws CloneNotSupportedException
{
@ -211,6 +212,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param obj object to bind
* @exception NamingException if an error occurs
*/
@Override
public void bind(Name name, Object obj)
throws NamingException
{
@ -311,6 +313,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param obj an <code>Object</code> value
* @exception NamingException if an error occurs
*/
@Override
public void bind(String name, Object obj)
throws NamingException
{
@ -326,6 +329,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return a <code>Context</code> value
* @exception NamingException if an error occurs
*/
@Override
public Context createSubcontext (Name name)
throws NamingException
{
@ -409,6 +413,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return a <code>Context</code> value
* @exception NamingException if an error occurs
*/
@Override
public Context createSubcontext (String name)
throws NamingException
{
@ -424,6 +429,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param name name of subcontext to remove
* @exception NamingException if an error occurs
*/
@Override
public void destroySubcontext (String name)
throws NamingException
{
@ -439,6 +445,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param name name of subcontext to remove
* @exception NamingException if an error occurs
*/
@Override
public void destroySubcontext (Name name)
throws NamingException
{
@ -452,6 +459,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param name name of bound object
* @exception NamingException if an error occurs
*/
@Override
public Object lookup(Name name)
throws NamingException
{
@ -572,6 +580,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return object bound to name
* @exception NamingException if an error occurs
*/
@Override
public Object lookup (String name)
throws NamingException
{
@ -588,6 +597,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return LinkRef or plain object bound at name
* @exception NamingException if an error occurs
*/
@Override
public Object lookupLink (Name name)
throws NamingException
{
@ -685,6 +695,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return LinkRef or plain object bound at name
* @exception NamingException if an error occurs
*/
@Override
public Object lookupLink (String name)
throws NamingException
{
@ -700,6 +711,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return a <code>NamingEnumeration</code> value
* @exception NamingException if an error occurs
*/
@Override
public NamingEnumeration list(Name name)
throws NamingException
{
@ -770,6 +782,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return a <code>NamingEnumeration</code> value
* @exception NamingException if an error occurs
*/
@Override
public NamingEnumeration list(String name)
throws NamingException
{
@ -786,6 +799,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return a <code>NamingEnumeration</code> value
* @exception NamingException if an error occurs
*/
@Override
public NamingEnumeration listBindings(Name name)
throws NamingException
{
@ -855,6 +869,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return a <code>NamingEnumeration</code> value
* @exception NamingException if an error occurs
*/
@Override
public NamingEnumeration listBindings(String name)
throws NamingException
{
@ -870,6 +885,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param obj an <code>Object</code> value
* @exception NamingException if an error occurs
*/
@Override
public void rebind(Name name,
Object obj)
throws NamingException
@ -956,6 +972,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param obj an <code>Object</code> value
* @exception NamingException if an error occurs
*/
@Override
public void rebind (String name,
Object obj)
throws NamingException
@ -970,6 +987,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param name a <code>String</code> value
* @exception NamingException if an error occurs
*/
@Override
public void unbind (String name)
throws NamingException
{
@ -983,6 +1001,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param name a <code>String</code> value
* @exception NamingException if an error occurs
*/
@Override
public void unbind (Name name)
throws NamingException
{
@ -1062,6 +1081,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param newName a <code>Name</code> value
* @exception NamingException if an error occurs
*/
@Override
public void rename(Name oldName,
Name newName)
throws NamingException
@ -1077,7 +1097,9 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param oldName a <code>Name</code> value
* @param newName a <code>Name</code> value
* @exception NamingException if an error occurs
*/ public void rename(String oldName,
*/
@Override
public void rename(String oldName,
String newName)
throws NamingException
{
@ -1095,6 +1117,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return a <code>Name</code> value
* @exception NamingException if an error occurs
*/
@Override
public Name composeName(Name name,
Name prefix)
throws NamingException
@ -1120,6 +1143,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return a <code>Name</code> value
* @exception NamingException if an error occurs
*/
@Override
public String composeName (String name,
String prefix)
throws NamingException
@ -1141,6 +1165,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
*
* @exception NamingException if an error occurs
*/
@Override
public void close ()
throws NamingException
{
@ -1154,6 +1179,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param name a <code>Name</code> value
* @return a <code>NameParser</code> value
*/
@Override
public NameParser getNameParser (Name name)
{
return _parser;
@ -1166,6 +1192,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @param name a <code>Name</code> value
* @return a <code>NameParser</code> value
*/
@Override
public NameParser getNameParser (String name)
{
return _parser;
@ -1183,6 +1210,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return the full name of this Context
* @exception NamingException if an error occurs
*/
@Override
public String getNameInNamespace ()
throws NamingException
{
@ -1209,6 +1237,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return propVal or previous value of the property
* @exception NamingException if an error occurs
*/
@Override
public Object addToEnvironment(String propName,
Object propVal)
throws NamingException
@ -1228,6 +1257,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
* @return value of property or null if it didn't exist
* @exception NamingException if an error occurs
*/
@Override
public Object removeFromEnvironment(String propName)
throws NamingException
{
@ -1244,6 +1274,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
*
* @return a copy of the environment of this Context.
*/
@Override
public Hashtable getEnvironment ()
{
return (Hashtable)_env.clone();
@ -1372,6 +1403,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
/* ------------------------------------------------------------ */
@Override
public String dump()
{
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
{
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));
}
@Override
public PasswordAuthentication getPasswordAuthentication()
{
return passwordAuthentication;
@ -110,6 +111,7 @@ public class MailSessionReference extends Reference implements ObjectFactory
* @return the object found
* @throws Exception if unable to get object instance
*/
@Override
public Object getObjectInstance(Object ref, Name arg1, Context arg2, Hashtable arg3) throws Exception
{
if (ref == null)

View File

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

View File

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

View File

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

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