Closed hgaol closed 2 years ago
Sorry, seems all the configurations except fallbackUri
are required in admin
portal. I guess the goal for checkData
is to avoid invalid number, like -10
?
it set value, i think the logic should be to set defaults if you don't have them and configure them if you do~
it set value, i think the logic should be to set defaults if you don't have them and configure them if you do~
If like you mentioned, I think checkData
method needs to be updated. BTW, many fields like limitForPeriod
are int
or long
, which means it will always has a number. Considering 0 is also an valid config in resilience4j
for some scenarios, could I just verify the number and replace with default when it's less than 0. Like,
resilience4JHandle.setLimitForPeriod(resilience4JHandle.getLimitForPeriod() < 0 ? Constants.LIMIT_FOR_PERIOD : resilience4JHandle.getLimitForPeriod());
could I just verify the number and replace with default when it's less than 0. Like
yes , you can~
Question
You can see below codes in
Resilience4JHandle#checkData
. The question is as mentioned in title. Is it by design?BTW, if it's purpose is to use preset value as default, I can help to fix it.
Similar question, #2055 .