This repository contains all the source code examples from my LiveLessons course on "Java Concurrent Programming" and my various LiveTraining courses, as described at http://www.dre.vanderbilt.edu/~schmidt/DigitalLearning.
596
stars
665
forks
source link
Some minor edits that you can review and cherry pick from. #4
Upgraded gradle build to latest wrapper and increased Jack tool-chain memory for compiling.
.collect(Collectors.toList()) call in ImageStreamCompletableFuture1 didn't really make sense unless the entire chain returns the list ... so I added that and then simply used it to print out the count of images like in the other example solutions. Perhaps I'm wrong and you need the .collect() even though you don't use it's result, but I could not find anywhere in the documentation that says it's mandatory...
I found the .filter(this:notUrlCached) to be confusing particularly when I went to read this "negative" function implementation. So I wanted to see if you think it might be clearer to use a "not" predicate instead. I will understand if you don't like it, but I thought it made the code a wee bit more readable.
Some minor lint issues fixed.
Upgraded gradle build to latest wrapper and increased Jack tool-chain memory for compiling.
.collect(Collectors.toList()) call in ImageStreamCompletableFuture1 didn't really make sense unless the entire chain returns the list ... so I added that and then simply used it to print out the count of images like in the other example solutions. Perhaps I'm wrong and you need the .collect() even though you don't use it's result, but I could not find anywhere in the documentation that says it's mandatory...
I found the .filter(this:notUrlCached) to be confusing particularly when I went to read this "negative" function implementation. So I wanted to see if you think it might be clearer to use a "not" predicate instead. I will understand if you don't like it, but I thought it made the code a wee bit more readable.