From ad8d82d1e9bf23a9d1d31b5d4c49f64a5bf03f96 Mon Sep 17 00:00:00 2001 From: markt Date: Thu, 5 Nov 2009 01:18:05 +0000 Subject: [PATCH] Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=48132 Patch provided by sebb git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@832954 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/juli/AsyncFileHandler.java | 1 + java/org/apache/juli/ClassLoaderLogManager.java | 6 ++++ java/org/apache/juli/FileHandler.java | 3 ++ java/org/apache/juli/JdkLoggerFormatter.java | 1 + .../juli/logging/LogConfigurationException.java | 1 + java/org/apache/naming/EjbRef.java | 1 + java/org/apache/naming/HandlerRef.java | 2 ++ java/org/apache/naming/NamingEntry.java | 2 ++ java/org/apache/naming/ResourceEnvRef.java | 1 + java/org/apache/naming/ResourceLinkRef.java | 1 + java/org/apache/naming/ResourceRef.java | 2 ++ java/org/apache/naming/ServiceRef.java | 2 ++ java/org/apache/naming/TransactionRef.java | 1 + java/org/apache/naming/resources/CacheEntry.java | 1 + .../naming/resources/DirContextURLConnection.java | 11 ++++++++ .../resources/DirContextURLStreamHandler.java | 2 ++ .../apache/naming/resources/FileDirContext.java | 33 ++++++++++++++++++++++ .../resources/ImmutableNameNotFoundException.java | 4 +++ .../naming/resources/ResourceAttributes.java | 1 + .../org/apache/naming/resources/WARDirContext.java | 28 ++++++++++++++++++ 20 files changed, 104 insertions(+) diff --git a/java/org/apache/juli/AsyncFileHandler.java b/java/org/apache/juli/AsyncFileHandler.java index 026112fa1..31895655f 100644 --- a/java/org/apache/juli/AsyncFileHandler.java +++ b/java/org/apache/juli/AsyncFileHandler.java @@ -120,6 +120,7 @@ public class AsyncFileHandler extends FileHandler { this.setName("AsyncFileHandlerWriter-"+System.identityHashCode(this)); } + @Override public void run() { while (run) { try { diff --git a/java/org/apache/juli/ClassLoaderLogManager.java b/java/org/apache/juli/ClassLoaderLogManager.java index f065cf7f4..31a4136b7 100644 --- a/java/org/apache/juli/ClassLoaderLogManager.java +++ b/java/org/apache/juli/ClassLoaderLogManager.java @@ -74,6 +74,7 @@ public class ClassLoaderLogManager extends LogManager { * * @param logger The logger to be added */ + @Override public synchronized boolean addLogger(final Logger logger) { final String loggerName = logger.getName(); @@ -170,6 +171,7 @@ public class ClassLoaderLogManager extends LogManager { * * @param name The name of the logger to retrieve */ + @Override public synchronized Logger getLogger(final String name) { ClassLoader classLoader = Thread.currentThread() .getContextClassLoader(); @@ -181,6 +183,7 @@ public class ClassLoaderLogManager extends LogManager { * Get an enumeration of the logger names currently defined in the * classloader local configuration. */ + @Override public synchronized Enumeration getLoggerNames() { ClassLoader classLoader = Thread.currentThread() .getContextClassLoader(); @@ -194,6 +197,7 @@ public class ClassLoaderLogManager extends LogManager { * * @param name The property name */ + @Override public String getProperty(String name) { ClassLoader classLoader = Thread.currentThread() .getContextClassLoader(); @@ -230,6 +234,7 @@ public class ClassLoaderLogManager extends LogManager { } + @Override public void readConfiguration() throws IOException, SecurityException { @@ -239,6 +244,7 @@ public class ClassLoaderLogManager extends LogManager { } + @Override public void readConfiguration(InputStream is) throws IOException, SecurityException { diff --git a/java/org/apache/juli/FileHandler.java b/java/org/apache/juli/FileHandler.java index 2bf222c76..fed325235 100644 --- a/java/org/apache/juli/FileHandler.java +++ b/java/org/apache/juli/FileHandler.java @@ -111,6 +111,7 @@ public class FileHandler * * @param record description of the log event */ + @Override public void publish(LogRecord record) { if (!isLoggable(record)) { @@ -161,6 +162,7 @@ public class FileHandler /** * Close the currently open log file (if any). */ + @Override public void close() { closeWriter(); } @@ -185,6 +187,7 @@ public class FileHandler /** * Flush the writer. */ + @Override public void flush() { try { diff --git a/java/org/apache/juli/JdkLoggerFormatter.java b/java/org/apache/juli/JdkLoggerFormatter.java index 3e7f5018b..75af09598 100644 --- a/java/org/apache/juli/JdkLoggerFormatter.java +++ b/java/org/apache/juli/JdkLoggerFormatter.java @@ -49,6 +49,7 @@ public class JdkLoggerFormatter extends Formatter { public static final int LOG_LEVEL_ERROR = 1000; public static final int LOG_LEVEL_FATAL = 1000; + @Override public String format(LogRecord record) { Throwable t=record.getThrown(); int level=record.getLevel().intValue(); diff --git a/java/org/apache/juli/logging/LogConfigurationException.java b/java/org/apache/juli/logging/LogConfigurationException.java index 5fd32c50f..7e8dd49ae 100644 --- a/java/org/apache/juli/logging/LogConfigurationException.java +++ b/java/org/apache/juli/logging/LogConfigurationException.java @@ -82,6 +82,7 @@ public class LogConfigurationException extends RuntimeException { /** * Return the underlying cause of this exception (if any). */ + @Override public Throwable getCause() { return (this.cause); diff --git a/java/org/apache/naming/EjbRef.java b/java/org/apache/naming/EjbRef.java index 86e330e9c..8816701de 100644 --- a/java/org/apache/naming/EjbRef.java +++ b/java/org/apache/naming/EjbRef.java @@ -117,6 +117,7 @@ public class EjbRef * Retrieves the class name of the factory of the object to which this * reference refers. */ + @Override public String getFactoryClassName() { String factory = super.getFactoryClassName(); if (factory != null) { diff --git a/java/org/apache/naming/HandlerRef.java b/java/org/apache/naming/HandlerRef.java index 5985e0bb1..a2cd1fcaf 100644 --- a/java/org/apache/naming/HandlerRef.java +++ b/java/org/apache/naming/HandlerRef.java @@ -136,6 +136,7 @@ public class HandlerRef * Retrieves the class name of the factory of the object to which this * reference refers. */ + @Override public String getFactoryClassName() { String factory = super.getFactoryClassName(); if (factory != null) { @@ -157,6 +158,7 @@ public class HandlerRef /** * Return a String rendering of this object. */ + @Override public String toString() { StringBuilder sb = new StringBuilder("HandlerRef["); diff --git a/java/org/apache/naming/NamingEntry.java b/java/org/apache/naming/NamingEntry.java index a8caef8e9..9ef8ac582 100644 --- a/java/org/apache/naming/NamingEntry.java +++ b/java/org/apache/naming/NamingEntry.java @@ -64,6 +64,7 @@ public class NamingEntry { // --------------------------------------------------------- Object Methods + @Override public boolean equals(Object obj) { if ((obj != null) && (obj instanceof NamingEntry)) { return name.equals(((NamingEntry) obj).name); @@ -73,6 +74,7 @@ public class NamingEntry { } + @Override public int hashCode() { return name.hashCode(); } diff --git a/java/org/apache/naming/ResourceEnvRef.java b/java/org/apache/naming/ResourceEnvRef.java index e4c188bbe..9f9612a96 100644 --- a/java/org/apache/naming/ResourceEnvRef.java +++ b/java/org/apache/naming/ResourceEnvRef.java @@ -78,6 +78,7 @@ public class ResourceEnvRef * Retrieves the class name of the factory of the object to which this * reference refers. */ + @Override public String getFactoryClassName() { String factory = super.getFactoryClassName(); if (factory != null) { diff --git a/java/org/apache/naming/ResourceLinkRef.java b/java/org/apache/naming/ResourceLinkRef.java index e8879ab4b..4ad8eac81 100644 --- a/java/org/apache/naming/ResourceLinkRef.java +++ b/java/org/apache/naming/ResourceLinkRef.java @@ -90,6 +90,7 @@ public class ResourceLinkRef * Retrieves the class name of the factory of the object to which this * reference refers. */ + @Override public String getFactoryClassName() { String factory = super.getFactoryClassName(); if (factory != null) { diff --git a/java/org/apache/naming/ResourceRef.java b/java/org/apache/naming/ResourceRef.java index 80d8d200f..922ded038 100644 --- a/java/org/apache/naming/ResourceRef.java +++ b/java/org/apache/naming/ResourceRef.java @@ -117,6 +117,7 @@ public class ResourceRef * Retrieves the class name of the factory of the object to which this * reference refers. */ + @Override public String getFactoryClassName() { String factory = super.getFactoryClassName(); if (factory != null) { @@ -138,6 +139,7 @@ public class ResourceRef /** * Return a String rendering of this object. */ + @Override public String toString() { StringBuilder sb = new StringBuilder("ResourceRef["); diff --git a/java/org/apache/naming/ServiceRef.java b/java/org/apache/naming/ServiceRef.java index dd38df29a..8269a84b8 100644 --- a/java/org/apache/naming/ServiceRef.java +++ b/java/org/apache/naming/ServiceRef.java @@ -165,6 +165,7 @@ public class ServiceRef * Retrieves the class name of the factory of the object to which this * reference refers. */ + @Override public String getFactoryClassName() { String factory = super.getFactoryClassName(); if (factory != null) { @@ -186,6 +187,7 @@ public class ServiceRef /** * Return a String rendering of this object. */ + @Override public String toString() { StringBuilder sb = new StringBuilder("ServiceRef["); diff --git a/java/org/apache/naming/TransactionRef.java b/java/org/apache/naming/TransactionRef.java index 50eb61a1e..8b97ad4f7 100644 --- a/java/org/apache/naming/TransactionRef.java +++ b/java/org/apache/naming/TransactionRef.java @@ -74,6 +74,7 @@ public class TransactionRef * Retrieves the class name of the factory of the object to which this * reference refers. */ + @Override public String getFactoryClassName() { String factory = super.getFactoryClassName(); if (factory != null) { diff --git a/java/org/apache/naming/resources/CacheEntry.java b/java/org/apache/naming/resources/CacheEntry.java index aafc1a877..6fe10c59c 100644 --- a/java/org/apache/naming/resources/CacheEntry.java +++ b/java/org/apache/naming/resources/CacheEntry.java @@ -56,6 +56,7 @@ public class CacheEntry { } + @Override public String toString() { return ("Cache entry: " + name + "\n" + "Exists: " + exists + "\n" diff --git a/java/org/apache/naming/resources/DirContextURLConnection.java b/java/org/apache/naming/resources/DirContextURLConnection.java index 7db98baba..0421db726 100644 --- a/java/org/apache/naming/resources/DirContextURLConnection.java +++ b/java/org/apache/naming/resources/DirContextURLConnection.java @@ -127,6 +127,7 @@ public class DirContextURLConnection * * @throws IOException Object not found */ + @Override public void connect() throws IOException { @@ -173,6 +174,7 @@ public class DirContextURLConnection /** * Return the content length value. */ + @Override public int getContentLength() { return getHeaderFieldInt(ResourceAttributes.CONTENT_LENGTH, -1); } @@ -181,6 +183,7 @@ public class DirContextURLConnection /** * Return the content type value. */ + @Override public String getContentType() { return getHeaderField(ResourceAttributes.CONTENT_TYPE); } @@ -189,6 +192,7 @@ public class DirContextURLConnection /** * Return the last modified date. */ + @Override public long getDate() { return date; } @@ -197,6 +201,7 @@ public class DirContextURLConnection /** * Return the last modified date. */ + @Override public long getLastModified() { if (!connected) { @@ -239,6 +244,7 @@ public class DirContextURLConnection /** * Returns an unmodifiable Map of the header fields. */ + @Override public Map> getHeaderFields() { if (!connected) { @@ -282,6 +288,7 @@ public class DirContextURLConnection /** * Returns the name of the specified header field. */ + @Override public String getHeaderField(String name) { if (!connected) { @@ -318,6 +325,7 @@ public class DirContextURLConnection /** * Get object content. */ + @Override public Object getContent() throws IOException { @@ -339,6 +347,7 @@ public class DirContextURLConnection /** * Get object content. */ + @Override public Object getContent(Class[] classes) throws IOException { @@ -357,6 +366,7 @@ public class DirContextURLConnection /** * Get input stream. */ + @Override public InputStream getInputStream() throws IOException { @@ -381,6 +391,7 @@ public class DirContextURLConnection /** * Get the Permission for this URL */ + @Override public Permission getPermission() { return permission; diff --git a/java/org/apache/naming/resources/DirContextURLStreamHandler.java b/java/org/apache/naming/resources/DirContextURLStreamHandler.java index c845b80cf..5358b5d2b 100644 --- a/java/org/apache/naming/resources/DirContextURLStreamHandler.java +++ b/java/org/apache/naming/resources/DirContextURLStreamHandler.java @@ -83,6 +83,7 @@ public class DirContextURLStreamHandler * Opens a connection to the object referenced by the URL * argument. */ + @Override protected URLConnection openConnection(URL u) throws IOException { DirContext currentContext = this.context; @@ -98,6 +99,7 @@ public class DirContextURLStreamHandler /** * Override as part of the fix for 36534, to ensure toString is correct. */ + @Override protected String toExternalForm(URL u) { // pre-compute length of StringBuilder int len = u.getProtocol().length() + 1; diff --git a/java/org/apache/naming/resources/FileDirContext.java b/java/org/apache/naming/resources/FileDirContext.java index 43958d4c4..7b43e6ed1 100644 --- a/java/org/apache/naming/resources/FileDirContext.java +++ b/java/org/apache/naming/resources/FileDirContext.java @@ -119,6 +119,7 @@ public class FileDirContext extends BaseDirContext { * @exception IllegalArgumentException if this would create a * malformed URL */ + @Override public void setDocBase(String docBase) { // Validate the format of the proposed document root @@ -166,6 +167,7 @@ public class FileDirContext extends BaseDirContext { /** * Release any resources allocated for this directory context. */ + @Override public void release() { super.release(); } @@ -177,6 +179,7 @@ public class FileDirContext extends BaseDirContext { * * @param path The path to the desired resource */ + @Override protected String doGetRealPath(String path) { File file = new File(getDocBase(), path); return file.getAbsolutePath(); @@ -192,6 +195,7 @@ public class FileDirContext extends BaseDirContext { * @return the object bound to name * @exception NamingException if a naming exception is encountered */ + @Override protected Object doLookup(String name) throws NamingException { Object result = null; @@ -229,6 +233,7 @@ public class FileDirContext extends BaseDirContext { * exist * @exception NamingException if a naming exception is encountered */ + @Override public void unbind(String name) throws NamingException { @@ -256,6 +261,7 @@ public class FileDirContext extends BaseDirContext { * @exception NameAlreadyBoundException if newName is already bound * @exception NamingException if a naming exception is encountered */ + @Override public void rename(String oldName, String newName) throws NamingException { @@ -285,6 +291,7 @@ public class FileDirContext extends BaseDirContext { * this context. Each element of the enumeration is of type NameClassPair. * @exception NamingException if a naming exception is encountered */ + @Override public NamingEnumeration list(String name) throws NamingException { @@ -312,6 +319,7 @@ public class FileDirContext extends BaseDirContext { * Each element of the enumeration is of type Binding. * @exception NamingException if a naming exception is encountered */ + @Override public NamingEnumeration listBindings(String name) throws NamingException { @@ -352,6 +360,7 @@ public class FileDirContext extends BaseDirContext { * @exception NotContextException if the name is bound but does not name * a context, or does not name a context of the appropriate type */ + @Override public void destroySubcontext(String name) throws NamingException { unbind(name); @@ -368,6 +377,7 @@ public class FileDirContext extends BaseDirContext { * (if any). * @exception NamingException if a naming exception is encountered */ + @Override public Object lookupLink(String name) throws NamingException { // Note : Links are not supported @@ -392,6 +402,7 @@ public class FileDirContext extends BaseDirContext { * not have the notion of a full name * @exception NamingException if a naming exception is encountered */ + @Override public String getNameInNamespace() throws NamingException { return docBase; @@ -413,6 +424,7 @@ public class FileDirContext extends BaseDirContext { * indicates that none should be retrieved * @exception NamingException if a naming exception is encountered */ + @Override protected Attributes doGetAttributes(String name, String[] attrIds) throws NamingException { @@ -442,6 +454,7 @@ public class FileDirContext extends BaseDirContext { * completed successfully * @exception NamingException if a naming exception is encountered */ + @Override public void modifyAttributes(String name, int mod_op, Attributes attrs) throws NamingException { @@ -462,6 +475,7 @@ public class FileDirContext extends BaseDirContext { * completed successfully * @exception NamingException if a naming exception is encountered */ + @Override public void modifyAttributes(String name, ModificationItem[] mods) throws NamingException { @@ -483,6 +497,7 @@ public class FileDirContext extends BaseDirContext { * of the binding are not supplied * @exception NamingException if a naming exception is encountered */ + @Override public void bind(String name, Object obj, Attributes attrs) throws NamingException { @@ -516,6 +531,7 @@ public class FileDirContext extends BaseDirContext { * of the binding are not supplied * @exception NamingException if a naming exception is encountered */ + @Override public void rebind(String name, Object obj, Attributes attrs) throws NamingException { @@ -592,6 +608,7 @@ public class FileDirContext extends BaseDirContext { * the mandatory attributes required for creation * @exception NamingException if a naming exception is encountered */ + @Override public DirContext createSubcontext(String name, Attributes attrs) throws NamingException { @@ -620,6 +637,7 @@ public class FileDirContext extends BaseDirContext { * @exception OperationNotSupportedException if schema not supported * @exception NamingException if a naming exception is encountered */ + @Override public DirContext getSchema(String name) throws NamingException { throw new OperationNotSupportedException(); @@ -637,6 +655,7 @@ public class FileDirContext extends BaseDirContext { * @exception OperationNotSupportedException if schema not supported * @exception NamingException if a naming exception is encountered */ + @Override public DirContext getSchemaClassDefinition(String name) throws NamingException { throw new OperationNotSupportedException(); @@ -660,6 +679,7 @@ public class FileDirContext extends BaseDirContext { * context named by name. * @exception NamingException if a naming exception is encountered */ + @Override public NamingEnumeration search(String name, Attributes matchingAttributes, String[] attributesToReturn) throws NamingException { @@ -682,6 +702,7 @@ public class FileDirContext extends BaseDirContext { * context named by name. * @exception NamingException if a naming exception is encountered */ + @Override public NamingEnumeration search(String name, Attributes matchingAttributes) throws NamingException { return null; @@ -707,6 +728,7 @@ public class FileDirContext extends BaseDirContext { * contain invalid settings * @exception NamingException if a naming exception is encountered */ + @Override public NamingEnumeration search(String name, String filter, SearchControls cons) throws NamingException { @@ -738,6 +760,7 @@ public class FileDirContext extends BaseDirContext { * represents an invalid search filter * @exception NamingException if a naming exception is encountered */ + @Override public NamingEnumeration search(String name, String filterExpr, Object[] filterArgs, SearchControls cons) throws NamingException { @@ -906,6 +929,7 @@ public class FileDirContext extends BaseDirContext { * * @return InputStream */ + @Override public InputStream streamContent() throws IOException { if (binaryContent == null) { @@ -956,6 +980,7 @@ public class FileDirContext extends BaseDirContext { /** * Is collection. */ + @Override public boolean isCollection() { if (!accessed) { collection = file.isDirectory(); @@ -970,6 +995,7 @@ public class FileDirContext extends BaseDirContext { * * @return content length value */ + @Override public long getContentLength() { if (contentLength != -1L) return contentLength; @@ -983,6 +1009,7 @@ public class FileDirContext extends BaseDirContext { * * @return creation time value */ + @Override public long getCreation() { if (creation != -1L) return creation; @@ -996,6 +1023,7 @@ public class FileDirContext extends BaseDirContext { * * @return Creation date value */ + @Override public Date getCreationDate() { if (creation == -1L) { creation = getCreation(); @@ -1009,6 +1037,7 @@ public class FileDirContext extends BaseDirContext { * * @return lastModified time value */ + @Override public long getLastModified() { if (lastModified != -1L) return lastModified; @@ -1022,6 +1051,7 @@ public class FileDirContext extends BaseDirContext { * * @return LastModified date value */ + @Override public Date getLastModifiedDate() { if (lastModified == -1L) { lastModified = getLastModified(); @@ -1035,6 +1065,7 @@ public class FileDirContext extends BaseDirContext { * * @return Name value */ + @Override public String getName() { if (name == null) name = file.getName(); @@ -1047,6 +1078,7 @@ public class FileDirContext extends BaseDirContext { * * @return String resource type */ + @Override public String getResourceType() { if (!accessed) { collection = file.isDirectory(); @@ -1061,6 +1093,7 @@ public class FileDirContext extends BaseDirContext { * * @return String the file's canonical path */ + @Override public String getCanonicalPath() { if (canonicalPath == null) { try { diff --git a/java/org/apache/naming/resources/ImmutableNameNotFoundException.java b/java/org/apache/naming/resources/ImmutableNameNotFoundException.java index d924fa77d..ba8d35894 100644 --- a/java/org/apache/naming/resources/ImmutableNameNotFoundException.java +++ b/java/org/apache/naming/resources/ImmutableNameNotFoundException.java @@ -31,10 +31,14 @@ import javax.naming.NameNotFoundException; public class ImmutableNameNotFoundException extends NameNotFoundException { + @Override public void appendRemainingComponent(String name) {} + @Override public void appendRemainingName(Name name) {} + @Override public void setRemainingName(Name name) {} public void setResolverName(Name name) {} + @Override public void setRootCause(Throwable e) {} } diff --git a/java/org/apache/naming/resources/ResourceAttributes.java b/java/org/apache/naming/resources/ResourceAttributes.java index 649d24704..7f679b041 100644 --- a/java/org/apache/naming/resources/ResourceAttributes.java +++ b/java/org/apache/naming/resources/ResourceAttributes.java @@ -976,6 +976,7 @@ public class ResourceAttributes implements Attributes { /** * Clone the attributes object (WARNING: fake cloning). */ + @Override public Object clone() { return this; } diff --git a/java/org/apache/naming/resources/WARDirContext.java b/java/org/apache/naming/resources/WARDirContext.java index 9a4293feb..5480bd991 100644 --- a/java/org/apache/naming/resources/WARDirContext.java +++ b/java/org/apache/naming/resources/WARDirContext.java @@ -115,6 +115,7 @@ public class WARDirContext extends BaseDirContext { * @exception IllegalArgumentException if this would create a * malformed URL */ + @Override public void setDocBase(String docBase) { // Validate the format of the proposed document root @@ -151,6 +152,7 @@ public class WARDirContext extends BaseDirContext { /** * Release any resources allocated for this directory context. */ + @Override public void release() { entries = null; @@ -173,6 +175,7 @@ public class WARDirContext extends BaseDirContext { * * @param path The path to the desired resource */ + @Override protected String doGetRealPath(String path) { return null; } @@ -188,6 +191,7 @@ public class WARDirContext extends BaseDirContext { * @return the object bound to name * @exception NamingException if a naming exception is encountered */ + @Override protected Object doLookup(String name) throws NamingException { return lookup(new CompositeName(name)); @@ -204,6 +208,7 @@ public class WARDirContext extends BaseDirContext { * @return the object bound to name * @exception NamingException if a naming exception is encountered */ + @Override public Object lookup(Name name) throws NamingException { if (name.isEmpty()) @@ -234,6 +239,7 @@ public class WARDirContext extends BaseDirContext { * exist * @exception NamingException if a naming exception is encountered */ + @Override public void unbind(String name) throws NamingException { throw new OperationNotSupportedException(); @@ -251,6 +257,7 @@ public class WARDirContext extends BaseDirContext { * @exception NameAlreadyBoundException if newName is already bound * @exception NamingException if a naming exception is encountered */ + @Override public void rename(String oldName, String newName) throws NamingException { throw new OperationNotSupportedException(); @@ -270,6 +277,7 @@ public class WARDirContext extends BaseDirContext { * this context. Each element of the enumeration is of type NameClassPair. * @exception NamingException if a naming exception is encountered */ + @Override public NamingEnumeration list(String name) throws NamingException { return list(new CompositeName(name)); @@ -289,6 +297,7 @@ public class WARDirContext extends BaseDirContext { * this context. Each element of the enumeration is of type NameClassPair. * @exception NamingException if a naming exception is encountered */ + @Override public NamingEnumeration list(Name name) throws NamingException { if (name.isEmpty()) @@ -314,6 +323,7 @@ public class WARDirContext extends BaseDirContext { * Each element of the enumeration is of type Binding. * @exception NamingException if a naming exception is encountered */ + @Override public NamingEnumeration listBindings(String name) throws NamingException { return listBindings(new CompositeName(name)); @@ -333,6 +343,7 @@ public class WARDirContext extends BaseDirContext { * Each element of the enumeration is of type Binding. * @exception NamingException if a naming exception is encountered */ + @Override public NamingEnumeration listBindings(Name name) throws NamingException { if (name.isEmpty()) @@ -372,6 +383,7 @@ public class WARDirContext extends BaseDirContext { * @exception NotContextException if the name is bound but does not name * a context, or does not name a context of the appropriate type */ + @Override public void destroySubcontext(String name) throws NamingException { throw new OperationNotSupportedException(); @@ -388,6 +400,7 @@ public class WARDirContext extends BaseDirContext { * (if any). * @exception NamingException if a naming exception is encountered */ + @Override public Object lookupLink(String name) throws NamingException { // Note : Links are not supported @@ -412,6 +425,7 @@ public class WARDirContext extends BaseDirContext { * not have the notion of a full name * @exception NamingException if a naming exception is encountered */ + @Override public String getNameInNamespace() throws NamingException { return docBase; @@ -433,6 +447,7 @@ public class WARDirContext extends BaseDirContext { * indicates that none should be retrieved * @exception NamingException if a naming exception is encountered */ + @Override protected Attributes doGetAttributes(String name, String[] attrIds) throws NamingException { return getAttributes(new CompositeName(name), attrIds); @@ -447,6 +462,7 @@ public class WARDirContext extends BaseDirContext { * @param name the name of the object from which to retrieve attributes * @exception NamingException if a naming exception is encountered */ + @Override public Attributes getAttributes(Name name, String[] attrIds) throws NamingException { @@ -488,6 +504,7 @@ public class WARDirContext extends BaseDirContext { * completed successfully * @exception NamingException if a naming exception is encountered */ + @Override public void modifyAttributes(String name, int mod_op, Attributes attrs) throws NamingException { throw new OperationNotSupportedException(); @@ -508,6 +525,7 @@ public class WARDirContext extends BaseDirContext { * completed successfully * @exception NamingException if a naming exception is encountered */ + @Override public void modifyAttributes(String name, ModificationItem[] mods) throws NamingException { throw new OperationNotSupportedException(); @@ -529,6 +547,7 @@ public class WARDirContext extends BaseDirContext { * of the binding are not supplied * @exception NamingException if a naming exception is encountered */ + @Override public void bind(String name, Object obj, Attributes attrs) throws NamingException { throw new OperationNotSupportedException(); @@ -553,6 +572,7 @@ public class WARDirContext extends BaseDirContext { * of the binding are not supplied * @exception NamingException if a naming exception is encountered */ + @Override public void rebind(String name, Object obj, Attributes attrs) throws NamingException { throw new OperationNotSupportedException(); @@ -576,6 +596,7 @@ public class WARDirContext extends BaseDirContext { * the mandatory attributes required for creation * @exception NamingException if a naming exception is encountered */ + @Override public DirContext createSubcontext(String name, Attributes attrs) throws NamingException { throw new OperationNotSupportedException(); @@ -595,6 +616,7 @@ public class WARDirContext extends BaseDirContext { * @exception OperationNotSupportedException if schema not supported * @exception NamingException if a naming exception is encountered */ + @Override public DirContext getSchema(String name) throws NamingException { throw new OperationNotSupportedException(); @@ -612,6 +634,7 @@ public class WARDirContext extends BaseDirContext { * @exception OperationNotSupportedException if schema not supported * @exception NamingException if a naming exception is encountered */ + @Override public DirContext getSchemaClassDefinition(String name) throws NamingException { throw new OperationNotSupportedException(); @@ -635,6 +658,7 @@ public class WARDirContext extends BaseDirContext { * context named by name. * @exception NamingException if a naming exception is encountered */ + @Override public NamingEnumeration search(String name, Attributes matchingAttributes, String[] attributesToReturn) throws NamingException { @@ -657,6 +681,7 @@ public class WARDirContext extends BaseDirContext { * context named by name. * @exception NamingException if a naming exception is encountered */ + @Override public NamingEnumeration search(String name, Attributes matchingAttributes) throws NamingException { throw new OperationNotSupportedException(); @@ -682,6 +707,7 @@ public class WARDirContext extends BaseDirContext { * contain invalid settings * @exception NamingException if a naming exception is encountered */ + @Override public NamingEnumeration search(String name, String filter, SearchControls cons) throws NamingException { @@ -713,6 +739,7 @@ public class WARDirContext extends BaseDirContext { * represents an invalid search filter * @exception NamingException if a naming exception is encountered */ + @Override public NamingEnumeration search(String name, String filterExpr, Object[] filterArgs, SearchControls cons) throws NamingException { @@ -947,6 +974,7 @@ public class WARDirContext extends BaseDirContext { * * @return InputStream */ + @Override public InputStream streamContent() throws IOException { try { -- 2.11.0