make DetailExceptionIntention more discoverable (add test)

This commit is contained in:
Dmitry Batkovich
2017-11-29 11:16:53 +03:00
parent 2979952c2c
commit 790b19c055
3 changed files with 38 additions and 0 deletions
@@ -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) {
}
}
}
@@ -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) {
}
}
}
@@ -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() {