slachiewicz opened a new pull request, #1878:
URL: https://github.com/apache/maven-mvnd/pull/1878

   Fixes #1490. On the JetBrains Runtime, `java.io.File`'s file system is 
`java.io.IoOverNioFileSystem`, whose only field is `parent` (the platform 
`UnixFileSystem`), so `EnvHelper.chDir()` failed with `NoSuchFieldException: 
userDir` and every build logged "Environment mismatch". The exception also 
stopped `chDir()` before it moved the NIO default directory, so relative 
`Path`s and `File`s kept resolving against the daemon's previous directory. 
`chDir()` now looks for `userDir` up the class hierarchy and follows a 
delegating `java.io.FileSystem` field.
   
   Verified: `EnvHelperTest` on unmodified master under JBR 21.0.9 → 
`testChdir` errors with `NoSuchFieldException: userDir` and `testSetEnv` fails 
with the warning; with the change → 0 failures, 0 errors on JBR 21.0.9, 
Corretto 21.0.12 and Temurin 25.0.4 (macOS)
   
   ---
   
   - [ ] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
   - [x] I hereby declare that I have filed an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to