Skip to content

Commit

Permalink
fix#582 : Add null check for aws store info
Browse files Browse the repository at this point in the history
  • Loading branch information
sband committed May 31, 2023
1 parent 50c807f commit 37fa795
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -543,13 +543,14 @@ public static void serialize(final ResourceConfiguration config) throws SirixIOE
jsonWriter.name(JSONNAMES[15]).value(config.storeNodeHistory);
// Child count.
jsonWriter.name(JSONNAMES[16]).value(config.storeChildCount);

jsonWriter.name(JSONNAMES[17]).beginObject();
jsonWriter.name(JSONNAMES[18]).value(config.awsStoreInfo.getAwsProfile());
jsonWriter.name(JSONNAMES[19]).value(config.awsStoreInfo.getAwsRegion());
jsonWriter.name(JSONNAMES[20]).value(config.awsStoreInfo.getBucketName());
jsonWriter.name(JSONNAMES[21]).value(config.awsStoreInfo.shouldCreateBucketIfNotExists());
jsonWriter.name(JSONNAMES[17]).endObject();
if(config.awsStoreInfo != null) {
jsonWriter.name(JSONNAMES[17]).beginObject();
jsonWriter.name(JSONNAMES[18]).value(config.awsStoreInfo.getAwsProfile());
jsonWriter.name(JSONNAMES[19]).value(config.awsStoreInfo.getAwsRegion());
jsonWriter.name(JSONNAMES[20]).value(config.awsStoreInfo.getBucketName());
jsonWriter.name(JSONNAMES[21]).value(config.awsStoreInfo.shouldCreateBucketIfNotExists());
jsonWriter.name(JSONNAMES[17]).endObject();
}

jsonWriter.endObject();
} catch (final IOException e) {
Expand Down

0 comments on commit 37fa795

Please sign in to comment.