james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [2/2] james-jdkim git commit: JDKIM-39 Fix Eclipse warnings
Date Tue, 26 Jun 2018 03:37:37 GMT
JDKIM-39 Fix Eclipse warnings


Project: http://git-wip-us.apache.org/repos/asf/james-jdkim/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-jdkim/commit/edd78234
Tree: http://git-wip-us.apache.org/repos/asf/james-jdkim/tree/edd78234
Diff: http://git-wip-us.apache.org/repos/asf/james-jdkim/diff/edd78234

Branch: refs/heads/master
Commit: edd78234f6abafaf8be4a90285ee9695a6aeb2c3
Parents: 35acb18
Author: Antoine Duprat <aduprat@linagora.com>
Authored: Mon Jun 11 12:38:46 2018 +0200
Committer: Antoine Duprat <aduprat@linagora.com>
Committed: Mon Jun 11 12:38:46 2018 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/james/jdkim/mailets/DKIMSign.java    | 2 --
 .../org/apache/james/jdkim/mailets/MimeMessageHeaders.java    | 1 -
 .../org/apache/james/jdkim/canon/CompoundOutputStream.java    | 1 -
 .../main/java/org/apache/james/jdkim/impl/BodyHasherImpl.java | 2 +-
 .../apache/james/jdkim/impl/DNSPublicKeyRecordRetriever.java  | 7 +++----
 .../main/java/org/apache/james/jdkim/tagvalue/TagValue.java   | 1 -
 .../james/jdkim/canon/AbstractOutputStreamTestCase.java       | 2 --
 .../apache/james/jdkim/canon/CompoundOutputStreamTest.java    | 1 -
 8 files changed, 4 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-jdkim/blob/edd78234/mailets/src/main/java/org/apache/james/jdkim/mailets/DKIMSign.java
----------------------------------------------------------------------
diff --git a/mailets/src/main/java/org/apache/james/jdkim/mailets/DKIMSign.java b/mailets/src/main/java/org/apache/james/jdkim/mailets/DKIMSign.java
index e1030a0..c71d754 100644
--- a/mailets/src/main/java/org/apache/james/jdkim/mailets/DKIMSign.java
+++ b/mailets/src/main/java/org/apache/james/jdkim/mailets/DKIMSign.java
@@ -27,7 +27,6 @@ import java.security.NoSuchAlgorithmException;
 import java.security.PrivateKey;
 import java.security.spec.InvalidKeySpecException;
 import java.util.Enumeration;
-import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 
@@ -152,7 +151,6 @@ public class DKIMSign extends GenericMailet {
 
     }
 
