-
Notifications
You must be signed in to change notification settings - Fork 264
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
First draft of Servlet 2.5 support #182
Conversation
import java.util.Map; | ||
import java.util.Optional; | ||
import java.text.DateFormat; | ||
import java.text.SimpleDateFormat; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SimpleDateFormat?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I organized imports again. Should be gone now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, for me it is a red flag because it is not thread safe and java 8 has better alternative
@Override | ||
public void addDateHeader(final String name, final long date) { | ||
super.addDateHeader(name, date); | ||
addMultiMapHeader(name, format(date)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format
could be simplified with Instant.ofEpochMilli()
instead of new Date()
@hanfak I consulted with some colleagues about this. We took a look at the code and discussed what still would need to be done. The conclusion that we came to is that we don't see the value. It would increase the complexity of logbook disproportionately to the gained benefit. |
Fixes #172
Replaces #174
@hanfak I made your tests pass and changed the implementation from being reflection-based to two distinct implementations. Code is 100% covered, but I can't verify it reliably against servlet api 2.5 since that would require to rewrite almost all tests from the logbook-servlet module.