Skip to content

Commit

Permalink
Issue checkstyle#7920: Resolve Pitest Issues - RedundantImportCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav-Punjabi committed Mar 25, 2020
1 parent 0427f9f commit 01170e3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion .ci/pitest.sh
Expand Up @@ -86,7 +86,6 @@ pitest-imports)
"PkgImportControl.java.html:<td class='covered'><pre><span class='survived'> if (regex || parent.regex) {</span></pre></td></tr>"
"PkgImportControl.java.html:<td class='covered'><pre><span class='survived'> if (regex) {</span></pre></td></tr>"
"PkgImportRule.java.html:<td class='covered'><pre><span class='survived'> if (isRegExp()) {</span></pre></td></tr>"
"RedundantImportCheck.java.html:<td class='covered'><pre><span class='survived'> else if (pkgName != null &#38;&#38; isFromPackage(imp.getText(), pkgName)) {</span></pre></td></tr>"
"UnusedImportsCheck.java.html:<td class='covered'><pre><span class='survived'> if (collect) {</span></pre></td></tr>"
);
checkPitestReport "${ignoredItems[@]}"
Expand Down
Expand Up @@ -150,7 +150,7 @@ private static boolean isFromPackage(String importName, String pkg) {
// So '.' must be present in member name and we are not checking for it
final int index = importName.lastIndexOf('.');
final String front = importName.substring(0, index);
return front.equals(pkg);
return pkg.equals(front);
}

}

0 comments on commit 01170e3

Please sign in to comment.