8277535: Remove redundant Stream.distinct()/sorted() steps

Reviewed-by: prappo
This commit is contained in:
Andrey Turbanov 2022-01-20 18:11:55 +00:00
parent d48279b0bf
commit 3419ff7ba7
3 changed files with 2 additions and 6 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -527,7 +527,6 @@ public class ModulePath implements ModuleFinder {
Set<String> packages = classFiles.stream()
.map(this::toPackageName)
.flatMap(Optional::stream)
.distinct()
.collect(Collectors.toSet());
// all packages are exported and open