Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
* Remove redundant throws clause from CachingHealthCheck#check
* Suppress unused method warning in StandardExceptionMappersTest

Closes #549
Closes #550
  • Loading branch information
sleberknight committed Oct 17, 2024
1 parent 284e7d8 commit 3814810
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public static CachingHealthCheck register(HealthCheckRegistry registry,
* Otherwise, return the last Result.
*/
@Override
protected Result check() throws Exception {
protected Result check() {
var nowEpochMillis = kiwiEnvironment.currentTimeMillis();
var lastResult = lastResultReference.get();
var millisSinceLastCheck = nowEpochMillis - lastResult.epochMillis();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public static class SupportedCustomServerFactory implements ServerFactory {
boolean registerDefaultExceptionMappersCalled;
boolean argumentHadCorrectValue;

@SuppressWarnings("unused") // this is called via reflection
public void setRegisterDefaultExceptionMappers(Boolean registerDefaultExceptionMappers) {
registerDefaultExceptionMappersCalled = true;
argumentHadCorrectValue = nonNull(registerDefaultExceptionMappers) && !registerDefaultExceptionMappers;
Expand Down

0 comments on commit 3814810

Please sign in to comment.