james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [1/5] james-project git commit: JAMES-2525 ImmutableMap.builder is overkill when few entries
Date Thu, 08 Nov 2018 10:58:08 GMT
Repository: james-project
Updated Branches:
  refs/heads/master 876987c80 -> d9978da2f


JAMES-2525 ImmutableMap.builder is overkill when few entries


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

Branch: refs/heads/master
Commit: aab0d130b77eac894de5a823022865bf9619ea3d
Parents: 546d63f
Author: Matthieu Baechler <matthieu@apache.org>
Authored: Wed Nov 7 17:07:34 2018 +0100
Committer: Matthieu Baechler <matthieu@apache.org>
Committed: Wed Nov 7 17:07:34 2018 +0100

----------------------------------------------------------------------
 .../objectstorage/ObjectStorageBlobsDAOProvider.java  | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/aab0d130/server/container/guice/blob-objectstorage-guice/src/main/java/org/apache/james/modules/objectstorage/ObjectStorageBlobsDAOProvider.java
----------------------------------------------------------------------
diff --git a/server/container/guice/blob-objectstorage-guice/src/main/java/org/apache/james/modules/objectstorage/ObjectStorageBlobsDAOProvider.java
b/server/container/guice/blob-objectstorage-guice/src/main/java/org/apache/james/modules/objectstorage/ObjectStorageBlobsDAOProvider.java
index 52788d6..9c31555 100644
--- a/server/container/guice/blob-objectstorage-guice/src/main/java/org/apache/james/modules/objectstorage/ObjectStorageBlobsDAOProvider.java
+++ b/server/container/guice/blob-objectstorage-guice/src/main/java/org/apache/james/modules/objectstorage/ObjectStorageBlobsDAOProvider.java
@@ -55,14 +55,12 @@ public class ObjectStorageBlobsDAOProvider implements Provider<ObjectStorageBlob
     @Inject
     public ObjectStorageBlobsDAOProvider(PropertiesProvider propertiesProvider,
                                          BlobId.Factory blobIdFactory) throws ConfigurationException
{
-        providersByName = ImmutableMap.<String, Function<ContainerName, ObjectStorageBlobsDAO>>builder()
-            .put(OBJECTSTORAGE_PROVIDER_SWIFT, this::getSwiftObjectStorageBlobsDao)
-            .build();
-        swiftAuthApiByName = ImmutableMap.<String, Function<ContainerName, ObjectStorageBlobsDAO>>builder()
-            .put(SwiftTempAuthObjectStorage.AUTH_API_NAME, this::getTempAuthBlobsDao)
-            .put(SwiftKeystone2ObjectStorage.AUTH_API_NAME, this::getKeystone2BlobsDao)
-            .put(SwiftKeystone3ObjectStorage.AUTH_API_NAME, this::getKeystone3Configuration)
-            .build();
+        //This provider map will allow to implement S3 provider
+        providersByName = ImmutableMap.of(OBJECTSTORAGE_PROVIDER_SWIFT, this::getSwiftObjectStorageBlobsDao);
+        swiftAuthApiByName = ImmutableMap.of(
+            SwiftTempAuthObjectStorage.AUTH_API_NAME, this::getTempAuthBlobsDao,
+            SwiftKeystone2ObjectStorage.AUTH_API_NAME, this::getKeystone2BlobsDao,
+            SwiftKeystone3ObjectStorage.AUTH_API_NAME, this::getKeystone3Configuration);
 
         this.blobIdFactory = blobIdFactory;
         try {


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