highlight only method name on unhandled exception (IDEA-190912)

This commit is contained in:
Anna.Kozlova
2018-04-25 21:11:38 +02:00
parent 40af21eaeb
commit 51a2d549b2
25 changed files with 42 additions and 41 deletions
@@ -56,7 +56,7 @@ class a4 {
}
class a5 {
int i = <error descr="Unhandled exception: java.lang.ClassNotFoundException">f();</error>
int i = <error descr="Unhandled exception: java.lang.ClassNotFoundException">f</error>();
int f() throws ClassNotFoundException {
return 0;
@@ -110,7 +110,7 @@ class a9 {
public AnInterface getAnInterface() {
return new AnInterface() {
{
<error descr="Unhandled exception: java.io.FileNotFoundException">new java.io.FileInputStream("somefile")</error>;
new <error descr="Unhandled exception: java.io.FileNotFoundException">java.io.FileInputStream</error>("somefile");
}
};
}
@@ -121,7 +121,7 @@ class BadStatic {
static String f() throws ClassNotFoundException {
return null;
}
private static final String FOO = <error descr="Unhandled exception: java.lang.ClassNotFoundException">f();</error>
private static final String FOO = <error descr="Unhandled exception: java.lang.ClassNotFoundException">f</error>();
public BadStatic() throws ClassNotFoundException {
}
@@ -54,7 +54,7 @@ class A3 {
// in initializer
class Test{
final String s = <error descr="Unhandled exception: java.lang.Exception">makeString();</error>
final String s = <error descr="Unhandled exception: java.lang.Exception">makeString</error>();
String makeString() throws Exception {throw new Exception();}
}
@@ -13,7 +13,7 @@ class a {
void f2(int i) {
try {
<error descr="Unhandled exception: java.io.FileNotFoundException">new FileReader("")</error>;
new <error descr="Unhandled exception: java.io.FileNotFoundException">FileReader</error>("");
}
finally {
if (i==4) <error descr="Unhandled exception: java.lang.ClassNotFoundException">throw new ClassNotFoundException();</error>
@@ -22,7 +22,7 @@ class a {
void f3(int i) {
try {
<error descr="Unhandled exception: java.io.FileNotFoundException">new FileReader("")</error>;
new <error descr="Unhandled exception: java.io.FileNotFoundException">FileReader</error>("");
}
finally {
if (i==1) return;
@@ -31,7 +31,7 @@ class a {
void f4(int i) {
try {
<error descr="Unhandled exception: java.io.FileNotFoundException">new FileReader("")</error>;
new <error descr="Unhandled exception: java.io.FileNotFoundException">FileReader</error>("");
}
finally {
if (i==1) <error descr="Unhandled exception: java.io.FileNotFoundException">throw new FileNotFoundException();</error>