GH-236: Fix `KinesisBinderHealthIndicator for newer Spring Boot
Fixes: https://github.com/spring-cloud/spring-cloud-stream-binder-aws-kinesis/issues/236 Spring Boot starting with version `3.3` has changed `Health.Builder down(Exception ex)` to `Health.Builder down(Throwable ex)`. This is compatible by compilation against that newer Spring Boot version, but not at runtime by bytecode. * Fix `KinesisBinderHealthIndicator` to use bytecode-compatible version of API We cannot upgrade to newer Spring version in current point version. And this still don't justify a new major/minor version of the Kinesis Binder
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2017-2023 the original author or authors.
|
||||
* Copyright 2017-2025 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.
|
||||
@@ -58,11 +58,11 @@ public class KinesisBinderHealthIndicator implements HealthIndicator {
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
return Health.down(ex).build();
|
||||
return Health.down().withException(ex).build();
|
||||
}
|
||||
}
|
||||
else {
|
||||
return Health.down(ex).build();
|
||||
return Health.down().withException(ex).build();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user