File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
java/client/src/org/openqa/selenium/tools/javadoc Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 42
42
import java .util .Locale ;
43
43
import java .util .Set ;
44
44
import java .util .stream .Collectors ;
45
+ import java .util .stream .Stream ;
45
46
import java .util .zip .ZipEntry ;
46
47
import java .util .zip .ZipInputStream ;
47
48
import java .util .zip .ZipOutputStream ;
@@ -132,9 +133,9 @@ public static void main(String[] args) throws IOException {
132
133
}
133
134
134
135
try (OutputStream os = Files .newOutputStream (out );
135
- ZipOutputStream zos = new ZipOutputStream (os )) {
136
- Files .walk (outputTo )
137
- .sorted (Comparator .naturalOrder ())
136
+ ZipOutputStream zos = new ZipOutputStream (os );
137
+ Stream < Path > walk = Files .walk (outputTo )) {
138
+ walk .sorted (Comparator .naturalOrder ())
138
139
.forEachOrdered (path -> {
139
140
if (path .equals (outputTo )) {
140
141
return ;
@@ -163,9 +164,8 @@ public static void main(String[] args) throws IOException {
163
164
}
164
165
} finally {
165
166
tempDirs .forEach (d -> {
166
- try {
167
- Files .walk (d )
168
- .sorted (Comparator .reverseOrder ())
167
+ try (Stream <Path > walk = Files .walk (d )) {
168
+ walk .sorted (Comparator .reverseOrder ())
169
169
.map (Path ::toFile )
170
170
.forEach (File ::delete );
171
171
} catch (IOException e ) {
You can’t perform that action at this time.
0 commit comments