Skip to content

Commit a210be7

Browse files
committed
Fix spotless issue
Signed-off-by: Xue Zhou <[email protected]>
1 parent 982e29f commit a210be7

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

plugins/repository-s3/src/test/java/org/opensearch/repositories/s3/S3RepositoryTests.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,16 @@ public void testInvalidChunkBufferSizeSettings() {
8989
createS3Repo(getRepositoryMetadata(s3)).close();
9090
// buffer < 5mb should fail
9191
final Settings s4 = bufferAndChunkSettings(4, 10);
92-
final SettingsException e2 = expectThrows(
93-
SettingsException.class,
94-
() -> createS3Repo(getRepositoryMetadata(s4)).close()
95-
);
92+
final SettingsException e2 = expectThrows(SettingsException.class, () -> createS3Repo(getRepositoryMetadata(s4)).close());
9693
assertThat(e2.getCause(), Matchers.instanceOf(IllegalArgumentException.class));
9794
assertThat(e2.getCause().getMessage(), containsString("failed to parse value [4mb] for setting [buffer_size], must be >= [5mb]"));
9895
final Settings s5 = bufferAndChunkSettings(5, 6000000);
99-
final SettingsException e3 = expectThrows(
100-
SettingsException.class,
101-
() -> createS3Repo(getRepositoryMetadata(s5)).close()
102-
);
96+
final SettingsException e3 = expectThrows(SettingsException.class, () -> createS3Repo(getRepositoryMetadata(s5)).close());
10397
assertThat(e3.getCause(), Matchers.instanceOf(IllegalArgumentException.class));
104-
assertThat(e3.getCause().getMessage(), containsString("failed to parse value [6000000mb] for setting [chunk_size], must be <= [5tb]"));
98+
assertThat(
99+
e3.getCause().getMessage(),
100+
containsString("failed to parse value [6000000mb] for setting [chunk_size], must be <= [5tb]")
101+
);
105102
}
106103

107104
private Settings bufferAndChunkSettings(long buffer, long chunk) {

server/src/main/java/org/opensearch/common/settings/Setting.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ private T get(Settings settings, boolean validate) {
497497
return parsed;
498498
} catch (OpenSearchParseException ex) {
499499
throw new SettingsException(ex.getMessage(), ex);
500-
} catch (Exception ex) {
500+
} catch (Exception ex) {
501501
String err = "Failed to parse value" + (isFiltered() ? "" : " [" + value + "]") + " for setting [" + getKey() + "]";
502502
throw new SettingsException(err, ex);
503503
}

0 commit comments

Comments
 (0)