yf0994 / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

OpenJDK 1.6 provided by Ubuntu 12.04 can't compile guava #1139

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
$ /usr/bin/javac -version
javac 1.6.0_24

Error:

external/guava/guava/src/com/google/common/collect/Maps.java:542: incompatible 
types; no instance(s) of type variable(s) K,V exist so that 
java.util.TreeMap<K,V> conforms to java.util.SortedMap<K,V>
found   : <K,V>java.util.TreeMap<K,V>
required: java.util.SortedMap<K,V>
    SortedMap<K, V> onlyOnLeft = Maps.newTreeMap(comparator);
                                                ^
external/guava/guava/src/com/google/common/collect/Maps.java:543: incompatible 
types; no instance(s) of type variable(s) K,V exist so that 
java.util.TreeMap<K,V> conforms to java.util.SortedMap<K,V>
found   : <K,V>java.util.TreeMap<K,V>
required: java.util.SortedMap<K,V>
    SortedMap<K, V> onlyOnRight = Maps.newTreeMap(comparator);
                                                 ^
external/guava/guava/src/com/google/common/collect/Maps.java:545: incompatible 
types; no instance(s) of type variable(s) K,V exist so that 
java.util.TreeMap<K,V> conforms to java.util.SortedMap<K,V>
found   : <K,V>java.util.TreeMap<K,V>
required: java.util.SortedMap<K,V>
    SortedMap<K, V> onBoth = Maps.newTreeMap(comparator);
                                            ^
external/guava/guava/src/com/google/common/collect/Maps.java:547: incompatible 
types; no instance(s) of type variable(s) K,V exist so that 
java.util.TreeMap<K,V> conforms to 
java.util.SortedMap<K,com.google.common.collect.MapDifference.ValueDifference<V>
>
found   : <K,V>java.util.TreeMap<K,V>
required: 
java.util.SortedMap<K,com.google.common.collect.MapDifference.ValueDifference<V>
>
        Maps.newTreeMap(comparator);

Some discussion:
https://groups.google.com/forum/#!topic/android-building/BFr5bmQzhHw/discussion

Might be related to this bug:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6468354

Original issue reported on code.google.com by cco3@android.com on 7 Sep 2012 at 1:19

GoogleCodeExporter commented 9 years ago
Also related:
http://bugs.openjdk.java.net/show_bug.cgi?id=100167

Original comment by cpov...@google.com on 7 Sep 2012 at 1:26

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 25 Oct 2012 at 6:09

GoogleCodeExporter commented 9 years ago
Are you still running into this issue? If so, please re-open (we don't want to 
spend additional time investigating stale issues).

Thanks,

Original comment by kak@google.com on 22 Aug 2013 at 10:11

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:13

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:08