DefaultSourceDirectorySet.java
//SourceDirectorySet set
//List<Object> someList
set.srcDirs( someList ) //fails
set.srcDirs( someList.toArray() ) //workaround
The failing call invokes srcDirs(Object) and the subsequent failure is in doGetSrcDirTrees()
, in the else
branch where fileResolver.resolve(path)
throws an error.
Cannot convert the provided notation to a File or URI: [the provided list].
The following types/formats are supported:
- A String or CharSequence path, for example 'src/main/java' or '/usr/include'.
- A String or CharSequence URI, for example 'file:/usr/include'.
- A File instance.
- A URI or URL instance.
The workaround invokes the srcDirs(Object…) overload.