相同的代码在eclipse中编译成功,但是用ant编译失败
无法确定<T>T的类型参数;对于上限为int,java.lang.Object的类型变量T,不存在唯一最大实例
type parameters of <T>T cannot be determined; no unique maximal instance exists for type variable T with upper bounds int,java.lang.Object
比如:
boolean foo = org.apache.pivot.json.JSON.get(item, "foo");
改成
boolean foo = org.apache.pivot.json.JSON.<Boolean>get(item, "foo");
参考:
http://stackoverflow.com/questions/5666027/why-does-the-compiler-state-no-unique-maximal-instance-exists
http://stackoverflow.com/questions/1609531/same-source-code-eclipse-build-success-but-maven-javac-fails