mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
[java-completion] IJ-CR-129761 IDEA-349764 Suggest a full catch section
- catch sections are added automatically GitOrigin-RevId: 7bb37aec0207d152d31b0c78cc91657f80036719
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d11745ceca
commit
ab78cc0642
@@ -1,6 +1,8 @@
|
||||
class X{
|
||||
public void test() {
|
||||
try {
|
||||
} catch (Exception e)<caret>
|
||||
try {
|
||||
} catch (Exception e) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,48 +4,50 @@ class X{
|
||||
class CheckedException2 extends Exception {
|
||||
}
|
||||
public void test() {
|
||||
try {
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
throw new CheckedException2();
|
||||
} catch (Exception e)<caret>
|
||||
try {
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
method1();
|
||||
throw new CheckedException2();
|
||||
} catch (Exception e) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
|
||||
private void method1() throws CheckedException1{
|
||||
|
||||
@@ -4,12 +4,14 @@ class X{
|
||||
class CheckedException2 extends Exception {
|
||||
}
|
||||
public void test() {
|
||||
try {
|
||||
method1();
|
||||
throw new CheckedException2();
|
||||
} catch(CheckedException1 e) {
|
||||
} catch(CheckedException2 e) {
|
||||
} catch (Exception e)<caret>
|
||||
try {
|
||||
method1();
|
||||
throw new CheckedException2();
|
||||
} catch (CheckedException1 e) {
|
||||
} catch (CheckedException2 e) {
|
||||
} catch (Exception e) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
|
||||
private void method1() throws CheckedException1{
|
||||
|
||||
@@ -4,11 +4,13 @@ class X{
|
||||
class CheckedException2 extends Exception {
|
||||
}
|
||||
public void test() {
|
||||
try {
|
||||
method1();
|
||||
throw new CheckedException2();
|
||||
} catch(CheckedException2 e) {
|
||||
} catch (CheckedException1 e)<caret>
|
||||
try {
|
||||
method1();
|
||||
throw new CheckedException2();
|
||||
} catch (CheckedException2 e) {
|
||||
} catch (CheckedException1 e) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
|
||||
private void method1() throws CheckedException1{
|
||||
|
||||
@@ -6,11 +6,13 @@ class X{
|
||||
class CheckedException3 extends Exception {
|
||||
}
|
||||
public void test() {
|
||||
try {
|
||||
method1();
|
||||
throw new CheckedException2();
|
||||
throw new CheckedException3();
|
||||
} catch (Exception e)<caret>
|
||||
try {
|
||||
method1();
|
||||
throw new CheckedException2();
|
||||
throw new CheckedException3();
|
||||
} catch (Exception e) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
|
||||
private void method1() throws CheckedException1{
|
||||
|
||||
@@ -4,8 +4,10 @@ import com.test2.Test;
|
||||
|
||||
class X{
|
||||
public void test() {
|
||||
try {
|
||||
Test.test();
|
||||
} catch (TestException e)<caret>
|
||||
try {
|
||||
Test.test();
|
||||
} catch (TestException e) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,10 @@ import com.test2.Test;
|
||||
|
||||
class X{
|
||||
public void test() {
|
||||
try {
|
||||
Test.test();
|
||||
} catch (TestException e)<caret>
|
||||
try {
|
||||
Test.test();
|
||||
} catch (TestException e) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,11 +6,13 @@ class X{
|
||||
class CheckedException2 extends CheckedException {
|
||||
}
|
||||
public void test() {
|
||||
try {
|
||||
method1();
|
||||
throw new CheckedException2();
|
||||
} catch(CheckedException e) {
|
||||
} catch (Exception e)<caret>
|
||||
try {
|
||||
method1();
|
||||
throw new CheckedException2();
|
||||
} catch (CheckedException e) {
|
||||
} catch (Exception e) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
|
||||
private void method1() throws CheckedException1{
|
||||
|
||||
@@ -4,11 +4,13 @@ class X{
|
||||
class CheckedException2 extends Exception {
|
||||
}
|
||||
public void test() {
|
||||
try {
|
||||
method1();
|
||||
throw new CheckedException2();
|
||||
throw new RuntimeException();
|
||||
} catch (CheckedException1 e)<caret>
|
||||
try {
|
||||
method1();
|
||||
throw new CheckedException2();
|
||||
throw new RuntimeException();
|
||||
} catch (CheckedException1 e) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
|
||||
private void method1() throws CheckedException1{
|
||||
|
||||
@@ -4,10 +4,12 @@ class X{
|
||||
class CheckedException2 extends Exception {
|
||||
}
|
||||
public void test() {
|
||||
try {
|
||||
method1();
|
||||
throw new CheckedException2();
|
||||
} catch (CheckedException1 e)<caret>
|
||||
try {
|
||||
method1();
|
||||
throw new CheckedException2();
|
||||
} catch (CheckedException1 e) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
|
||||
private void method1() throws CheckedException1{
|
||||
|
||||
@@ -4,10 +4,12 @@ class X{
|
||||
class CheckedException2 extends RuntimeException {
|
||||
}
|
||||
public void test() {
|
||||
try {
|
||||
method1();
|
||||
throw new CheckedException2();
|
||||
} catch (CheckedException1 e)<caret>
|
||||
try {
|
||||
method1();
|
||||
throw new CheckedException2();
|
||||
} catch (CheckedException1 e) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
|
||||
private void method1() throws CheckedException1{
|
||||
|
||||
Reference in New Issue
Block a user