james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [16/24] james-project git commit: Silent warnings
Date Wed, 13 Sep 2017 10:57:42 GMT
Silent warnings


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

Branch: refs/heads/master
Commit: e6f7567be4e2c5cd9be335ad5367eee7076dfd83
Parents: 14a8a4f
Author: Raphael Ouazana <raphael.ouazana@linagora.com>
Authored: Wed Sep 6 11:37:47 2017 +0200
Committer: Antoine Duprat <aduprat@linagora.com>
Committed: Wed Sep 13 10:21:48 2017 +0200

----------------------------------------------------------------------
 .../apache/james/backends/cassandra/DockerCassandraRule.java   | 1 +
 .../james/mailbox/store/mail/model/ListMessageAssert.java      | 6 ++++--
 .../java/org/apache/james/transport/mailets/SMIMEDecrypt.java  | 3 ++-
 .../james/mpt/smtp/host/CassandraJamesSmtpHostSystem.java      | 1 -
 pom.xml                                                        | 1 -
 .../imap/decode/parser/SetAnnotationCommandParserTest.java     | 2 --
 .../java/org/apache/james/managesieve/core/CoreProcessor.java  | 4 ++--
 .../java/org/apache/james/transport/mailets/DSNBounceTest.java | 1 -
 .../java/org/apache/james/transport/mailets/ResendTest.java    | 1 -
 .../src/main/java/org/apache/james/jmap/model/Attachment.java  | 2 --
 10 files changed, 9 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/e6f7567b/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/DockerCassandraRule.java
