advancedxy opened a new issue, #559: URL: https://github.com/apache/incubator-uniffle/issues/559
### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) ### Search before asking - [X] I have searched in the [issues](https://github.com/apache/incubator-uniffle/issues?q=is%3Aissue) and found no similar issues. ### What would you like to be improved? Currently `setEnv` is defined as below ``` @SuppressWarnings("unchecked") public static void setEnv(String key, String value) { try { Map<String, String> env = System.getenv(); Class<?> cl = env.getClass(); Field field = cl.getDeclaredField("m"); field.setAccessible(true); Map<String, String> writableEnv = (Map<String, String>) field.get(env); if (value != null) { writableEnv.put(key, value); } else { writableEnv.remove(key); } } catch (Exception e) { throw new IllegalStateException("Failed to set environment variable", e); } } ``` which is not idiomatic Java. We should use https://www.baeldung.com/java-system-stubs#3-junit-5-environment-variables instead. ### How should we improve? _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! -- 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: dev-unsubscr...@uniffle.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org