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

SerialTesters Use Of SimpleDateFormat Breaks When Default Locale Not US #206

Closed
njacobs5074 opened this issue Oct 4, 2014 · 4 comments
Closed

Comments

@njacobs5074
Copy link

Under JDK 1.7.0_05 on Mac OS X (10.9.5), org.springframework.data.neo4j.repository.SerialTesters#createUpgraderTeam gives the following error when default locale is not US:

java.lang.RuntimeException: Could not parse date ...
    at org.springframework.data.neo4j.repository.SerialTesters.createUpgraderTeam(SerialTesters.java:74)
    at org.springframework.data.neo4j.repository.SerializableEntityRepositoryTests.setUp(SerializableEntityRepositoryTests.java:90)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
    at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
    at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
    at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:233)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:87)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
    at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:176)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

On my machine and account, Locale.getDefault() returns fr_FR.

By changing the construction of the java.text.SimpleDateFormat in org.springframework.data.neo4j.repository.SerialTesters (constructor) to explicitly use Locale.US, the tests pass.

Meta-comment: I'm a GIT newbie - what's the process for getting this fixed? Thanks!

@jexp
Copy link
Contributor

jexp commented Oct 4, 2014

You fork this repository, fix the test, push the change to your GitHub repository and issue a "pull request" there is a little green icon at the top with two arrows after you pushed your commit to your repo.

@njacobs5074
Copy link
Author

Hi Michael,

Got it. Will notify you after I issue pull request.

Thanks,

Nick

---- Michael Hunger a écrit ----

You fork this repository, fix the test, push the change to your GitHub repository and issue a "pull request" there is a little green icon at the top with two arrows after you pushed your commit to your repo.


Reply to this email directly or view it on GitHub.

{"@context":"http://schema.org","@type":"EmailMessage","description":"View this Issue on GitHub","action":{"@type":"ViewAction","url":"https://github.com/spring-projects/spring-data-neo4j/issues/206#issuecomment-57921861","name":"View Issue"}}

@njacobs5074
Copy link
Author

Done.

@jexp
Copy link
Contributor

jexp commented Oct 5, 2014

Thanks a lot !

@jexp jexp closed this as completed Oct 5, 2014
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

No branches or pull requests

2 participants