----------------------------------------------------------------------
diff --git a/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/DockerCassandraRule.java
b/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/DockerCassandraRule.java
index 2579a14..303eb54 100644
--- a/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/DockerCassandraRule.java
+++ b/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/DockerCassandraRule.java
@@ -54,6 +54,7 @@ public class DockerCassandraRule implements TestRule {
     private final CreateVolumeCmd createTmpsFsCmd;
     private final RemoveVolumeCmd deleteTmpsFsCmd;
 
+    @SuppressWarnings("resource")
     public DockerCassandraRule() {
         String tmpFsName = "cassandraData" + RandomStringUtils.randomAlphabetic(10);
         client = DockerClientFactory.instance().client();

http://git-wip-us.apache.org/repos/asf/james-project/blob/e6f7567b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/ListMessageAssert.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/ListMessageAssert.java
b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/ListMessageAssert.java
index 1933858..1d1409d 100644
--- a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/ListMessageAssert.java
+++ b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/ListMessageAssert.java
@@ -20,14 +20,16 @@
 package org.apache.james.mailbox.store.mail.model;
 
 import static org.assertj.core.api.Assertions.assertThat;
+
 import java.io.IOException;
+import java.nio.charset.StandardCharsets;
 import java.util.Date;
 import java.util.List;
 
+import org.apache.commons.io.IOUtils;
 import org.apache.james.mailbox.MessageUid;
 import org.apache.james.mailbox.model.MailboxId;
 import org.apache.james.mailbox.model.MessageId;
-import org.apache.commons.io.IOUtils;
 
 import com.github.steveash.guavate.Guavate;
 import com.google.common.base.Objects;
@@ -46,7 +48,7 @@ public class ListMessageAssert {
     private InnerMessage getInnerMessage(MailboxMessage message) {
         try {
             return new InnerMessage(message.getMessageId(), message.getUid(), message.getMailboxId(),
message.getInternalDate(), message.getBodyOctets(),
-                    message.getFullContentOctets(), message.getMediaType(), message.getSubType(),
IOUtils.toString(message.getFullContent()));
+                    message.getFullContentOctets(), message.getMediaType(), message.getSubType(),
IOUtils.toString(message.getFullContent(), StandardCharsets.UTF_8));
         } catch (IOException e) {
             Throwables.propagate(e);
             return null;

http://git-wip-us.apache.org/repos/asf/james-project/blob/e6f7567b/mailet/crypto/src/main/java/org/apache/james/transport/mailets/SMIMEDecrypt.java
----------------------------------------------------------------------
diff --git a/mailet/crypto/src/main/java/org/apache/james/transport/mailets/SMIMEDecrypt.java
b/mailet/crypto/src/main/java/org/apache/james/transport/mailets/SMIMEDecrypt.java
index cfa1062..d7e519c 100644
--- a/mailet/crypto/src/main/java/org/apache/james/transport/mailets/SMIMEDecrypt.java
+++ b/mailet/crypto/src/main/java/org/apache/james/transport/mailets/SMIMEDecrypt.java
@@ -22,6 +22,7 @@
 package org.apache.james.transport.mailets;
 
 import java.io.IOException;
+import java.nio.charset.StandardCharsets;
 import java.security.GeneralSecurityException;
 import java.security.cert.CertificateEncodingException;
 import java.security.cert.X509Certificate;
@@ -178,6 +179,6 @@ public class SMIMEDecrypt extends GenericMailet {
     }
 
     private String text(Part mimePart) throws IOException, MessagingException {
-        return IOUtils.toString(mimePart.getDataHandler().getInputStream());
+        return IOUtils.toString(mimePart.getDataHandler().getInputStream(), StandardCharsets.UTF_8);
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/e6f7567b/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/host/CassandraJamesSmtpHostSystem.java
----------------------------------------------------------------------
diff --git a/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/host/CassandraJamesSmtpHostSystem.java
b/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/host/CassandraJamesSmtpHostSystem.java
index 4909779..97a5f55 100644
--- a/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/host/CassandraJamesSmtpHostSystem.java
+++ b/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/host/CassandraJamesSmtpHostSystem.java
@@ -29,7 +29,6 @@ import org.apache.james.dnsservice.api.InMemoryDNSService;
 import org.apache.james.mailbox.elasticsearch.MailboxElasticsearchConstants;
 import org.apache.james.modules.CassandraJmapServerModule;
 import org.apache.james.modules.protocols.ProtocolHandlerModule;
-import org.apache.james.modules.protocols.SMTPServerModule;
 import org.apache.james.mpt.monitor.SystemLoggingMonitor;
 import org.apache.james.mpt.session.ExternalSessionFactory;
 import org.apache.james.mpt.smtp.SmtpHostSystem;

http://git-wip-us.apache.org/repos/asf/james-project/blob/e6f7567b/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index cc7b4da..b136d64 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2700,7 +2700,6 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-enforcer-plugin</artifactId>
-                <version>1.4.1</version>
                 <executions>
                     <execution>
                         <id>enforce-maven</id>

http://git-wip-us.apache.org/repos/asf/james-project/blob/e6f7567b/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/SetAnnotationCommandParserTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/SetAnnotationCommandParserTest.java
b/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/SetAnnotationCommandParserTest.java
index 3b46532..67d91e9 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/SetAnnotationCommandParserTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/SetAnnotationCommandParserTest.java
@@ -20,8 +20,6 @@
 package org.apache.james.imap.decode.parser;
 
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.guava.api.Assertions.assertThat;
-
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.InputStream;

http://git-wip-us.apache.org/repos/asf/james-project/blob/e6f7567b/protocols/managesieve/src/main/java/org/apache/james/managesieve/core/CoreProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/managesieve/src/main/java/org/apache/james/managesieve/core/CoreProcessor.java
b/protocols/managesieve/src/main/java/org/apache/james/managesieve/core/CoreProcessor.java
index 9c06e4d..302efe8 100644
--- a/protocols/managesieve/src/main/java/org/apache/james/managesieve/core/CoreProcessor.java
+++ b/protocols/managesieve/src/main/java/org/apache/james/managesieve/core/CoreProcessor.java
@@ -21,6 +21,7 @@
 package org.apache.james.managesieve.core;
 
 import java.io.IOException;
+import java.nio.charset.StandardCharsets;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
@@ -133,11 +134,10 @@ public class CoreProcessor implements CoreCommands {
     }
 
     @Override
-
     public String getScript(final Session session, final String name) {
         return handleCommandExecution(() -> {
             authenticationCheck(session);
-            String scriptContent = IOUtils.toString(sieveRepository.getScript(session.getUser(),
name));
+            String scriptContent = IOUtils.toString(sieveRepository.getScript(session.getUser(),
name), StandardCharsets.UTF_8);
             return "{" + scriptContent.length() + "}" + "\r\n" + scriptContent + "\r\nOK";
         }, session);
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/e6f7567b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/DSNBounceTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/DSNBounceTest.java
b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/DSNBounceTest.java
index 280b3e6..b46f490 100644
--- a/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/DSNBounceTest.java
+++ b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/DSNBounceTest.java
@@ -21,7 +21,6 @@
 package org.apache.james.transport.mailets;
 
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.guava.api.Assertions.assertThat;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/e6f7567b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/ResendTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/ResendTest.java
b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/ResendTest.java
index aae7a06..103e546 100644
--- a/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/ResendTest.java
+++ b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/ResendTest.java
@@ -20,7 +20,6 @@
 package org.apache.james.transport.mailets;
 
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.guava.api.Assertions.assertThat;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/e6f7567b/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/Attachment.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/Attachment.java
b/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/Attachment.java
index 304acbe..49081a4 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/Attachment.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/Attachment.java
@@ -21,8 +21,6 @@ package org.apache.james.jmap.model;
 
 import java.util.Optional;
 
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
 import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
 import com.google.common.annotations.VisibleForTesting;


---------------------------------------------------------------------
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