mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
highlight only method name on unhandled exception (IDEA-190912)
This commit is contained in:
+3
-3
@@ -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 {
|
||||
}
|
||||
|
||||
+1
-1
@@ -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();}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user