-    @SuppressWarnings("unchecked")
     private void prependHeader(MimeMessage message, String signatureHeader)
             throws MessagingException {
         List<String> prevHeader = new LinkedList<String>();

http://git-wip-us.apache.org/repos/asf/james-jdkim/blob/edd78234/mailets/src/main/java/org/apache/james/jdkim/mailets/MimeMessageHeaders.java
----------------------------------------------------------------------
diff --git a/mailets/src/main/java/org/apache/james/jdkim/mailets/MimeMessageHeaders.java
b/mailets/src/main/java/org/apache/james/jdkim/mailets/MimeMessageHeaders.java
index 88660f5..5b70968 100644
--- a/mailets/src/main/java/org/apache/james/jdkim/mailets/MimeMessageHeaders.java
+++ b/mailets/src/main/java/org/apache/james/jdkim/mailets/MimeMessageHeaders.java
@@ -38,7 +38,6 @@ final class MimeMessageHeaders implements Headers {
     private final Map<String, List<String>> headers;
     private final List<String> fields;
 
-    @SuppressWarnings("unchecked")
     public MimeMessageHeaders(MimeMessage message)
             throws MessagingException {
         headers = new HashMap<String, List<String>>();

http://git-wip-us.apache.org/repos/asf/james-jdkim/blob/edd78234/main/src/main/java/org/apache/james/jdkim/canon/CompoundOutputStream.java
----------------------------------------------------------------------
diff --git a/main/src/main/java/org/apache/james/jdkim/canon/CompoundOutputStream.java b/main/src/main/java/org/apache/james/jdkim/canon/CompoundOutputStream.java
index 40d91aa..5c02384 100644
--- a/main/src/main/java/org/apache/james/jdkim/canon/CompoundOutputStream.java
+++ b/main/src/main/java/org/apache/james/jdkim/canon/CompoundOutputStream.java
@@ -21,7 +21,6 @@ package org.apache.james.jdkim.canon;
 
 import java.io.IOException;
 import java.io.OutputStream;
-import java.util.Iterator;
 import java.util.List;
 
 public class CompoundOutputStream extends OutputStream {

http://git-wip-us.apache.org/repos/asf/james-jdkim/blob/edd78234/main/src/main/java/org/apache/james/jdkim/impl/BodyHasherImpl.java
----------------------------------------------------------------------
diff --git a/main/src/main/java/org/apache/james/jdkim/impl/BodyHasherImpl.java b/main/src/main/java/org/apache/james/jdkim/impl/BodyHasherImpl.java
index 2166438..ef8577d 100644
--- a/main/src/main/java/org/apache/james/jdkim/impl/BodyHasherImpl.java
+++ b/main/src/main/java/org/apache/james/jdkim/impl/BodyHasherImpl.java
@@ -80,7 +80,7 @@ public class BodyHasherImpl implements BodyHasher {
         setOutputStream(out);
     }
 
-    static OutputStream prepareCanonicalizerOutputStream(int limit,
+    private OutputStream prepareCanonicalizerOutputStream(int limit,
             boolean relaxedBody, OutputStream dout) {
         OutputStream out = dout;
         if (limit != -1)

http://git-wip-us.apache.org/repos/asf/james-jdkim/blob/edd78234/main/src/main/java/org/apache/james/jdkim/impl/DNSPublicKeyRecordRetriever.java
----------------------------------------------------------------------
diff --git a/main/src/main/java/org/apache/james/jdkim/impl/DNSPublicKeyRecordRetriever.java
b/main/src/main/java/org/apache/james/jdkim/impl/DNSPublicKeyRecordRetriever.java
index b52f8c3..27e668e 100644
--- a/main/src/main/java/org/apache/james/jdkim/impl/DNSPublicKeyRecordRetriever.java
+++ b/main/src/main/java/org/apache/james/jdkim/impl/DNSPublicKeyRecordRetriever.java
@@ -19,6 +19,9 @@
 
 package org.apache.james.jdkim.impl;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.james.jdkim.api.PublicKeyRecordRetriever;
 import org.apache.james.jdkim.exceptions.PermFailException;
 import org.apache.james.jdkim.exceptions.TempFailException;
@@ -29,10 +32,6 @@ import org.xbill.DNS.TXTRecord;
 import org.xbill.DNS.TextParseException;
 import org.xbill.DNS.Type;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
 public class DNSPublicKeyRecordRetriever implements PublicKeyRecordRetriever {
 
     // The resolver used for the lookup

http://git-wip-us.apache.org/repos/asf/james-jdkim/blob/edd78234/main/src/main/java/org/apache/james/jdkim/tagvalue/TagValue.java
----------------------------------------------------------------------
diff --git a/main/src/main/java/org/apache/james/jdkim/tagvalue/TagValue.java b/main/src/main/java/org/apache/james/jdkim/tagvalue/TagValue.java
index 6d892ec..946c1d1 100644
--- a/main/src/main/java/org/apache/james/jdkim/tagvalue/TagValue.java
+++ b/main/src/main/java/org/apache/james/jdkim/tagvalue/TagValue.java
@@ -22,7 +22,6 @@ package org.apache.james.jdkim.tagvalue;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;

http://git-wip-us.apache.org/repos/asf/james-jdkim/blob/edd78234/main/src/test/java/org/apache/james/jdkim/canon/AbstractOutputStreamTestCase.java
----------------------------------------------------------------------
diff --git a/main/src/test/java/org/apache/james/jdkim/canon/AbstractOutputStreamTestCase.java
b/main/src/test/java/org/apache/james/jdkim/canon/AbstractOutputStreamTestCase.java
index 291db2a..576a4c3 100644
--- a/main/src/test/java/org/apache/james/jdkim/canon/AbstractOutputStreamTestCase.java
+++ b/main/src/test/java/org/apache/james/jdkim/canon/AbstractOutputStreamTestCase.java
@@ -43,7 +43,6 @@ public abstract class AbstractOutputStreamTestCase extends TestCase {
         byte[] buffer = new byte[307];
         int read;
         int chunksCounter = 0; // 
-        int bytesCounter = 0; // 
         while ((read = is.read(buffer, 0,
                 (buffer.length / (chunksCounter % 8 + 1)))) > 0) {
             if (read == buffer.length && chunksCounter % 13 % 7 % 2 == 1) {
@@ -57,7 +56,6 @@ public abstract class AbstractOutputStreamTestCase extends TestCase {
             if (chunksCounter % 3 == 2)
                 os.flush();
             chunksCounter++;
-            bytesCounter += read;
         }
         os.close();
     }

http://git-wip-us.apache.org/repos/asf/james-jdkim/blob/edd78234/main/src/test/java/org/apache/james/jdkim/canon/CompoundOutputStreamTest.java
----------------------------------------------------------------------
diff --git a/main/src/test/java/org/apache/james/jdkim/canon/CompoundOutputStreamTest.java
b/main/src/test/java/org/apache/james/jdkim/canon/CompoundOutputStreamTest.java
index de30866..7956a35 100644
--- a/main/src/test/java/org/apache/james/jdkim/canon/CompoundOutputStreamTest.java
+++ b/main/src/test/java/org/apache/james/jdkim/canon/CompoundOutputStreamTest.java
@@ -22,7 +22,6 @@ package org.apache.james.jdkim.canon;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.security.NoSuchAlgorithmException;
-import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message