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

fix: date parsing throws IllegalArgumentException. #414

Merged
merged 1 commit into from
Jun 28, 2016

Conversation

balamurugana
Copy link
Member

When minio-java is used in system running with different locale than
"US", date parsing fails with IllegalArgumentException. This patch
fixes the issue by setting the locale to "US" for all date formats.

Thanks to @RBoelter for reporting/debugging/providing the solution.

Fixes #411

@harshavardhana
Copy link
Member

We can add a unit test for future problems of date parsing.

@balamurugana
Copy link
Member Author

@harshavardhana I would prefer to run all unit tests with different locale like

java -Duser.country=DE -Duser.language=de io,minio.MinioClientTest

If this is not possible to run in travis, I will write one unit test specifically.

@harshavardhana
Copy link
Member

@harshavardhana I would prefer to run all unit tests with different locale like

java -Duser.country=DE -Duser.language=de io,minio.MinioClientTest
If this is not possible to run in travis, I will write one unit test specifically.

This is possible just that you have to create a gradle task with new locale.

@balamurugana
Copy link
Member Author

@harshavardhana

This is possible just that you have to create a gradle task with new locale.

Checking adding new task with specific locale for tests in gradle.

When minio-java is used in system running with different locale than
"US", date parsing fails with IllegalArgumentException.  This patch
fixes the issue by setting the locale to "US" for all date formats.

Thanks to @RBoelter for reporting/debugging/providing the solution.

Fixes minio#411
@harshavardhana harshavardhana merged commit ff1d0ae into minio:master Jun 28, 2016
@balamurugana balamurugana deleted the fix-issue-411 branch July 11, 2016 17:53
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.

Date Parsing - IllegalArgumentException: Invalid format
2 participants