mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java-inspections] IDEA-341640 Mark main(String[] args) parameter as unused with implicit classes
- return back support `premain` GitOrigin-RevId: 71ed562fa9e0f514852cb3aff0e993452371aa44
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4d2e4a3197
commit
e7ff016f3e
@@ -317,7 +317,7 @@ public final class PsiClassImplUtil {
|
||||
return true;
|
||||
}
|
||||
String name = method.getName();
|
||||
if ("premain".equals(name) || "agentmain".equals(name)) return false;
|
||||
if (!("main".equals(name) || "premain".equals(name) || "agentmain".equals(name))) return false;
|
||||
if (!PsiTypes.voidType().equals(method.getReturnType())) return false;
|
||||
|
||||
PsiElementFactory factory = JavaPsiFacade.getElementFactory(method.getProject());
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Safe delete 'args'" "false"
|
||||
|
||||
public class Main{
|
||||
public static void premain(String ar<caret>gs, java.lang.instrument.Instrumentation i) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user