Java 17 features (A-G) (#15516)
- add missing @override - Java style array syntax - remove redundant modifiers - always move String constants to left side in comparisons - simplify lambda expressions and return statements - use replace instead of replaceAll w/o regex - instanceof matching and multiline strings Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -201,10 +201,10 @@ public class EcowattHandler extends BaseThingHandler {
|
||||
// Invalidate the cache to be sure the next request will trigger the API
|
||||
cachedApiResponse.invalidateValue();
|
||||
|
||||
if (retryIfApiLimitReached && exception instanceof EcowattApiLimitException
|
||||
&& ((EcowattApiLimitException) exception).getRetryAfter() > 0) {
|
||||
if (retryIfApiLimitReached && exception instanceof EcowattApiLimitException limitException
|
||||
&& limitException.getRetryAfter() > 0) {
|
||||
// Will retry when the API is available again (just after the limit expired)
|
||||
retryDelay = ((EcowattApiLimitException) exception).getRetryAfter();
|
||||
retryDelay = limitException.getRetryAfter();
|
||||
}
|
||||
} else {
|
||||
updateStatus(ThingStatus.ONLINE);
|
||||
|
||||
Reference in New Issue
Block a user