javac error: UnsafeMergeRulesetNodes.java

35 views
Skip to first unread message

Hugo

unread,
Mar 18, 2012, 1:43:03 PM3/18/12
to closure-style...@googlegroups.com
It may well be just something wrong in my setup (java-6-openjdk), but when I clone the repository and try to compile, I get the following error:

Buildfile: /tmp/closure-stylesheets/build.xml

javacc:

compile:
    [javac] Compiling 2 source files to /tmp/closure-stylesheets/build/classes
    [javac] UnsafeMergeRulesetNodes.java:374: incompatible types; no instance(s) of type variable(s) K,V exist so that java.util.TreeMap<K,V> conforms to java.util.Map<com.google.common.css.compiler.ast.CssSelectorNode,java.util.List<com.google.common.css.compiler.ast.CssDeclarationNode>>
    [javac] found   : <K,V>java.util.TreeMap<K,V>
    [javac] required: java.util.Map<com.google.common.css.compiler.ast.CssSelectorNode,java.util.List<com.google.common.css.compiler.ast.CssDeclarationNode>>
    [javac]       this.inMap = Maps.newTreeMap(TO_STRING_COMPARATOR);
    [javac]                                   ^
    [javac] UnsafeMergeRulesetNodes.java:430: incompatible types; no instance(s) of type variable(s) K,V exist so that java.util.TreeMap<K,V> conforms to java.util.Map<java.util.Collection<com.google.common.css.compiler.ast.CssDeclarationNode>,java.util.Set<com.google.common.css.compiler.ast.CssSelectorNode>>
    [javac] found   : <K,V>java.util.TreeMap<K,V>
    [javac] required: java.util.Map<java.util.Collection<com.google.common.css.compiler.ast.CssDeclarationNode>,java.util.Set<com.google.common.css.compiler.ast.CssSelectorNode>>
    [javac]           Maps.newTreeMap(TO_STRING_ITERABLE_COMPARATOR);
    [javac]                          ^
    [javac] 2 errors

BUILD FAILED


Cheers,

Hugo

Hochhaus, Andrew

unread,
May 2, 2013, 10:41:18 AM5/2/13
to closure-style...@googlegroups.com
In case anyone else hits this, I believe the underlying bug causing
this problem in openjdk is:

http://bugs.openjdk.java.net/show_bug.cgi?id=100167

Compiling with openjdk-7 fixed the problem for me (at least on Debian Wheezy).
Reply all
Reply to author
Forward
0 new messages