Skip to content

Commit

Permalink
Issue #13999: Resolve pitest suppression for getTagId() method of Tag…
Browse files Browse the repository at this point in the history
…Parser
  • Loading branch information
suniti0804 authored and romani committed Jan 1, 2024
1 parent 595ff74 commit 86b9a28
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
27 changes: 0 additions & 27 deletions config/pitest-suppressions/pitest-javadoc-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -288,33 +288,6 @@
<lineContent>return astType == TokenTypes.VARIABLE_DEF</lineContent>
</mutation>

<mutation unstable="false">
<sourceFile>TagParser.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.javadoc.TagParser</mutatedClass>
<mutatedMethod>getTagId</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator</mutator>
<description>removed call to java/lang/Character::isJavaIdentifierStart</description>
<lineContent>&amp;&amp; (Character.isJavaIdentifierStart(text.charAt(position))</lineContent>
</mutation>

<mutation unstable="false">
<sourceFile>TagParser.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.javadoc.TagParser</mutatedClass>
<mutatedMethod>getTagId</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator</mutator>
<description>removed call to java/lang/String::charAt</description>
<lineContent>&amp;&amp; (Character.isJavaIdentifierStart(text.charAt(position))</lineContent>
</mutation>

<mutation unstable="false">
<sourceFile>TagParser.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.javadoc.TagParser</mutatedClass>
<mutatedMethod>getTagId</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator>
<description>removed conditional - replaced equality check with true</description>
<lineContent>&amp;&amp; (Character.isJavaIdentifierStart(text.charAt(position))</lineContent>
</mutation>

<mutation unstable="false">
<sourceFile>TagParser.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.javadoc.TagParser</mutatedClass>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@ private static String getTagId(String[] javadocText, Point tagStart) {
// Character.isJavaIdentifier... may not be a valid HTML
// identifier but is valid for generics
while (position < text.length()
&& (Character.isJavaIdentifierStart(text.charAt(position))
|| Character.isJavaIdentifierPart(text.charAt(position)))) {
&& Character.isJavaIdentifierPart(text.charAt(position))) {
position++;
}

Expand Down

0 comments on commit 86b9a28

Please sign in to comment.