【发布时间】:2016-02-28 09:05:24
【问题描述】:
我在commons-lang3(3.1 版)中使用org.apache.commons.lang3.BooleanUtils。
当我尝试编译下一行代码时
BooleanUtils.xor(true, true);
使用maven-compiler-plugin(3.3 版),我收到一条编译失败消息:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project exchange: Compilation failure
[ERROR] MyClass.java:[33,34] reference to xor is ambiguous, both method xor(boolean...) in org.apache.commons.lang3.BooleanUtils and method xor(java.lang.Boolean...) in org.apache.commons.lang3.BooleanUtils match
我使用Java 1.7.0_55编译。
我该如何解决这个问题?
【问题讨论】:
标签: java apache maven apache-commons apache-commons-lang3