-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P3
-
Affects Version/s: 21.0.9-oracle
-
Component/s: client-libs
-
generic
-
generic
ADDITIONAL SYSTEM INFORMATION :
Generic / MacOS / Java 21
A DESCRIPTION OF THE PROBLEM :
J2DdemoTest.java line 99 uses `new String(b, 0, n)` which relies on platform default encoding instead of explicit charset specification.
At line 99, `MyInputStream.run()` converts process output bytes to a String using `new String(byte[], int, int)`, which uses the platform default charset.
The test logic performs string matching on the decoded output for fixed tokens such as "ERROR" and "Exception" strings in the output at lines 46 and 49.
Decoding process output without an explicit charset introduces platform-dependent behavior into the test.
REGRESSION : Last worked in version 21.0.9-oracle
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
N/A - Encoding-dependent behavior.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The test should decode process output in a charset-independent manner.
ACTUAL -
The platform default charset is used implicitly when decoding process output.
Generic / MacOS / Java 21
A DESCRIPTION OF THE PROBLEM :
J2DdemoTest.java line 99 uses `new String(b, 0, n)` which relies on platform default encoding instead of explicit charset specification.
At line 99, `MyInputStream.run()` converts process output bytes to a String using `new String(byte[], int, int)`, which uses the platform default charset.
The test logic performs string matching on the decoded output for fixed tokens such as "ERROR" and "Exception" strings in the output at lines 46 and 49.
Decoding process output without an explicit charset introduces platform-dependent behavior into the test.
REGRESSION : Last worked in version 21.0.9-oracle
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
N/A - Encoding-dependent behavior.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The test should decode process output in a charset-independent manner.
ACTUAL -
The platform default charset is used implicitly when decoding process output.