unhandled exception: shrink the highlighted range (IDEA-177234)

This commit is contained in:
Anna.Kozlova
2017-08-09 18:38:29 +02:00
parent 415b8f08ef
commit 3d1ba95725
7 changed files with 12 additions and 13 deletions
@@ -4,10 +4,10 @@ interface I<T extends Exception> {
class C {
void x(I<?> i) {
<error descr="Unhandled exception: java.lang.Exception">i.m();</error>
i.<error descr="Unhandled exception: java.lang.Exception">m();</error>
}
void y(I<? extends Exception> i) {
<error descr="Unhandled exception: java.lang.Exception">i.m();</error>
i.<error descr="Unhandled exception: java.lang.Exception">m();</error>
}
}
@@ -4,7 +4,7 @@ public class ExTest {
}
{
Block<String> b = (t) -> <error descr="Unhandled exception: ExTest.Ex">ExTest.maybeThrow(t)</error>;
Block<String> b = (t) -> ExTest.<error descr="Unhandled exception: ExTest.Ex">maybeThrow(t)</error>;
}
@@ -6,6 +6,6 @@ class Test {
public static void main(String[] args) {
Iterable<Consumer<Reader>> i = Arrays.asList(<error descr="Unhandled exception: IOException">(r) -> r.read()</error>);
Iterable<Consumer<Reader>> i1 = Arrays.<Consumer<Reader>>asList((r) -> <error descr="Unhandled exception: java.io.IOException">r.read()</error>);
Iterable<Consumer<Reader>> i1 = Arrays.<Consumer<Reader>>asList((r) -> r.<error descr="Unhandled exception: java.io.IOException">read()</error>);
}
}
@@ -8,7 +8,7 @@ public class c1 {
try {
fis = new FileInputStream("");
DataInputStream dis = new DataInputStream(fis);
<caret>dis.readInt();
dis.<caret>readInt();
} catch (IOException e) {
e.printStackTrace();
}
@@ -8,7 +8,7 @@ public class c1 {
try {
fis = new FileInputStream("");
DataInputStream dis = new DataInputStream(fis);
<caret>dis.readInt();
dis.<caret>readInt();
} catch (FileNotFoundException e) {
e.printStackTrace();
}