-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
org.json.junit.XMLTest.testIssue537CaseSensitiveHexEscapeFullFile fails #745
Comments
Is anyone else seeing this error? |
I tried commenting out |
I just recreated the problem on Windows with Java 17.0.7.
Also confirmed on Mac pro with Java 17.0.7, but seeing many warnings, and these new errors:
|
Just to be more specific, I'm using jdk8u362-b09. I originally said, then deleted, but should probably have left in, that the test
but the actual response ends:
(note extra line break) |
I've now dug into this further.
On Windows, the non-standard character in I'm wondering whether |
Lightbulb moment! |
OK, some more information. I went back to the 20220924 release (which compiles correctly on my system), and added the same logging (basic With the 20220924 release, the test passes because both the expected and actual output is So two main questions: (1) What has changed between the two releases that means the expected output has changed at this point? (2) What is correct? I've assumed so far that the problem lies in the change in expected output, i.e. Hope that makes sense - and that this is of interest to someone! |
Success! In
needs to be changed to:
This makes the "actual" & "expected" results match ( However, before I submit a PR, I'd like confirmation that this is the correct approach, as per my previous comment. |
@davejbur Thanks for the analysis and recommendation. I think it should be fine to update the XMLTest test case as you suggested. |
I'm having problems compiling, as testIssue537CaseSensitiveHexEscapeFullFile fails. I'm using:
The error I get is:
This is using the latest version of the code. I have also gone back to previous releases and tried compiling them, as follows:
20220924 - success, no issues
20230227 - fails, but at a different test
I'm just wondering whether it's something to do with the mod in JSONTokener.java line 60, where a recent change now explicitly uses UTF-8?
The text was updated successfully, but these errors were encountered: