Remove unnecessary throws declaration in tests

See gh-26441
This commit is contained in:
weixsun
2021-05-13 00:22:53 +08:00
committed by Stephane Nicoll
parent 574655dc84
commit 8a2be288a3
129 changed files with 345 additions and 369 deletions

View File

@@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException
class ConfigurationMetadataRepositoryJsonBuilderTests extends AbstractConfigurationMetadataTests {
@Test
void nullResource() throws IOException {
void nullResource() {
assertThatIllegalArgumentException()
.isThrownBy(() -> ConfigurationMetadataRepositoryJsonBuilder.create().withJsonResource(null));
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -46,7 +46,7 @@ class JsonReaderTests extends AbstractConfigurationMetadataTests {
}
@Test
void invalidMetadata() throws IOException {
void invalidMetadata() {
assertThatIllegalStateException().isThrownBy(() -> readFor("invalid")).withCauseInstanceOf(JSONException.class);
}