Skip to content

Commit

Permalink
Fixing SolverRemote NPE #533
Browse files Browse the repository at this point in the history
  • Loading branch information
mageddo committed Sep 4, 2024
1 parent 1b8cf1c commit 301df4b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
3 changes: 3 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 3.25.14
* Fixing SolverRemote NPE #533

## 3.25.13
* Unifying circuit breaker abstractions #553

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=3.25.13-snapshot
version=3.25.14-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,23 @@ public List<Stats> stats() {
}

public CircuitStatus findStatus(InetSocketAddress remoteAddress) {
return this.circuitBreakerMap.get(remoteAddress)
.findStatus();
final var circuitBreaker = this.findCircuitBreakerFromCache(remoteAddress);
if (circuitBreaker == null) {
return null;
}
return circuitBreaker.findStatus();
}

private Stats toStats(InetSocketAddress remoteAddr) {
final var circuitBreaker = this.circuitBreakerMap.get(remoteAddr);
final var circuitBreaker = this.findCircuitBreakerFromCache(remoteAddr);
final var state = circuitBreaker.findStatus().name();
return Stats.of(remoteAddr.toString(), state);
}

private CircuitBreakerDelegate findCircuitBreakerFromCache(InetSocketAddress remoteAddress) {
return this.circuitBreakerMap.get(remoteAddress);
}

@Value
public static class Stats {

Expand Down

0 comments on commit 301df4b

Please sign in to comment.