diff --git a/oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/RemoteStorageMode.java b/oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/RemoteStorageMode.java deleted file mode 100644 index 6bf6ac2cd0c..00000000000 --- a/oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/RemoteStorageMode.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.apache.jackrabbit.oak.blob.cloud.s3; - -public enum RemoteStorageMode { - S3, - GCP -} diff --git a/oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/S3Backend.java b/oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/S3Backend.java index 0ad8fd71866..d9c54332f89 100644 --- a/oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/S3Backend.java +++ b/oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/S3Backend.java @@ -495,12 +495,12 @@ public void setProperties(Properties properties) { private void setRemoteStorageMode() { String s3EndPoint = properties.getProperty(S3Constants.S3_END_POINT, ""); - if (s3EndPoint.contains("https://storage.googleapis.com")) { - properties.putIfAbsent(S3Constants.MODE, RemoteStorageMode.GCP); + if (s3EndPoint.contains("googleapis")) { + properties.put(S3Constants.MODE, RemoteStorageMode.GCP); return; } // default mode is S3 - properties.putIfAbsent(S3Constants.MODE, RemoteStorageMode.S3); + properties.put(S3Constants.MODE, RemoteStorageMode.S3); } @Override @@ -1361,4 +1361,12 @@ public KeyRenameThread(String oldKey) { this.oldKey = oldKey; } } + + /** + * Enum to indicate remote storage mode + */ + private enum RemoteStorageMode { + S3, + GCP + } }