-
Notifications
You must be signed in to change notification settings - Fork 1.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
Java: Add tests for XML and Java extraction with GBK charset #18554
Java: Add tests for XML and Java extraction with GBK charset #18554
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 3 out of 9 changed files in this pull request and generated no comments.
Files not reviewed (6)
- java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/pom.xml: Language not supported
- java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/source_archive.expected: Language not supported
- java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/src/main/resources/my-app.properties: Language not supported
- java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/src/main/resources/page.xml: Language not supported
- java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/test.expected: Language not supported
- java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/test.ql: Language not supported
Comments suppressed due to low confidence (3)
java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/src/test/java/com/example/AppTest.java:18
- This test is not meaningful and does not cover any real behavior. It should test actual functionality.
assertTrue( true );
java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/src/main/java/com/example/App.java:20
- [nitpick] The error message is unclear. Consider changing it to: "Wrong maven version, expected '" + expectedVersion + "' but got '" + observedVersion + "'. Maven home: " + mavenHome".
System.err.println("Wrong maven version, expected '" + expectedVersion + "' but got '" + observedVersion + "'" + mavenHome);
java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/src/main/java/com/example/App.java:26
- [nitpick] The error message could be clearer. Consider changing it to: "Wrong command line, expected '" + commandMatcher + "' but got '" + command + "'."
System.err.println("Wrong command line, '" + command + "' does not match '" + commandMatcher + "'");
Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more
abf4540
to
c907d9a
Compare
c907d9a
to
9162ce7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving since it looks plausible to me, but one question below.
except with
site.xml
modified to use the same charset.
I'm not seeing a site.xml
file, so I'm not sure if I'm missing some context. Is this meant to refer to page.xml
?
Yes it is; fixed. |
The Java extraction unit test simply checks that a gbk-encoded comment extracts as expected. The XML integration test is a clone of an existing sibling test except with
page.xml
modified to use the same charset. Both would have failed until the CodeQL JDK (XML) and Java extractor JDK (Java source) were updated to include thejdk.charsets
jmod.