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

Build failure when the default charset of the JVM is not UTF-8 #4417

Closed
lsq27 opened this issue Jul 15, 2023 · 0 comments
Closed

Build failure when the default charset of the JVM is not UTF-8 #4417

lsq27 opened this issue Jul 15, 2023 · 0 comments
Labels
for: backport-to-5.0.x Issues that will be back-ported to the 5.0.x line in: build type: bug
Milestone

Comments

@lsq27
Copy link
Contributor

lsq27 commented Jul 15, 2023

Bug description
Tests fail when Charset.defaultCharset().name() doesn't return UTF-8.

Environment
OpenJDK 17.0.7
Windows 11 22H2 language Chinese default charset GBK

Steps to reproduce
Run .\mvnw verify in Windows (default charset GBK).

output:

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   FlatFileItemWriterBuilderTests.testFlags:282->validateBuilderFlags:462 expected: <GBK> but was: <UTF-8>
[ERROR]   JsonFileItemWriterBuilderTests.testJsonFileItemWriterCreationDefaultEncoding:135->validateBuilderFlags:146 expected: <GBK> but was: <UTF-8>
[INFO]
[ERROR] Tests run: 1552, Failures: 2, Errors: 0, Skipped: 35

Expected behavior
All tests will be passed with different default charset of JVM.

@lsq27 lsq27 added status: waiting-for-triage Issues that we did not analyse yet type: bug labels Jul 15, 2023
lsq27 added a commit to lsq27/spring-batch that referenced this issue Jul 15, 2023
@fmbenhassine fmbenhassine added in: build for: backport-to-5.0.x Issues that will be back-ported to the 5.0.x line and removed status: waiting-for-triage Issues that we did not analyse yet labels Jul 18, 2023
@fmbenhassine fmbenhassine added this to the 5.1.0-M1 milestone Jul 18, 2023
@fmbenhassine fmbenhassine changed the title Assume default charset of JVM to be UTF-8 in tests Build failure when the default charset of the JVM is not UTF-8 Jul 18, 2023
fmbenhassine pushed a commit that referenced this issue Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: backport-to-5.0.x Issues that will be back-ported to the 5.0.x line in: build type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants