james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [1/4] james-project git commit: Checkstyle and Eclipse warnings fixes
Date Tue, 05 Jun 2018 02:08:01 GMT
Repository: james-project
Updated Branches:
  refs/heads/master a880399ab -> 8b422da32


Checkstyle and Eclipse warnings fixes


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

Branch: refs/heads/master
Commit: b61e889ef0c45876790fcea48180f475343fb61c
Parents: a880399
Author: Raphael Ouazana <raphael.ouazana@linagora.com>
Authored: Fri Jun 1 14:45:47 2018 +0200
Committer: Raphael Ouazana <raphael.ouazana@linagora.com>
Committed: Fri Jun 1 14:45:47 2018 +0200

----------------------------------------------------------------------
 .../james/mailbox/cassandra/mail/CassandraMailboxMapperTest.java  | 2 --
 .../james/mailbox/elasticsearch/json/IndexableMessageTest.java    | 1 -
 .../java/org/apache/james/mailbox/tika/CachingTextExtractor.java  | 2 +-
 .../apache/james/modules/mailbox/TikaConfigurationReaderTest.java | 2 +-
 .../org/apache/james/webadmin/utils/ParametersExtractorTest.java  | 2 +-
 .../james/webadmin/routes/ScanningQuotaSearchExtension.java       | 3 ++-
 6 files changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/b61e889e/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxMapperTest.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxMapperTest.java
b/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxMapperTest.java
index a9c392c..1f502ce 100644
--- a/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxMapperTest.java
+++ b/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxMapperTest.java
@@ -53,8 +53,6 @@ public class CassandraMailboxMapperTest {
     private static final Mailbox MAILBOX = new SimpleMailbox(MAILBOX_PATH, UID_VALIDITY,
MAILBOX_ID);
 
     private static final CassandraId MAILBOX_ID_2 = CassandraId.timeBased();
-    private static final MailboxPath MAILBOX_PATH_2 = MailboxPath.forUser(USER, "name2");
-    private static final Mailbox MAILBOX_2 = new SimpleMailbox(MAILBOX_PATH_2, UID_VALIDITY,
MAILBOX_ID_2);
 
 
     private static final Mailbox MAILBOX_BIS = new SimpleMailbox(MAILBOX_PATH, UID_VALIDITY,
MAILBOX_ID_2);

http://git-wip-us.apache.org/repos/asf/james-project/blob/b61e889e/mailbox/elasticsearch/src/test/java/org/apache/james/mailbox/elasticsearch/json/IndexableMessageTest.java
----------------------------------------------------------------------
diff --git a/mailbox/elasticsearch/src/test/java/org/apache/james/mailbox/elasticsearch/json/IndexableMessageTest.java
b/mailbox/elasticsearch/src/test/java/org/apache/james/mailbox/elasticsearch/json/IndexableMessageTest.java
index 2f4501b..5be57f5 100644
--- a/mailbox/elasticsearch/src/test/java/org/apache/james/mailbox/elasticsearch/json/IndexableMessageTest.java
+++ b/mailbox/elasticsearch/src/test/java/org/apache/james/mailbox/elasticsearch/json/IndexableMessageTest.java
@@ -439,7 +439,6 @@ public class IndexableMessageTest {
         assertThat(indexableMessage.getAttachments()).isNotEmpty();
     }
 
-    @SuppressWarnings("unchecked")
     @Test
     public void otherAttachmentsShouldBeenIndexedWhenOneOfThemCannotBeParsed() throws Exception
{
         //Given

http://git-wip-us.apache.org/repos/asf/james-project/blob/b61e889e/mailbox/tika/src/main/java/org/apache/james/mailbox/tika/CachingTextExtractor.java
----------------------------------------------------------------------
diff --git a/mailbox/tika/src/main/java/org/apache/james/mailbox/tika/CachingTextExtractor.java
b/mailbox/tika/src/main/java/org/apache/james/mailbox/tika/CachingTextExtractor.java
index c06128f..3db1ad9 100644
--- a/mailbox/tika/src/main/java/org/apache/james/mailbox/tika/CachingTextExtractor.java
+++ b/mailbox/tika/src/main/java/org/apache/james/mailbox/tika/CachingTextExtractor.java
@@ -58,7 +58,7 @@ public class CachingTextExtractor implements TextExtractor {
                 .map(this::computeWeight)
                 .ifPresent(weightMetric::remove);
 
-        this.cache = CacheBuilder.<String, String>newBuilder()
+        this.cache = CacheBuilder.newBuilder()
             .expireAfterAccess(cacheEvictionPeriod.toMillis(), TimeUnit.MILLISECONDS)
             .maximumWeight(cacheWeightInBytes)
             .weigher(weigher)

http://git-wip-us.apache.org/repos/asf/james-project/blob/b61e889e/server/container/guice/cassandra-guice/src/test/java/org/apache/james/modules/mailbox/TikaConfigurationReaderTest.java
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/modules/mailbox/TikaConfigurationReaderTest.java
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/modules/mailbox/TikaConfigurationReaderTest.java
index c66df2d..14ae536 100644
--- a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/modules/mailbox/TikaConfigurationReaderTest.java
+++ b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/modules/mailbox/TikaConfigurationReaderTest.java
@@ -47,7 +47,7 @@ public class TikaConfigurationReaderTest {
                     .port(889)
                     .timeoutInMillis(500)
                     .cacheDisabled()
-                    .cacheWeightInBytes(100L * 1024L *1024L)
+                    .cacheWeightInBytes(100L * 1024L * 1024L)
                     .cacheEvictionPeriod(Duration.ofDays(1))
                     .build());
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/b61e889e/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/utils/ParametersExtractorTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/utils/ParametersExtractorTest.java
b/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/utils/ParametersExtractorTest.java
index 000fcbf..039bd52 100644
--- a/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/utils/ParametersExtractorTest.java
+++ b/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/utils/ParametersExtractorTest.java
@@ -104,7 +104,7 @@ public class ParametersExtractorTest {
         when(request.queryParams("offset"))
             .thenReturn("");
 
-        Offset offset= ParametersExtractor.extractOffset(request);
+        Offset offset = ParametersExtractor.extractOffset(request);
 
         assertThat(offset).isEqualTo(Offset.none());
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/b61e889e/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/ScanningQuotaSearchExtension.java
----------------------------------------------------------------------
diff --git a/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/ScanningQuotaSearchExtension.java
b/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/ScanningQuotaSearchExtension.java
index 9a2a80a..8f1d71c 100644
--- a/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/ScanningQuotaSearchExtension.java
+++ b/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/ScanningQuotaSearchExtension.java
@@ -46,12 +46,13 @@ import com.google.common.collect.ImmutableList;
 import com.jayway.restassured.specification.RequestSpecification;
 
 public class ScanningQuotaSearchExtension implements ParameterResolver, BeforeEachCallback,
AfterEachCallback {
-    private static final Runnable NO_AWAIT = () -> {};
+    private static final Runnable NO_AWAIT = () -> { };
 
     private final List<Function<QuotaSearchTestSystem, Routes>> routesGenerators;
     private WebAdminQuotaSearchTestSystem restQuotaSearchTestSystem;
     private QuotaSearchTestSystem quotaSearchTestSystem;
 
+    @SafeVarargs
     public ScanningQuotaSearchExtension(Function<QuotaSearchTestSystem, Routes>...
routesGenerators) {
         this.routesGenerators = ImmutableList.copyOf(routesGenerators);
     }


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