Closed hprange closed 6 years ago
@fbarthez I can cut a new release of the woproject-ant-tasks project as soon as we merge this change into master
. Can you check if it works for you?
@hprange Sorry this is taking me so long! I'll only be able to look at it on Wednesday…
Works for me – sorry it took me so long!
While trying to release a new version of woproject-ant-tasks, I faced compilation failures on multiple classes. All of them caused by a
reference to WOEnvironment is ambiguous
error. E.g.:Java is unable to choose between
Map<Object, Object>
andHashtable<String, Object>
when you pass a rawHashtable
as a parameter. Oh, the joy of Java Generics. It always confuses me. :)I was digging into the Git history when I found out that the
WOEnvironment
constructor receiving aHashtable<String, Object>
parameter was introduced to solve, guess what, a compilation failure. As pointed out by Pascal Robert in this comment, aHashtable<String, Object>
couldn't be converted toMap<Object, Object>
using Ant version 1.9.3.This pull request makes the constructors of
WOEnvironment
andWOVariables
classes more flexible by replacing the parameterized typeMap<Object, Object>
with the unbounded wildcard typeMap<?, ?>
; hence, supporting old and new versions of Ant without errors.I've also updated the Ant dependency version to 1.10.3 when building woproject-ant-tasks with Maven.
You can find more information about the original change on this pull request, more specifically, on this commit.