On Fri, 14 Nov 2025 18:54:13 GMT, Alexey Semenyuk <[email protected]> wrote:

>> src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/StandardValidator.java
>>  line 48:
>> 
>>> 46:     static final Predicate<Path> IS_DIRECTORY = Files::isDirectory;
>>> 47: 
>>> 48:     static final Predicate<Path> IS_EXISTENT_NOT_DIRECTORY = path -> {
>> 
>> `IS_EXISTENT_NOT_DIRECTORY` will be same as `IS_REGULAR_FILE`? And just do 
>> `return Files. isRegularFile(path)`.
>
> `IS_EXISTENT_NOT_DIRECTORY` means it can be a regular file or a symlink.

In this case should it be something like below? Sounds more clear to me.

``` 
static final Predicate<Path> IS_FILE_OR_SYMLINK = path -> {
        return Files.isRegularFile(path) || Files.isSymbolicLink(path);
};

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28163#discussion_r2529319956

Reply via email to