Re: [GitHub] [roller] mbien opened a new pull request #96: Deprections, compiler warning fixes, local refactorings and JDK 17 support

Greg Huber <[email protected]> Sun, 11 Jul 2021 07:45:51 +0100
Newsgroups gmane.comp.java.roller.devel
Message-ID <[email protected]>
Maybe more of a java question, how do these streams get closed as 
wrappers are in used in the templates?

org.apache.roller.weblogger.pojos.wrapper;

public List<WeblogEntryWrapper> retrieveWeblogEntries(boolean 
publishedOnly) throws WebloggerException {
         return this.pojo.retrieveWeblogEntries(publishedOnly).stream()
                 .map(entry -> WeblogEntryWrapper.wrap(entry, urlStrategy))
                 .collect(Collectors.toList());

}

I always use a try-with-resources on these.


On 10/07/2021 11:03, GitBox wrote:
> mbien opened a new pull request #96:
> URL: https://github.com/apache/roller/pull/96
>
>
>     Worked myself though the compiler warnings. This looks like a lot of changes, but the individual changes are all very local.
>     
>     * since most of the rawtype warnings were on Collections, I updated a lot of the code to use more modern APIs instead of only fixing the warnings (e.g List.of, streams, ...)
>     * extracted common reflection code to a utility class
>     * got rid of some deprecations
>     * some cleanup and improvements (~400 lines less code)
>     * JDK 17 support (runs still on 11)
>
>