james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From matth...@apache.org
Subject [09/15] james-project git commit: JAMES-2408 AliasName constructor should be protected
Date Wed, 06 Jun 2018 07:01:03 GMT
JAMES-2408 AliasName constructor should be protected


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

Branch: refs/heads/master
Commit: f41382e934bed874d17d42beabed61c206d69e67
Parents: 92829a2
Author: benwa <btellier@linagora.com>
Authored: Tue Jun 5 11:16:34 2018 +0700
Committer: Matthieu Baechler <matthieu@apache.org>
Committed: Wed Jun 6 08:58:57 2018 +0200

----------------------------------------------------------------------
 .../java/org/apache/james/backends/es/AliasName.java   |  2 +-
 .../james/backends/es/IndexCreationFactoryTest.java    |  2 +-
 .../james/backends/es/NodeMappingFactoryTest.java      |  2 +-
 .../james/backends/es/search/ScrollIterableTest.java   |  3 ++-
 .../mailbox/ElasticSearchConfigurationTest.java        | 13 ++++++-------
 5 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/f41382e9/backends-common/elasticsearch/src/main/java/org/apache/james/backends/es/AliasName.java
----------------------------------------------------------------------
diff --git a/backends-common/elasticsearch/src/main/java/org/apache/james/backends/es/AliasName.java
b/backends-common/elasticsearch/src/main/java/org/apache/james/backends/es/AliasName.java
index 80e934a..3f1438d 100644
--- a/backends-common/elasticsearch/src/main/java/org/apache/james/backends/es/AliasName.java
+++ b/backends-common/elasticsearch/src/main/java/org/apache/james/backends/es/AliasName.java
@@ -24,7 +24,7 @@ import java.util.Objects;
 public class AliasName {
     private final String value;
 
-    public AliasName(String value) {
+    protected AliasName(String value) {
         this.value = value;
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/f41382e9/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/IndexCreationFactoryTest.java
----------------------------------------------------------------------
diff --git a/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/IndexCreationFactoryTest.java
b/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/IndexCreationFactoryTest.java
index e0b3271..012914e 100644
--- a/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/IndexCreationFactoryTest.java
+++ b/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/IndexCreationFactoryTest.java
@@ -30,7 +30,7 @@ import org.junit.rules.TemporaryFolder;
 
 public class IndexCreationFactoryTest {
     public static final IndexName INDEX_NAME = new IndexName("index");
-    public static final AliasName ALIAS_NAME = new AliasName("alias");
+    public static final ReadAliasName ALIAS_NAME = new ReadAliasName("alias");
 
     private TemporaryFolder temporaryFolder = new TemporaryFolder();
     private EmbeddedElasticSearch embeddedElasticSearch = new EmbeddedElasticSearch(temporaryFolder,
INDEX_NAME);

http://git-wip-us.apache.org/repos/asf/james-project/blob/f41382e9/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/NodeMappingFactoryTest.java
----------------------------------------------------------------------
diff --git a/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/NodeMappingFactoryTest.java
b/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/NodeMappingFactoryTest.java
index da93d0e..d6920af 100644
--- a/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/NodeMappingFactoryTest.java
+++ b/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/NodeMappingFactoryTest.java
@@ -32,7 +32,7 @@ import org.junit.rules.TemporaryFolder;
 public class NodeMappingFactoryTest {
     public static final String MESSAGE = "message";
     public static final IndexName INDEX_NAME = new IndexName("index");
-    public static final AliasName ALIAS_NAME = new AliasName("alias");
+    public static final ReadAliasName ALIAS_NAME = new ReadAliasName("alias");
     public static final TypeName TYPE_NAME = new TypeName("type");
 
     private TemporaryFolder temporaryFolder = new TemporaryFolder();

http://git-wip-us.apache.org/repos/asf/james-project/blob/f41382e9/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/search/ScrollIterableTest.java
----------------------------------------------------------------------
diff --git a/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/search/ScrollIterableTest.java
b/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/search/ScrollIterableTest.java
index f23a059..cd99e90 100644
--- a/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/search/ScrollIterableTest.java
+++ b/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/search/ScrollIterableTest.java
@@ -34,6 +34,7 @@ import org.apache.james.backends.es.EmbeddedElasticSearch;
 import org.apache.james.backends.es.IndexCreationFactory;
 import org.apache.james.backends.es.IndexName;
 import org.apache.james.backends.es.NodeMappingFactory;
+import org.apache.james.backends.es.ReadAliasName;
 import org.apache.james.backends.es.TypeName;
 import org.apache.james.backends.es.utils.TestingClientProvider;
 import org.elasticsearch.action.search.SearchRequestBuilder;
@@ -53,7 +54,7 @@ public class ScrollIterableTest {
     public static final int SIZE = 2;
     public static final String MESSAGE = "message";
     public static final IndexName INDEX_NAME = new IndexName("index");
-    public static final AliasName ALIAS_NAME = new AliasName("alias");
+    public static final ReadAliasName ALIAS_NAME = new ReadAliasName("alias");
     public static final TypeName TYPE_NAME = new TypeName("messages");
 
     private TemporaryFolder temporaryFolder = new TemporaryFolder();

http://git-wip-us.apache.org/repos/asf/james-project/blob/f41382e9/server/container/guice/cassandra-guice/src/test/java/org/apache/james/modules/mailbox/ElasticSearchConfigurationTest.java
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/modules/mailbox/ElasticSearchConfigurationTest.java
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/modules/mailbox/ElasticSearchConfigurationTest.java
index bcaae13..dd03104 100644
--- a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/modules/mailbox/ElasticSearchConfigurationTest.java
+++ b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/modules/mailbox/ElasticSearchConfigurationTest.java
@@ -26,7 +26,6 @@ import java.util.Optional;
 
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.PropertiesConfiguration;
-import org.apache.james.backends.es.AliasName;
 import org.apache.james.backends.es.IndexName;
 import org.apache.james.backends.es.ReadAliasName;
 import org.apache.james.backends.es.WriteAliasName;
@@ -197,7 +196,7 @@ public class ElasticSearchConfigurationTest {
         ElasticSearchConfiguration elasticSearchConfiguration = ElasticSearchConfiguration.fromProperties(configuration);
 
         assertThat(elasticSearchConfiguration.getReadAliasMailboxName())
-            .isEqualTo(new AliasName(name));
+            .isEqualTo(new ReadAliasName(name));
     }
 
     @Test
@@ -210,7 +209,7 @@ public class ElasticSearchConfigurationTest {
         ElasticSearchConfiguration elasticSearchConfiguration = ElasticSearchConfiguration.fromProperties(configuration);
 
         assertThat(elasticSearchConfiguration.getReadAliasMailboxName())
-            .isEqualTo(new AliasName(name));
+            .isEqualTo(new ReadAliasName(name));
     }
 
     @Test
@@ -224,7 +223,7 @@ public class ElasticSearchConfigurationTest {
         ElasticSearchConfiguration elasticSearchConfiguration = ElasticSearchConfiguration.fromProperties(configuration);
 
         assertThat(elasticSearchConfiguration.getReadAliasMailboxName())
-            .isEqualTo(new AliasName(name));
+            .isEqualTo(new ReadAliasName(name));
     }
 
     @Test
@@ -248,7 +247,7 @@ public class ElasticSearchConfigurationTest {
         ElasticSearchConfiguration elasticSearchConfiguration = ElasticSearchConfiguration.fromProperties(configuration);
 
         assertThat(elasticSearchConfiguration.getWriteAliasMailboxName())
-            .isEqualTo(new AliasName(name));
+            .isEqualTo(new WriteAliasName(name));
     }
 
     @Test
@@ -261,7 +260,7 @@ public class ElasticSearchConfigurationTest {
         ElasticSearchConfiguration elasticSearchConfiguration = ElasticSearchConfiguration.fromProperties(configuration);
 
         assertThat(elasticSearchConfiguration.getWriteAliasMailboxName())
-            .isEqualTo(new AliasName(name));
+            .isEqualTo(new WriteAliasName(name));
     }
 
     @Test
@@ -275,7 +274,7 @@ public class ElasticSearchConfigurationTest {
         ElasticSearchConfiguration elasticSearchConfiguration = ElasticSearchConfiguration.fromProperties(configuration);
 
         assertThat(elasticSearchConfiguration.getWriteAliasMailboxName())
-            .isEqualTo(new AliasName(name));
+            .isEqualTo(new WriteAliasName(name));
     }
 
     @Test


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