From: markt Date: Thu, 21 Oct 2010 22:14:58 +0000 (+0000) Subject: Fix Eclipse warnings X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=511c3c0e305d556087e6c21d98e4381a807a6019;p=tomcat7.0 Fix Eclipse warnings git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1026163 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/naming/resources/RecyclableNamingEnumeration.java b/java/org/apache/naming/resources/RecyclableNamingEnumeration.java index 83a184c58..70a80ec29 100644 --- a/java/org/apache/naming/resources/RecyclableNamingEnumeration.java +++ b/java/org/apache/naming/resources/RecyclableNamingEnumeration.java @@ -65,6 +65,7 @@ public class RecyclableNamingEnumeration /** * Retrieves the next element in the enumeration. */ + @Override public E next() throws NamingException { return nextElement(); @@ -74,6 +75,7 @@ public class RecyclableNamingEnumeration /** * Determines whether there are any more elements in the enumeration. */ + @Override public boolean hasMore() throws NamingException { return enumeration.hasMoreElements(); @@ -83,16 +85,19 @@ public class RecyclableNamingEnumeration /** * Closes this enumeration. */ - public void close() - throws NamingException { + @Override + public void close() throws NamingException { + // NO-OP } + @Override public boolean hasMoreElements() { return enumeration.hasMoreElements(); } + @Override public E nextElement() { return enumeration.nextElement(); } diff --git a/java/org/apache/naming/resources/Resource.java b/java/org/apache/naming/resources/Resource.java index bdf321edd..2afb9d8da 100644 --- a/java/org/apache/naming/resources/Resource.java +++ b/java/org/apache/naming/resources/Resource.java @@ -34,6 +34,7 @@ public class Resource { public Resource() { + // NO-OP } @@ -69,9 +70,9 @@ public class Resource { * Content accessor. * * @return InputStream + * @throws IOException */ - public InputStream streamContent() - throws IOException { + public InputStream streamContent() throws IOException { if (binaryContent != null) { return new ByteArrayInputStream(binaryContent); } diff --git a/java/org/apache/naming/resources/ResourceAttributes.java b/java/org/apache/naming/resources/ResourceAttributes.java index 7f679b041..d41b438eb 100644 --- a/java/org/apache/naming/resources/ResourceAttributes.java +++ b/java/org/apache/naming/resources/ResourceAttributes.java @@ -41,6 +41,7 @@ public class ResourceAttributes implements Attributes { // -------------------------------------------------------------- Constants + private static final long serialVersionUID = 1L; // Default attribute names @@ -175,6 +176,7 @@ public class ResourceAttributes implements Attributes { * Default constructor. */ public ResourceAttributes() { + // NO-OP } @@ -772,6 +774,7 @@ public class ResourceAttributes implements Attributes { /** * Get attribute. */ + @Override public Attribute get(String attrID) { if (attributes == null) { if (attrID.equals(CREATION_DATE)) { @@ -829,6 +832,7 @@ public class ResourceAttributes implements Attributes { /** * Put attribute. */ + @Override public Attribute put(Attribute attribute) { if (attributes == null) { try { @@ -845,6 +849,7 @@ public class ResourceAttributes implements Attributes { /** * Put attribute. */ + @Override public Attribute put(String attrID, Object val) { if (attributes == null) { return null; // No reason to implement this @@ -857,6 +862,7 @@ public class ResourceAttributes implements Attributes { /** * Remove attribute. */ + @Override public Attribute remove(String attrID) { if (attributes == null) { return null; // No reason to implement this @@ -869,6 +875,7 @@ public class ResourceAttributes implements Attributes { /** * Get all attributes. */ + @Override public NamingEnumeration getAll() { if (attributes == null) { Vector attributes = new Vector(); @@ -916,6 +923,7 @@ public class ResourceAttributes implements Attributes { /** * Get all attribute IDs. */ + @Override public NamingEnumeration getIDs() { if (attributes == null) { Vector attributeIDs = new Vector(); @@ -957,6 +965,7 @@ public class ResourceAttributes implements Attributes { /** * Retrieves the number of attributes in the attribute set. */ + @Override public int size() { if (attributes == null) { int size = 0; @@ -985,6 +994,7 @@ public class ResourceAttributes implements Attributes { /** * Case sensitivity. */ + @Override public boolean isCaseIgnored() { return false; } diff --git a/java/org/apache/naming/resources/ResourceCache.java b/java/org/apache/naming/resources/ResourceCache.java index a3abc3da2..cc79f41d7 100644 --- a/java/org/apache/naming/resources/ResourceCache.java +++ b/java/org/apache/naming/resources/ResourceCache.java @@ -34,6 +34,7 @@ public class ResourceCache { public ResourceCache() { + // NO-OP }