Discussion:
[Classpathx-javamail] Patch Review: unused private methods
Conrad T. Pino
2007-11-29 01:37:53 UTC
Permalink
Patch goals:

1. Remove method is never used locally warnings, 3 in total.

2. Preserve unused methods in source until required, if ever.

Index: source/gnu/mail/providers/nntp/NNTPStore.java
===================================================================
RCS file: /sources/classpathx/mail/source/gnu/mail/providers/nntp/NNTPStore.java,v
retrieving revision 1.17
diff -U 5 -r1.17 NNTPStore.java
--- source/gnu/mail/providers/nntp/NNTPStore.java 27 Nov 2007 22:03:55 -0000 1.17
+++ source/gnu/mail/providers/nntp/NNTPStore.java 29 Nov 2007 00:09:32 -0000
@@ -278,14 +278,16 @@
}
}
return -1;
}

+ /*
private boolean propertyIsFalse(String key)
{
return "false".equals(getProperty(key));
}
+ */

private boolean propertyIsTrue(String key)
{
return "true".equals(getProperty(key));
}
Index: source/gnu/mail/providers/nntp/NNTPTransport.java
===================================================================
RCS file: /sources/classpathx/mail/source/gnu/mail/providers/nntp/NNTPTransport.java,v
retrieving revision 1.13
diff -U 5 -r1.13 NNTPTransport.java
--- source/gnu/mail/providers/nntp/NNTPTransport.java 27 Nov 2007 22:03:55 -0000 1.13
+++ source/gnu/mail/providers/nntp/NNTPTransport.java 29 Nov 2007 00:09:32 -0000
@@ -237,19 +237,21 @@
}
}
return -1;
}

+ /*
private boolean propertyIsFalse(String key)
{
return "false".equals(getProperty(key));
}

private boolean propertyIsTrue(String key)
{
return "true".equals(getProperty(key));
}
+ */

/*
* Returns the provider-specific or general mail property corresponding to
* the specified key.
*/
Chris Burdess
2007-11-29 09:02:10 UTC
Permalink
Post by Conrad T. Pino
1. Remove method is never used locally warnings, 3 in total.
2. Preserve unused methods in source until required, if ever.
I'd rather we just removed them rather than commenting them out. It's
not as if there's some super complex algorithm here that might be used
in future.
--
Chris Burdess
Conrad T. Pino
2007-11-29 18:58:44 UTC
Permalink
Post by Chris Burdess
Post by Conrad T. Pino
1. Remove method is never used locally warnings, 3 in total.
2. Preserve unused methods in source until required, if ever.
I'd rather we just removed them rather than commenting them out. It's
not as if there's some super complex algorithm here that might be used
in future.
Committed the following patch:

Index: source/gnu/mail/providers/nntp/NNTPStore.java
===================================================================
RCS file: /sources/classpathx/mail/source/gnu/mail/providers/nntp/NNTPStore.java,v
retrieving revision 1.18
diff -u -r1.18 NNTPStore.java
--- source/gnu/mail/providers/nntp/NNTPStore.java 29 Nov 2007 18:36:17 -0000 1.18
+++ source/gnu/mail/providers/nntp/NNTPStore.java 29 Nov 2007 18:51:02 -0000
@@ -280,11 +280,6 @@
return -1;
}

- private boolean propertyIsFalse(String key)
- {
- return "false".equals(getProperty(key));
- }
-
private boolean propertyIsTrue(String key)
{
return "true".equals(getProperty(key));
Index: source/gnu/mail/providers/nntp/NNTPTransport.java
===================================================================
RCS file: /sources/classpathx/mail/source/gnu/mail/providers/nntp/NNTPTransport.java,v
retrieving revision 1.14
diff -u -r1.14 NNTPTransport.java
--- source/gnu/mail/providers/nntp/NNTPTransport.java 29 Nov 2007 18:36:17 -0000 1.14
+++ source/gnu/mail/providers/nntp/NNTPTransport.java 29 Nov 2007 18:51:02 -0000
@@ -239,16 +239,6 @@
return -1;
}

- private boolean propertyIsFalse(String key)
- {
- return "false".equals(getProperty(key));
- }
-
- private boolean propertyIsTrue(String key)
- {
- return "true".equals(getProperty(key));
- }
-
/*
* Returns the provider-specific or general mail property corresponding to
* the specified key.

Loading...