[Java. Inspections] Add tests for not showing popup for add exception to method signature

IDEA-358300

GitOrigin-RevId: a7b8c716d772ae5ca631037ebb923bb796946af9
This commit is contained in:
Georgii Ustinov
2024-08-26 16:32:03 +03:00
committed by intellij-monorepo-bot
parent 770a11d8ba
commit 940f66f53d
2 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
// "Add 'throws UnsupportedOperationException' to method signature" "true-preview"
class A {
@Override
public String toString() {
return super.toString();
}
static class B extends A {
@Override
public String toString() throws UnsupportedOperationException {
throw new UnsupportedOperationException();
}
}
}

View File

@@ -0,0 +1,14 @@
// "Add 'throws UnsupportedOperationException' to method signature" "true-preview"
class A {
@Override
public String toString() {
return super.toString();
}
static class B extends A {
@Override
public String toString() {
throw new Unsupport<caret>edOperationException();
}
}
}