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

RFC 850 Date-related Tests Fail under JDK9+ #15

Open
Kortanul opened this issue Dec 2, 2018 · 0 comments
Open

RFC 850 Date-related Tests Fail under JDK9+ #15

Kortanul opened this issue Dec 2, 2018 · 0 comments

Comments

@Kortanul
Copy link
Member

Kortanul commented Dec 2, 2018

Affected Versions

  • feature/fixes-for-22.x-jdk-8-builds

Build Environment

  • Ubuntu 18.04.1 LTS
  • Ubuntu Linux 4.15.0-39-generic Upgrade wrensec-guava to 18.0.5. #42-Ubuntu SMP Tue Oct 23 15:48:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.3, mixed mode)
  • Apache Maven 3.5.2

Steps to Reproduce

  1. Switch to Java 9 or 10.
  2. Check out wrensec-commons on the feature/fixes-for-22.x-jdk-8-builds branch (currently at b27bc0d).:
  3. Attempt to build the project tests with mvn clean test -DignoreArtifactSigs.

Expected Results

  • Project builds successfully.
  • Tests complete successfully.

Actual Results

The build fails in chf-http-core, with the following error:

[ERROR] Tests run: 1101, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 18.137 s <<< FAILURE! - in TestSuite
[ERROR] testParseRfc850Date(org.forgerock.http.header.HeaderUtilTest)  Time elapsed: 0.029 s  <<< FAILURE!
java.lang.NullPointerException
        at org.forgerock.http.header.HeaderUtilTest.testParseRfc850Date(HeaderUtilTest.java:151)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   HeaderUtilTest.testParseRfc850Date:151 ▒ NullPointer
[INFO]
[ERROR] Tests run: 1101, Failures: 1, Errors: 0, Skipped: 0

Additional Notes

This appears to be related to changes made for JEP 252 in Java 9 and later. If the failing tests are run through IntelliJ with -Djava.locale.providers=COMPAT,SPI passed to the JRE, the tests pass. Unfortunately, this workaround isn't a good option for us because it would mean requiring all applications that depend on Commons to modify the JVM args in order to run properly.

@Kortanul Kortanul changed the title Date-related Tests fail under JDK9+ RFC 850 Date-related Tests fail under JDK9+ Dec 2, 2018
@Kortanul Kortanul changed the title RFC 850 Date-related Tests fail under JDK9+ RFC 850 Date-related Tests Fail under JDK9+ Dec 2, 2018
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

1 participant