Skip to content

Commit ac22219

Browse files
committed
8342609: jpackage test helper function incorrectly removes a directory instead of its contents only
Backport-of: 7133d1b983d7b85ba3c8dde26eb654c7ab695b07
1 parent 6ef13ab commit ac22219

File tree

1 file changed

+2
-2
lines changed
  • test/jdk/tools/jpackage/helpers/jdk/jpackage/test

1 file changed

+2
-2
lines changed

test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -370,7 +370,7 @@ public void accept(Path root) {
370370
try {
371371
final List<Path> paths;
372372
if (contentsOnly) {
373-
try (var pathStream = Files.walk(root, 0)) {
373+
try (var pathStream = Files.list(root)) {
374374
paths = pathStream.collect(Collectors.toList());
375375
}
376376
} else {

0 commit comments

Comments
 (0)