BasicJsonParser tokenizes JSON into map entries (key-value pairs)
and list entries (values). As part of this, any escaped characters
are unescaped. When the values are themselves maps or lists, they
are tokenized again. This multi-pass approach with every pass
performing unescaping causes the escaped characters to be handled
incorrectly.
This commit updates BasicJsonParser to leave escape characters in
place when its parsing characters nested within a list or map. The
escaping is now only considered when parsing a scalar value. This
ensures that unescaping is only performed once.
Fixes gh-51907
This commit improves TestImage so that an explicit image can trigger
the creation of the container, with optional additional setup. This
removes the need of creating additional container types for images that
have multiple flavors, and to please the static method that can only
create a container based on a single match.
Closes gh-51082
A high surrogate left unconsumed by the encoder was dropped between
append calls, so surrogate pairs written a character at a time by
JsonValueWriter were replaced with `?`.
See gh-51464
Signed-off-by: JaeHyunAn <98042706+yyuneu@users.noreply.github.com>
Three Assert messages named a parameter that does not exist on the
method. In each case the correct name is already used by neighbouring
code in the same class.
Signed-off-by: kdomo <dongho5088@naver.com>
See gh-51568
There's a race between destruction of the process completing and the
test checking that the process has been destroyed. When the test
wins the race, it fails.
This commit removes the race condition by updating the test to wait
until the process has been destroyed.
Closes gh-51571
Release the output reader latch in a finally block so a failing stream
read or output consumer cannot leave ProcessRunner.run blocked on
CountDownLatch.await after the child process has exited.
Destroy the child process when waitFor is interrupted so Docker Compose
commands are not left running as orphans.
Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
See gh-50963
At the time of writing, https://javaalmanac.io lists
EnumSet.spliterator as being new in Java 27, but that's not the case.
This commit switches to using String.encodedLength(Charset) instead.
This method is new in Java 27 and also aligns with the existing
TWENTY_SIX value that already uses a method on String for version
identification.
See gh-51422
This harmonizes how JSON marshaller testers operate on a stream. Also
added tests that checks the source is closed as expected for all
implementations.
Closes gh-51417
RequireNewOrMatchingContentFileHandler reads the already generated file
through content.getInputStream().readAllBytes(). That method does not
close the stream, and the stream is never assigned, so it cannot
be closed at all.
During AOT processing the content is a FileSystemResource, so each
comparison leaks a file handle. FileSystemGeneratedFiles already uses
try-with-resources when it consumes an InputStreamSource.
Read the existing content inside a try-with-resources block.
See gh-51398
Signed-off-by: dlwldn30 <dlwldn30@naver.com>