lovubuntu / checker-framework

Automatically exported from code.google.com/p/checker-framework
0 stars 0 forks source link

-AconcurrentSemantics doesn't take @MonotonicNonNull into consideration #347

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
-AconcurrentSemantics doesn't take @MonotonicNonNull into consideration, e.g. 
the class below reports "dereference of possibly-null reference x" using 
-AconcurrentSemantics.  It seems that the existing @MonotonicNonNull analysis 
should be equally valid under -AconcurrentSemantics.

class Test {

    @MonotonicNonNull
    private String x;

    void setX(String x) {
        this.x = x;
    }

    void test() {
        if (x == null) {
            return;
        }
        x.toString();
    }
}

Original issue reported on code.google.com by trask.st...@gmail.com on 14 Aug 2014 at 7:42

GoogleCodeExporter commented 9 years ago
Hi Trask,

thanks for the test case! I just pushed a change to fix it:
https://code.google.com/p/checker-framework/source/detail?r=a50fa2be954129ba08d3
7004b43d16c7001ac957
Please let me know if you see any similar issues and feel free to expand the 
test case to reproduce it.

Best,
cu, WMD.

Original comment by wdi...@gmail.com on 18 Aug 2014 at 9:00

GoogleCodeExporter commented 9 years ago

Original comment by wdi...@gmail.com on 18 Aug 2014 at 9:00

GoogleCodeExporter commented 9 years ago

Original comment by jtha...@cs.washington.edu on 30 Aug 2014 at 12:15

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks, this test case is working for me now in the 1.8.5 release.  I ran in to 
a few more test cases and entered them in issue #350.

Original comment by trask.st...@gmail.com on 30 Aug 2014 at 8:38