biddyweb / checker-framework

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

Eclipse plug-in ignores error in code #360

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Use the Nullness Checker of the Eclipse plug-in on the following program
import org.eclipse.jdt.annotation.NonNull;

abstract class Foo<E> {
    E e;

    void bar() {
        e = null;
    }

    abstract <F> Foo<@NonNull F> foo(F newValue);
}

What is the expected output? What do you see instead?
Expected: The same output as if I had used 
org.checkerframework.checker.nullness.qual.NonNull, that is, a warning at line 
7: incompatible types in assignment. e = null; found : null required: /*DECL*/ 
E extends @Initialized @Nullable Object
Actual: No warning

What version of the product are you using? On what operating system?
Checker Framework Feature   1.8.5.1

Please provide any additional information below.
see https://code.google.com/p/checker-framework/issues/detail?id=359

Original issue reported on code.google.com by ClovisSe...@gmail.com on 25 Sep 2014 at 6:49

GoogleCodeExporter commented 9 years ago
Since that javac and JDT not always agree about what a correct java program 
(especially now with all those inferred types), it is not uncommon that the 
Checker Framework cannot run because a program that is perfectly valid 
according to JDT cannot be compiled with javac. In this case, it is baffling 
that all warnings from the Checker Framework suddenly disappear from the IDE.
If one or more classes cannot be compiled with javac/the Checker Framework, the 
plug-in should indicate that.

Original comment by ClovisSe...@gmail.com on 28 Sep 2014 at 12:35

GoogleCodeExporter commented 9 years ago

Original comment by michael.ernst@gmail.com on 29 Sep 2014 at 9:55