Skip to content
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

Reduce required JDK version for DefaultHeaders feature #1375

Closed
wants to merge 2 commits into from

Conversation

cy6erGn0m
Copy link
Contributor

@cy6erGn0m cy6erGn0m commented Sep 30, 2019

Subsystem
Server, DefaultHeaders

Motivation
Currently, DefaultHeaders feature requires JDK8 due to java.time dependency. However, the only we need is GMT time formatting.

#1369 java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/ZoneId;

Solution
Migrate to ktor's GMTDate with Calendar instantiation optimization.

@cy6erGn0m cy6erGn0m added this to the 1.3.0 milestone Sep 30, 2019
@cy6erGn0m cy6erGn0m requested a review from e5l September 30, 2019 23:03
@imanushin
Copy link

In regarding to this coroutines issue, probably it is better to avoid JDK with version lower than 1.8.


private val UTC = ZoneId.of("UTC")!! // it is very important to get it like that
private val zoneUTCRules = UTC.rules
private val clock = config.clock

private var cachedDateTimeStamp: Long = 0L
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

atomic or volatile?

@cy6erGn0m cy6erGn0m closed this Nov 21, 2019
@cy6erGn0m cy6erGn0m deleted the cy/default-headers branch November 21, 2019 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants