Skip to content

Commit

Permalink
Merge pull request #1316 from GeoWebCache/azureblob_upgrade_12.x
Browse files Browse the repository at this point in the history
Upgrade Azure Blobstore from legacy azure-sdk (11.0) to latest (12.27.1)
  • Loading branch information
petersmythe committed Sep 18, 2024
1 parent a8a18b9 commit 98f1afa
Show file tree
Hide file tree
Showing 15 changed files with 474 additions and 905 deletions.
25 changes: 22 additions & 3 deletions geowebcache/azureblob/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,26 @@
<groupId>org.geowebcache</groupId>
<artifactId>gwc-azure-blob</artifactId>

<properties>
<!-- Same sdk version as imageio-ext's cog-ragengereader-azure for GeoSever compatibility -->
<azure.version>12.27.1</azure.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<!--
Use the same netty version as imageio-ext's cog-ragengereader-s3 and cog-rangereader-azure
See https://github.com/geosolutions-it/imageio-ext/pull/312
-->
<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
<version>4.1.113.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.geowebcache</groupId>
Expand All @@ -19,10 +39,9 @@
</dependency>

<dependency>
<groupId>com.microsoft.azure</groupId>
<groupId>com.azure</groupId>
<artifactId>azure-storage-blob</artifactId>
<!-- at the time of writing 11.0.1 was available but pom on repoes was corrupted -->
<version>11.0.0</version>
<version>${azure.version}</version>
</dependency>

<dependency>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class AzureBlobStoreData {
private String accountName;
private String accountKey;
private Integer maxConnections;
private Boolean useHTTPS;
private boolean useHTTPS;
private String proxyHost;
private Integer proxyPort;
private String proxyUsername;
Expand Down Expand Up @@ -113,11 +113,11 @@ public void setMaxConnections(Integer maxConnections) {
this.maxConnections = maxConnections;
}

public Boolean isUseHTTPS() {
public boolean isUseHTTPS() {
return useHTTPS;
}

public void setUseHTTPS(Boolean useHTTPS) {
public void setUseHTTPS(boolean useHTTPS) {
this.useHTTPS = useHTTPS;
}

Expand All @@ -137,6 +137,7 @@ public void setProxyPort(Integer proxyPort) {
this.proxyPort = proxyPort;
}

/** unused */
public String getProxyUsername() {
return proxyUsername;
}
Expand All @@ -145,6 +146,7 @@ public void setProxyUsername(String proxyUsername) {
this.proxyUsername = proxyUsername;
}

/** unused */
public String getProxyPassword() {
return proxyPassword;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class AzureBlobStoreInfo extends BlobStoreInfo {

private String maxConnections;

private Boolean useHTTPS = true;
private boolean useHTTPS = true;

private String proxyHost;

Expand Down Expand Up @@ -139,7 +139,7 @@ public Boolean isUseHTTPS() {
}

/** @param useHTTPS whether to use HTTPS (true) or HTTP (false) when talking to Azure */
public void setUseHTTPS(Boolean useHTTPS) {
public void setUseHTTPS(boolean useHTTPS) {
this.useHTTPS = useHTTPS;
}

Expand Down Expand Up @@ -260,7 +260,7 @@ public int hashCode() {
result = prime * result + ((proxyPort == null) ? 0 : proxyPort.hashCode());
result = prime * result + ((proxyUsername == null) ? 0 : proxyUsername.hashCode());
result = prime * result + ((serviceURL == null) ? 0 : serviceURL.hashCode());
result = prime * result + ((useHTTPS == null) ? 0 : useHTTPS.hashCode());
result = prime * result + (useHTTPS ? 1 : 0);
return result;
}

Expand Down Expand Up @@ -300,9 +300,7 @@ public boolean equals(Object obj) {
if (serviceURL == null) {
if (other.serviceURL != null) return false;
} else if (!serviceURL.equals(other.serviceURL)) return false;
if (useHTTPS == null) {
if (other.useHTTPS != null) return false;
} else if (!useHTTPS.equals(other.useHTTPS)) return false;
if (useHTTPS != other.useHTTPS) return false;
return true;
}

Expand Down
Loading

0 comments on commit 98f1afa

Please sign in to comment.