mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
make DetailExceptionIntention more discoverable (add test)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.siyeh.ipp.exceptions.detail;
|
||||
|
||||
class Test {
|
||||
|
||||
void foo() {
|
||||
try{
|
||||
if (true) {
|
||||
throw new IllegalArgumentException();
|
||||
} else {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
} catch (RuntimeExcept<caret>ion e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.siyeh.ipp.exceptions.detail;
|
||||
|
||||
class Test {
|
||||
|
||||
void foo() {
|
||||
try {
|
||||
if (true) {
|
||||
throw new IllegalArgumentException();
|
||||
} else {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
|
||||
} catch (NullPointerException e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
@@ -1,3 +1,4 @@
|
||||
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.siyeh.ipp.exceptions;
|
||||
|
||||
import com.siyeh.IntentionPowerPackBundle;
|
||||
@@ -14,6 +15,7 @@ public class DetailExceptionsIntentionTest extends IPPTestCase {
|
||||
public void testForeach() { doTest(); }
|
||||
public void testTryWithResources() { doTest(); }
|
||||
public void testPolyadicParentheses() { doTest(); }
|
||||
public void testCaretAtParameter() { doTest(); }
|
||||
|
||||
@Override
|
||||
protected String getIntentionName() {
|
||||
|
||||
Reference in New Issue
Block a user