Skip to content

Commit

Permalink
🐛 Fix NPE in the CitcuitBreakerRetryPolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
TAKETODAY committed Nov 26, 2023
1 parent 4d861c3 commit a8b8e78
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/*
* Original Author -> Harry Yang ([email protected]) https://taketoday.cn
* Copyright © Harry Yang & 2017 - 2023 All Rights Reserved.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
* Copyright 2017 - 2023 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -31,6 +28,7 @@

/**
* @author Dave Syer
* @author <a href="https://github.com/TAKETODAY">Harry Yang</a>
* @since 4.0
*/
@SuppressWarnings("serial")
Expand Down Expand Up @@ -122,7 +120,7 @@ public RetryContext open(RetryContext parent) {
resetTimeout = this.resetTimeoutSupplier.get();
}
long openTimeout = this.openTimeout;
if (this.resetTimeoutSupplier != null) {
if (this.openTimeoutSupplier != null) {
openTimeout = this.openTimeoutSupplier.get();
}
return new CircuitBreakerRetryContext(parent, this.delegate, resetTimeout, openTimeout);
Expand Down

0 comments on commit a8b8e78

Please sign in to comment.