opensubscriber
   Find in this group all groups
 
Unknown more information…

c : classpathx-javamail@gnu.org 29 November 2007 • 9:51AM -0500

[Classpathx-javamail] Patch Review: source/javax/mail/FetchProfile.java
by Conrad T. Pino

REPLY TO AUTHOR
 
REPLY TO GROUP



Patch goal:

1. Remove field FetchProfile.Item.name is never read locally
   warnings, 57 in total.

Java 5 has @SuppressWarnings annotation but only if source level
is so set requiring make system to detect compiler version & act
accordingly.  Probably fails with older compilers.

The following patch adds a protected method to return the field
and is noted as a non JavaMail API function.

Another alternative is override "toString()" to "return name;"
but that's not in JavaMail API either.

Index: source/javax/mail/FetchProfile.java
===================================================================
RCS file: /sources/classpathx/mail/source/javax/mail/FetchProfile.java,v
retrieving revision 1.13
diff -u -r1.13 FetchProfile.java
--- source/javax/mail/FetchProfile.java 27 Nov 2007 22:03:56 -0000 1.13
+++ source/javax/mail/FetchProfile.java 28 Nov 2007 22:58:16 -0000
@@ -71,6 +71,14 @@
       this.name = name;
     }

+    /**
+     * The method is not a JavaMail API method.
+     */
+    protected String getName()
+    {
+      return name;
+    }
+
   }





_______________________________________________
Classpathx-javamail mailing list
Classpathx-javamail@gnu....
http://lists.gnu.org/mailman/listinfo/classpathx-javamail

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.