Replaced own walkFileTree with correct implementation from nnio package. #12964
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is another fix for that nullpointer issue as in #12476 (#12467)
Apparently there was a custom implementation of the same walkFileTree-function inside of the code, suprise still had the bug.
The new function, as per nnio lib is Files.java which contains the null checks:
(Edit: replaced with actual new source code from 0.3.1)
instead of the one in the file.
Functionally nothing should change, since visitFileFailed gets modified, that it continues no matter what, which is the only real change in the function.
This also somehow slipped by, because the dev build 20240209 worked only with the nnio version update for some reason.
Got reason:
#12323 added back the broken code without the null check (caused by nnio lib 0.3 not being spec by ignoring not getting FileVisitResult.CONTINUE and therefore needing to modify the loop function (this is fixed in nnio 0.3.1)
Here are the changes in nnio 0.3.1: #5
Also here is a stack trace of the issue: