From 7133d1b983d7b85ba3c8dde26eb654c7ab695b07 Mon Sep 17 00:00:00 2001 From: Alexey Semenyuk Date: Mon, 21 Oct 2024 22:13:25 +0000 Subject: [PATCH] 8342609: jpackage test helper function incorrectly removes a directory instead of its contents only Reviewed-by: almatvee --- test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java index 297cf3ec36e..cd32f32f63d 100644 --- a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java +++ b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2024, 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 @@ -379,7 +379,7 @@ final public class TKit { try { final List paths; if (contentsOnly) { - try (var pathStream = Files.walk(root, 0)) { + try (var pathStream = Files.list(root)) { paths = pathStream.collect(Collectors.toList()); } } else {