JiaLiangC opened a new pull request, #3861: URL: https://github.com/apache/ambari/pull/3861
## What changes were proposed in this pull request? This PR primarily addresses issues arising from the upgrade from JDK 8 to JDK 17, specifically related to Mockito's stricter 'when' matching, which caused some mocks to fail. Through debugging and comparing with JDK 8 code, nullable handling was implemented for potentially null values. Secondly, the upgrade made the Capture constructor private, preventing the creation of anonymous classes that override its setValue method through 'new Capture()'. The tests were rewritten to maintain the original test logic without changing the underlying implementation. ## How was this patch tested? unit tests, manual tests Please review [Ambari Contributing Guide](https://cwiki.apache.org/confluence/display/AMBARI/How+to+Contribute) before opening a pull request. -- 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...@ambari.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ambari.apache.org For additional commands, e-mail: dev-h...@ambari.apache.org