-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed conversion string to temporalAmount - Duration or Period #11581
Fixed conversion string to temporalAmount - Duration or Period #11581
Conversation
@altro3 can you target 4.8.x? |
I asked @altro3 to target 4.7.x as it was a bug introduced in 4.7.x. I will merge up @graemerocher |
Why |
@dstepanov @graemerocher @sdelamo I would like to clarify that there is currently a bug in the Cookie interface in the maxAge method. The argument is of the wrong type - TemporalAmount , but it should be Duration , because we are interested in the value in seconds, and Period stores the timestamp in days. From the TemporalAmount documentation: * There are two common implementations.
* {@link Period} is a date-based implementation, storing years, months and days.
* {@link Duration} is a time-based implementation, storing seconds and nanoseconds,
* but providing some access using other duration based units such as minutes,
* hours and fixed 24-hour days. I don't understand why TemporalAmount is there. |
but this should be a different pr right? |
@sdelamo as you wish - I can add this correction to this PR too. :-) . Current fix - solve the problem. I just wanted to say that it is actually not correct to use TemporalAmount in this case |
45592b0
to
e747ff3
Compare
@sdelamo added this fix here. Don't think that we need to create different PR for it |
Change CookieMaxAge type to Duration
e747ff3
to
2fd3e10
Compare
@sdelamo can't fix it here, becuse also need to change micronaut-session module for it |
Fixed #11577