Skip to content

Commit

Permalink
chore(dependencies): Reverting Spring Boot 2.2 upgrade (#648)
Browse files Browse the repository at this point in the history
* chore(dependencies): Reverting Spring Boot 2.2 upgrade

Revert "chore(dependencies): Upgrade Spring Boot to 2.2.1 (#637)"
This reverts commit e2b1d7b

* chore(deps): Bump orca to v7.74.0.

Co-authored-by: Matt Duftler <duftler@google.com>
  • Loading branch information
Pierre Delagrave and Matt Duftler committed Jan 8, 2020
1 parent 5baaa98 commit ebbfdab
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#Mon Jun 17 22:31:26 UTC 2019
orcaVersion=7.56.1
orcaVersion=7.74.0
kotlinVersion=1.3.20
enablePublishing=false
spinnakerGradleVersion=7.0.1
mathCommonsVersion=3.6.1
keikoVersion=2.10.1
keikoVersion=3.2.0
org.gradle.parallel=true
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public <T> T loadObject(String accountName, ObjectType objectType, String object
}

try {
return deserialize(blobItem, (TypeReference<T>) objectType.getTypeReference());
return deserialize(blobItem, objectType.getTypeReference());
} catch (IOException | StorageException e) {
throw new IllegalStateException("Unable to deserialize object (key: " + objectKey + ")", e);
}
Expand Down Expand Up @@ -401,7 +401,7 @@ private String daoRoot(AzureNamedAccountCredentials credentials, String daoTypeN
return credentials.getRootFolder() + '/' + daoTypeName;
}

private <T> T deserialize(CloudBlockBlob blob, TypeReference<T> typeReference)
private <T> T deserialize(CloudBlockBlob blob, TypeReference typeReference)
throws IOException, StorageException {
String json = downloadText(blob);
return kayentaObjectMapper.readValue(json, typeReference);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public enum ObjectType {
"standalone_canary_archive",
"standalone_canary_archive.json");

@Getter final TypeReference<?> typeReference;
@Getter final TypeReference typeReference;

@Getter final String group;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ public <T> T loadObject(String accountName, ObjectType objectType, String object

try {
StorageObject storageObject = storage.objects().get(bucketName, item.getName()).execute();
return deserialize(storage, storageObject, (TypeReference<T>) objectType.getTypeReference());

return deserialize(storage, storageObject, objectType.getTypeReference());
} catch (IOException e) {
if (e instanceof HttpResponseException) {
HttpResponseException hre = (HttpResponseException) e;
Expand Down Expand Up @@ -188,7 +189,7 @@ private StorageObject resolveSingularItem(
}
}

private <T> T deserialize(Storage storage, StorageObject object, TypeReference<T> typeReference)
private <T> T deserialize(Storage storage, StorageObject object, TypeReference typeReference)
throws IOException {
ByteArrayOutputStream output = new java.io.ByteArrayOutputStream();
Storage.Objects.Get getter = storage.objects().get(object.getBucket(), object.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public <T> T loadObject(String accountName, ObjectType objectType, String object
}

try {
return kayentaObjectMapper.readValue(json, (TypeReference<T>) objectType.getTypeReference());
return kayentaObjectMapper.readValue(json, objectType.getTypeReference());
} catch (Throwable e) {
log.error("Read failed on path {}: {}", objectKey, e);
throw new IllegalStateException(e);
Expand Down Expand Up @@ -350,7 +350,7 @@ private Map<String, Object> metadataFor(ConfigBinNamedAccountCredentials credent

CanaryConfig config;
try {
config = kayentaObjectMapper.readValue(json, CanaryConfig.class);
config = kayentaObjectMapper.readValue(json, ObjectType.CANARY_CONFIG.getTypeReference());
} catch (Throwable e) {
log.error("Read failed on path {}: {}", id, e);
throw new IllegalStateException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public <T> T loadObject(String accountName, ObjectType objectType, String object
try {
S3Object s3Object = amazonS3.getObject(bucket, path);

return deserialize(s3Object, (TypeReference<T>) objectType.getTypeReference());
return deserialize(s3Object, objectType.getTypeReference());
} catch (AmazonS3Exception e) {
log.error("Failed to load {} {}: {}", objectType.getGroup(), objectKey, e.getStatusCode());
if (e.getStatusCode() == 404) {
Expand Down Expand Up @@ -164,7 +164,7 @@ private String resolveSingularPath(
}
}

private <T> T deserialize(S3Object s3Object, TypeReference<T> typeReference) throws IOException {
private <T> T deserialize(S3Object s3Object, TypeReference typeReference) throws IOException {
return objectMapper.readValue(s3Object.getObjectContent(), typeReference);
}

Expand Down

0 comments on commit ebbfdab

Please sign in to comment.