-
Notifications
You must be signed in to change notification settings - Fork 25.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
Set start of the week to Monday for root locale using SPI #45384
Conversation
Introducing a IsoLocal.ROOT constant which should be used instead of java.util.Locale.ROOT in ES when dealing with dates. IsoLocal.ROOT customises start of the week to be Monday instead of Sunday. closes elastic#42588 an issue with investigation details relates elastic#41670 bug raised (this won't fix it on its own. joda.parseInto has to be reimplemented closes elastic#43275 an issue raised by community member
Pinging @elastic/es-core-infra |
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.
One question
@@ -39,6 +40,28 @@ | |||
import static org.hamcrest.Matchers.is; | |||
|
|||
public class JavaJodaTimeDuellingTests extends ESTestCase { | |||
@Override | |||
protected boolean enableWarningsCheck() { | |||
return false; |
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.
Why do we need to disable warning checks? Can't we use assertWarnings if necessary?
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.
will have a look to enable this again
distribution/src/config/jvm.options
Outdated
@@ -111,9 +111,11 @@ ${error.file} | |||
8:-XX:+UseGCLogFileRotation | |||
8:-XX:NumberOfGCLogFiles=32 | |||
8:-XX:GCLogFileSize=64m | |||
# due to CalendarDataProvider being customized to ISO standard, SPI has to be first provider to try. | |||
8:-Djava.locale.providers=SPI,JRE |
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.
Can you relocate this so it's co-located with the similar JDK 9 argument?
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.
will do
the SPI mechanism works fine for jdks 9+. However it won't work for jdk8 in the same way. Before jdk9 only classes loaded with java extension mechanism could be used as SPI for packages So for jdk8 we would have to either place the jar with the SPI class in the The JDK 9 release notes mentioning this change Release Note: Locale sensitive SPI and Input Method SPI implementations are now loaded from application's classpath The bug raised against jdk9 to fix this Support java.util.spi., java.text.spi., java.awt.im.spi loaded from classpath SPI loading in jdk8 https://github.com/bpupadhyaya/openjdk-8/blob/master/jdk/src/share/classes/sun/util/locale/provider/SPILocaleProviderAdapter.java#L80 |
closed in favour of #48349 |
Set start of the week to Monday for root locale (#43652) …
Introducing a IsoLocal.ROOT constant which should be used instead of java.util.Locale.ROOT in ES when dealing with dates. IsoLocal.ROOT customises start of the week to be Monday instead of Sunday.
closes #42588 an issue with investigation details
relates #41670 bug raised (this won't fix it on its own. joda.parseInto has to be reimplemented
closes #43275 an issue raised by community member