Fix constructor safety and UTF-8 CSV error reporting - #187
Open
peter-lawrey wants to merge 1 commit into
Open
Conversation
Resource tracing must not terminate an embedding JVM, and CSV output must preserve Unicode names and report storage failures. Throw IllegalStateException on construction and propagate IOException through UTF-8 output, including row writes and cleanup. Add 14 regression cases. Full clean verification passes all 44 tests on Java 8, Java 25 and 32-bit Java 21. Refs #176 and CSV requirement FN-005.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JLBH construction currently terminates the host JVM when resource tracing is enabled, and CSV output can silently swallow storage failures through
PrintWriter. Throw a catchableIllegalStateExceptionfrom both constructor paths and write CSV with an explicit UTF-8 reporting encoder. Preserve valid Unicode probe names and propagate malformed input, write, flush and close failures asIOException, including failures while emitting a probe row.CSV readers must decode UTF-8 explicitly. This preserves existing ASCII output and Unicode output on UTF-8-default systems; it deliberately removes platform-default encoding dependence. Failed output may be partial. Public signatures are preserved.
Update the existing lifecycle guide, constructor Javadocs and CSV requirement (FN-005) together. The lifecycle guide is the canonical property description. Add 14 regression cases covering property values/restoration through both constructors, exact bytes and round trips for ASCII/Latin-1/euro/supplementary Unicode names, malformed Unicode, and write/flush/close failures with destination closure.
Extracted from #176 onto develop
b201544e3bbb3e2bc8b55bc57f585d4f2b91be8a, retaining current dependencies and JUnit Jupiter. The sampling-counter conversion, example edits, agent/TODO scaffolding, documentation migration and old quality profile are deferred; this patch makes no watchdog or sampling-performance claim.Validation:
mvn verifyAll 11 serializer cases also pass with Java 8's default charset set to ISO-8859-1. Separate actual-library JVM probes show that the baseline exits with code 255 for empty/true tracing, whereas the revised constructor rejects those settings and the host continues normally. The unchanged develop baseline passed its original 30 tests on Java 8.
Commands, with the appropriate
JAVA_HOMEand matchingPATH:mvn -o -nsu clean verify -Dsurefire.rerunFailingTestsCount=0 -l jlbh-verify.log JAVA_TOOL_OPTIONS=-Dfile.encoding=ISO-8859-1 mvn -o -nsu test \ -Dtest=JLBHResultSerializerTest -l serializer-latin1-default.log mvn -o -nsu help:effective-pom -Doutput=effective-pom.xmlThe inherited Checkstyle 3.3.0 plugin / Checkstyle 9.3 configuration and license/Javadoc checks pass. Checkstyle uses
google_checks.xmland chronicle-quality-rules 1.23ea6, including test sources; its warning-level diagnostics remain subject to the existing parent failure threshold. This is not a warning-free style audit or validation of #176's separate quality profile.Fresh platform CI is required before merge. The historical Linux failure on #176 (TeamCity build 1237958) remains unclassified because the log endpoint requires authentication; it is not evidence against this extraction or attributed to a particular old change.
Fresh CI on
c715fd95477e49e4dc748d552836b257c5877c0d, checked on 11 September 2026: one failed, 12 queued. Pull Requests Linux build 1353486 failed; its log download returns HTTP 401, so its cause remains unclassified. Windows and Mac are still queued. Hold the merge until this failure is diagnosed and the required platform checks complete; the local matrix does not replace that evidence.Shared snapshot repository repair - 12 September 2026
188 owns the obsolete snapshot URL correction on
develop. Both this PR's Pull Requests Linux build 1353486 and unchanged-develop build 1351468 fail resolving the same BOM from the old URL.A disposable composition of this exact head with the one-line shared correction passes full Java 8
clean verify: 44 tests, zero failures/errors/skips/retries, from an initially empty isolated Maven repository and empty user settings. The shared repair alone passes all 30 baseline tests. This PR's branch is unchanged; incorporate the focused repair after it lands and complete normal CI/review.