-
-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: CtCatchVariable#getType() in noclasspath mode may return null (#…
- Loading branch information
1 parent
ec58744
commit 25ff47f
Showing
4 changed files
with
58 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/test/resources/spoon/test/noclasspath/exceptions/Foo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
public class Foo { | ||
|
||
void testCatchWithUnknownException(File file) { | ||
try { | ||
new FileReader(file); | ||
} | ||
catch (UnknownException e) { | ||
System.out.println(e); | ||
} | ||
} | ||
|
||
void testMultiCatchWithUnknownException1(File file) { | ||
try { | ||
new FileReader(file); | ||
} | ||
catch (UnknownException | FileNotFoundException e) { | ||
System.out.println(e); | ||
} | ||
} | ||
|
||
void testMultiCatchWithUnknownException2(File file) { | ||
try { | ||
new FileReader(file); | ||
} | ||
catch (FileNotFoundException | UnknownException e) { | ||
System.out.println(e); | ||
} | ||
} | ||
} |