Repository navigation
A set of regression fixes where we differed from Java's Properties - #100
Merged
Merged
Conversation
A continuation between the key and its optional delimiter ended separator parsing too early, leaving the delimiter in the value. Use pending-backslash states to keep continuations in the separator and ordinary escapes in the value.
Unicode escapes split across continued lines were rejected because the parser required four adjacent hex digits before joining the lines. Remove line continuations before decoding escapes in keys and values.
Unicode escapes accepted non-ASCII digits, and malformed escapes produced inconsistent exceptions. Require four ASCII hexadecimal digits and reject invalid sequences with IllegalArgumentException.
A continuation-only prefix made following comments and blank lines into properties, introducing spurious keys. Preserve these prefixes as formatting and match the JDK behavior for empty continuations at EOF.
quintesse
force-pushed
the
regression_fixes
branch
from
October 26, 2026 12:19
4683c41 to
7a55e13
Compare
Collaborator
Author
|
@wleeaf I would be interested to know how these fixes handle your extensive test suite. You think you'd be able to test it before I create a new release? |
Contributor
|
I ran the differential corpus against main (7a247ef): 20,061 inputs (63 hand-written edge cases plus random mixes of escapes,
|
Collaborator
Author
|
So you are okay with creating a new release, right? Or do you see any other issues that still need to be fixed? |
Contributor
Collaborator
Author
|
OK, version 0.1.0 released! |
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.
These were all corner cases where Codejive Properties did not behave like Java Properties.
To make these fixes possible the core parser loop was refactored somewhat to enable a more extensive state machine.