On Fri, 28 Nov 2025 18:30:29 GMT, Francisco Ferrari Bihurriet <[email protected]> wrote:
>> We can make this an `InternalError`, the most common failure case is one of >> the two files nonexistence. So before proceeding I want to make sure you are >> aware that this would make the following filesystem race-condition >> noticeable: >> >> 1. File **A** is included, _OpenJDK_ starts reading it >> 2. File **A** is deleted by an administrator who is changing the settings >> * But _OpenJDK_ keeps it open, this is possible in _Linux_ >> 3. File **B** is included, _OpenJDK_ wants to check for a circular inclusion >> 4. `Files.isSameFile(path, activePath)` throws `IOException` when `path` is >> file **B** and `activePath` is file **A** (now deleted) >> 5. `IOException` isn't ignored but wrapped in an `InternalError` and thrown >> >> Current code wouldn't fail in this scenario, although I recognize it's a >> corner case. I decided to ignore the exception under the assumption that >> `Files.isSameFile(x, y)` can be treated as `false` in this context for cases >> in which either `x` or `y` is nonexistent. > > Addressed in 4e7206c082e4b0152d999b32eba0063a506eff67. Ok, thanks for the explanation. I agree it is a rare case, but now I think maybe a debug statement is better than throwing an `InternalError` since it seems like the code can still recover and continue w/o unexpected behavior - would you agree? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24465#discussion_r2581303847
