mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Java: avoid exception and broken code in compact source file (IDEA-379938)
GitOrigin-RevId: b0846f84f6830ce49bcf0ab5974e864c8d41f75b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8ed7abee22
commit
86210e4506
+2
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.ExceptionUtil;
|
||||
@@ -37,6 +37,7 @@ public final class AddExceptionFromFieldInitializerToConstructorThrowsFix extend
|
||||
final PsiClass containingClass = field.getContainingClass();
|
||||
if (containingClass == null ||
|
||||
containingClass instanceof PsiAnonymousClass ||
|
||||
containingClass instanceof PsiImplicitClass ||
|
||||
containingClass.isInterface()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// "Add exception to constructor signature" "false"
|
||||
|
||||
java.io.FileWriter fw = new java.io.File<caret>Writer("sunshine");
|
||||
Reference in New Issue
Block a user