Hi, folks! I have the following code snippet presented on the screenshot and two questions related to it:
1. the
srcDirs
property provides
Set<File!>
I further use with
.map(File::toPath)
– I assume it’s rather necessary to
.filterNotNull()
before, right?
2. As I have couple of chained operations – wouldn’t it be better to convert the initial set to sequence?
✅ 1
j
Jakub Syty
12/09/2022, 9:34 AM
1. It might not be necessary but it's good sanity check
2. If the srcDirs is small (and it often is) then converting that to sequence wouldn't really change that much
j
Jakub Chrzanowski
12/09/2022, 9:36 AM
1. The code is a part of the Gradle plugin and pushed to God know how many projects – it has to be safe. 🙂
2. Yup, it’s a tiny list; then I’m skipping that part.
Thanks, Jakub!
👍 1
s
Stephan Schröder
12/09/2022, 12:12 PM
won't the hardcoded seperator '/' in "META-INF/plugin.xml" make this code fail on Windows?? Or does