codestyle

This commit is contained in:
Clément Fournier committed 2022-01-16 01:20:47 +01:00
1 parent f8ce9cd9b9
commit 62aa48f3e2
1 file changed
+5 -5
@@ -97,7 +97,7 @@ public class UnnecessaryImportRule extends AbstractJavaRule {
}
for (ImportWrapper wrapper : singleImports) {
if (wrapper.node.getPackageName().equals("java.lang")) {
if ("java.lang".equals(wrapper.node.getPackageName())) {
if (!isJavaLangImportNecessary(node, wrapper)) {
// the import is not shadowing something
unnecessaryJavaLangImports.add(wrapper);
@@ -194,10 +194,10 @@ public class UnnecessaryImportRule extends AbstractJavaRule {
}
Set<ImportWrapper> container =
node.isStatic() && node.isImportOnDemand() ? staticImportsOnDemand :
node.isStatic() ? staticImports :
node.isImportOnDemand() ? importsOnDemand :
singleImports;
node.isStatic() && node.isImportOnDemand() ? staticImportsOnDemand
: node.isStatic() ? staticImports
: node.isImportOnDemand() ? importsOnDemand
: singleImports;
if (!container.add(new ImportWrapper(node))) {
// duplicate