Skip to content

Commit

Permalink
updates to make it compilable with Java 8, encryption client to 3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
smiklosovic committed Nov 20, 2023
1 parent 2ce3458 commit eff9951
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 19 deletions.
22 changes: 11 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.instaclustr</groupId>
<artifactId>esop</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.0.0-java8-SNAPSHOT</version>

<name>instaclustr-esop</name>
<description>Backup and restoration tooling for Cassandra</description>
Expand All @@ -15,16 +15,16 @@
<instaclustr.commons.version>2.0.0-SNAPSHOT</instaclustr.commons.version>
<azure-storage.version>8.6.6</azure-storage.version>
<google-cloud-libraries.version>26.0.0</google-cloud-libraries.version>
<aws-java-sdk.version>2.20.45</aws-java-sdk.version>
<s3.encryption.client.version>3.0.0</s3.encryption.client.version>
<aws-java-sdk.version>2.20.38</aws-java-sdk.version>
<s3.encryption.client.version>3.1.0</s3.encryption.client.version>
<bouncy.castle.version>1.72</bouncy.castle.version>
<slf4j.version>1.7.30</slf4j.version>
<logback.version>1.2.3</logback.version>

<cassandra.driver.version>4.11.1</cassandra.driver.version>

<version.embedded.cassandra>4.0.1</version.embedded.cassandra>
<testng.version>7.8.0</testng.version>
<testng.version>6.14.3</testng.version>
<mockito.version>2.23.4</mockito.version>
<awaitility.version>3.1.6</awaitility.version>

Expand All @@ -48,9 +48,9 @@

<outputDirectory>${project.build.directory}</outputDirectory>

<java.version>11</java.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<java.version>8</java.version>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down Expand Up @@ -146,7 +146,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>kms</artifactId>
<version>2.20.45</version>
<version>${aws-java-sdk.version}</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -346,16 +346,16 @@
</execution>
</executions>
<configuration>
<source>11</source>
<source>8</source>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<source>11</source>
<target>11</target>
<source>8</source>
<target>8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ public String toString() {
public void validate(final Set<String> storageProviders) {
super.validate(storageProviders);

if (kmsKeyId != null && !"s3v2".equals(storageLocation.storageProvider))
throw new IllegalStateException("You can set kmsKeyId only when using s3v2 protocol");

if (this.entities == null) {
this.entities = DatabaseEntities.empty();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void coordinate(final Operation<BackupOperationRequest> operation) {
final Snapshots snapshots = Snapshots.parse(request.dataDirs, request.snapshotTag);
final Optional<Snapshot> snapshot = snapshots.get(request.snapshotTag);

if (snapshot.isEmpty()) {
if (!snapshot.isPresent()) {
throw new IllegalStateException(format("There is not any snapshot of tag %s", request.snapshotTag));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class AzureListingAndBackupRemovalTest extends BaseListingRemovalTest {

@Override
protected List<Module> getModules() {
return new ArrayList<>() {{
return new ArrayList<Module>() {{
add(new AzureModule());
}};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class GoogleListingAndBackupRemovalTest extends BaseListingRemovalTest {

@Override
protected List<Module> getModules() {
return new ArrayList<>() {{
return new ArrayList<Module>() {{
add(new GCPModule());
}};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class LocalListingAndBackupRemovalTest extends BaseListingRemovalTest {

@Override
protected List<Module> getModules() {
return new ArrayList<>() {{
return new ArrayList<Module>() {{
add(new LocalFileModule());
}};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class S3ListingAndBackupRemovalTest extends BaseListingRemovalTest {

@Override
protected List<Module> getModules() {
return new ArrayList<>() {{
return new ArrayList<Module>() {{
add(new S3Module());
}};
}
Expand Down

0 comments on commit eff9951

Please sign in to comment.