Add a parser for Stryker#299
Conversation
uhafner
left a comment
There was a problem hiding this comment.
Awesome! Thank you very much for this contribution. Good to see that the PIT model fits also for a totally different mutation format.
| <groupId>com.fasterxml.jackson.core</groupId> | ||
| <artifactId>jackson-databind</artifactId> | ||
| <version>2.17.2</version> |
There was a problem hiding this comment.
Can we use the 3.x release line of Jackson?
| .withSourceFile(fileName) | ||
| .withMutatedClass(toMutatedClass(relativePath)) | ||
| .withMutatedMethod("mutation-" + id) | ||
| .withMutatedMethodSignature(StringUtils.EMPTY) |
There was a problem hiding this comment.
This is the default
| .withMutatedMethodSignature(StringUtils.EMPTY) |
| if (!node.isArray()) { | ||
| return StringUtils.EMPTY; | ||
| } | ||
|
|
||
| var builder = new StringBuilder(); | ||
| var iterator = node.elements(); | ||
| while (iterator.hasNext()) { | ||
| if (!builder.isEmpty()) { | ||
| builder.append(','); | ||
| } | ||
| builder.append(iterator.next().asText(StringUtils.EMPTY)); | ||
| } | ||
| return builder.toString(); |
There was a problem hiding this comment.
Isn't there a simpler way in Jackson 3 that uses a stream to get the result?
…ing, IOException→JacksonException, stream-based joinStringArray)
☀️ Quality MonitorTests Coverage for New Code 〰️ Line Coverage: 97.53% — 2 missed lines Coverage for Whole Project 〰️ Line Coverage: 95.78% Style Bugs API Problems 🚫 Revapi: 6 warnings Vulnerabilities 🛡️ OWASP Dependency Check: No vulnerabilities Software Metrics 🌀 Cyclomatic Complexity: 949 (total) 📌 Reference ResultsDelta reports computed against the reference results of 0f28aa7 in workflow run 26680627502. 🚦 Quality GatesOverall Status: ✅ SUCCESS✅ Passed Gates
Created by Quality Monitor v4.15.0 (#82d77af). More details are shown in the GitHub Checks Result. |
|
Thanks! |
Add a parser for
StrykerFixes #298
Testing done
Submitter checklist