jelmini commented on pull request #486: URL: https://github.com/apache/jackrabbit-oak/pull/486#issuecomment-1033997666
@smiroslav I had to introduce the `Environment` class to be able to test the code. Mockito cannot mock `System.getenv()` because it's a system class. Alternatively, it's possible to hack a workaround using reflection to obtain the underlying mutable Map from `System.getenv()`. This works with Java up until 15 with a big warning, but stops working from Java 16 forward (because "illegal reflective access" really becomes illegal). Is there another approach for testing this code you could suggest? -- 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]
