Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct the logic of dataflow framework. (#3414)
BackwardAnalysis: 1. Add exception block's predecessor exception block to inputs (fix null pointer exception). 2. When running `runAnalysisFor()` with an exception block, pass a copied transfer input to `callTransferFunction()`. ForwardAnalysis: 1. When running `runAnalysisFor()` with an exception block, pass a copied transfer input to `callTransferFunction()`. In the previous dataflow framework (before #3370), we passed a non-copied transfer input (https://github.com/typetools/checker-framework/pull/3370/files#diff-d4108228a0a5407e00c090c2e97d8b6dL401-L402). This seems a bug existing in the old dataflow framework. Resolves #3447.
- Loading branch information
1 parent
90cdd5e
commit bc9a120
Showing
5 changed files
with
42 additions
and
4 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Test case for Issue 3447: | ||
// https://github.com/typetools/checker-framework/issues/3447 | ||
|
||
public class Test { | ||
public void test() throws Exception { | ||
try { | ||
int[] myNumbers = {1}; | ||
System.out.println(myNumbers[1]); | ||
} catch (Exception e) { | ||
} | ||
} | ||
} |