Closed GoogleCodeExporter closed 9 years ago
I can't reproduce this issue on Linux.
I get one single error:
Issue373.java:8: error: [override.return.invalid] Set<Entry<String, String>>
entrySet(Issue373 this) in Issue373 cannot override Set<Entry<@KeyFor("this")
String, String>> entrySet(Map<String, String> this) in java.util.Map;
attempting to use an incompatible return type
public Set<Map.Entry<String, String>> entrySet() {
^
found : Set<Entry<String, String>>
required: Set<Entry<@KeyFor("this") String, String>>
1 error
Can you copy the full error message?
When you say Java 8, do you mean just as runtime or are you using the Java 8
compiler instead of the Checker Framework compiler?
Original comment by wdi...@gmail.com
on 14 Oct 2014 at 4:32
C:\Test\src>java -jar c:\checker-framework-1.8.6\checker\dist\checker.jar
-processor org.checkerframework.checker.nullness.NullnessChecker -Awarns
Test.java
Test.java:8: warning: [override.return.invalid] Set<Entry<String, String>>
entrySet(Test this) in Test cannot override Set<Entry<@KeyFor("th
is") String, String>> entrySet(AbstractMap<String, String> this) in
java.util.AbstractMap; attempting to use an incompatible return type
public Set<Map.Entry<String, String>> entrySet() {
^
found : Set<Entry<String, String>>
required: Set<Entry<@KeyFor("this") String, String>>
Test.java:8: warning: [override.return.invalid] Set<Entry<String, String>>
entrySet(Test this) in Test cannot override Set<Entry<@KeyFor("this") String,
String>> entrySet(Map<String, String> this) in java.util.Map; attempting to use
an incompatible return type
public Set<Map.Entry<String, String>> entrySet() {
^
found : Set<Entry<String, String>>
required: Set<Entry<@KeyFor("this") String, String>>
2 warnings
Original comment by ClovisSe...@gmail.com
on 14 Oct 2014 at 9:28
Thanks for showing the command line! It's the -Awarns. Without it, I get 1
error; with it, I get 2 warnings.
I'll look into what's going wrong here. I don't get this behavior for other
errors, e.g. I don't get this for an assignment.type.incompatible.
Original comment by wdi...@gmail.com
on 15 Oct 2014 at 1:30
Thanks again for the report! I pushed a fix:
https://code.google.com/p/checker-framework/source/detail?r=56fcf1daa220a0363e74
dc163da52899100977b1
Original comment by wdi...@gmail.com
on 15 Oct 2014 at 2:33
Fixed in release 1.8.7
Original comment by Jonathan...@gmail.com
on 30 Oct 2014 at 11:12
Original issue reported on code.google.com by
ClovisSe...@gmail.com
on 4 Oct 2014 at 11:03