Address the same problem as in #26224 but for the `listFiles` variants with a filter parameter.
------------- Commit messages: - 8362429: AssertionError in File.listFiles(FileFilter | FilenameFilter) Changes: https://git.openjdk.org/jdk/pull/26353/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26353&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8362429 Stats: 42 lines in 2 files changed: 32 ins; 0 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/26353.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26353/head:pull/26353 PR: https://git.openjdk.org/jdk/pull/26353