Patch Review: unused local variables

View: New views
3 Messages — Rating Filter:   Alert me  

Patch Review: unused local variables

by Conrad T. Pino :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Patch goals:

1. Remove local variable is never read warnings, 32 in total.

Note: IMAPFolder retains "s.getConnection()" method call
      to preserve state change side effects, if any.

Index: source/gnu/mail/providers/imap/IMAPFolder.java
===================================================================
RCS file: /sources/classpathx/mail/source/gnu/mail/providers/imap/IMAPFolder.java,v
retrieving revision 1.21
diff -u -r1.21 IMAPFolder.java
--- source/gnu/mail/providers/imap/IMAPFolder.java 27 Nov 2007 22:03:54 -0000 1.21
+++ source/gnu/mail/providers/imap/IMAPFolder.java 29 Nov 2007 00:39:41 -0000
@@ -1288,7 +1288,7 @@
     throws MessagingException
   {
     IMAPStore s = (IMAPStore) store;
-    IMAPConnection connection = s.getConnection();
+    s.getConnection();
     getSeparator();
     int di = path.lastIndexOf(delimiter);
     if (di == -1)
Index: source/gnu/mail/util/Base64OutputStream.java
===================================================================
RCS file: /sources/classpathx/mail/source/gnu/mail/util/Base64OutputStream.java,v
retrieving revision 1.6
diff -u -r1.6 Base64OutputStream.java
--- source/gnu/mail/util/Base64OutputStream.java 27 Nov 2007 22:03:56 -0000 1.6
+++ source/gnu/mail/util/Base64OutputStream.java 29 Nov 2007 00:39:41 -0000
@@ -159,7 +159,6 @@
     {
       byte b = buffer[0];
       int i = 0;
-      boolean flag = false;
       out.write(src[b>>>2 & 0x3f]);
       out.write(src[(b<<4 & 0x30) +(i>>>4 & 0xf)]);
       out.write(EQ);
Index: source/javax/mail/search/RecipientTerm.java
===================================================================
RCS file: /sources/classpathx/mail/source/javax/mail/search/RecipientTerm.java,v
retrieving revision 1.11
diff -u -r1.11 RecipientTerm.java
--- source/javax/mail/search/RecipientTerm.java 27 Nov 2007 22:04:00 -0000 1.11
+++ source/javax/mail/search/RecipientTerm.java 29 Nov 2007 00:39:41 -0000
@@ -76,7 +76,6 @@
    */
   public boolean match(Message msg)
   {
-    Address aaddress[];
     try
       {
         Address[] addresses = msg.getRecipients(type);


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

Re: Patch Review: unused local variables

by Chris Burdess-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Conrad T. Pino wrote:
> Patch goals:
>
> 1. Remove local variable is never read warnings, 32 in total.
>
> Note: IMAPFolder retains "s.getConnection()" method call
>       to preserve state change side effects, if any.

Yes, there are side effects. The patch seems fine.
--
Chris Burdess


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

RE: Patch Review: unused local variables

by Conrad T. Pino :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Conrad T. Pino wrote:
> > Patch goals:
> >
> > 1. Remove local variable is never read warnings, 32 in total.
> >
> > Note: IMAPFolder retains "s.getConnection()" method call
> >       to preserve state change side effects, if any.
>
> Yes, there are side effects. The patch seems fine.

Committed.



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