Skip to content

Dev/pex refactoring #853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

Dev/pex refactoring #853

wants to merge 3 commits into from

Conversation

ankushdesai
Copy link
Member

No description provided.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors execution and error handling logic in the PEx runtime while enhancing test driver initialization.

  • Refactored RuntimeExecutor code: streamlined thread cancellation, task monitoring, and exception handling with helper methods.
  • Updated PEx main and auxiliary methods: improved environment initialization and error messaging for driver selection and runtime errors.

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
Src/PEx/src/main/java/pex/RuntimeExecutor.java Refactored thread management, task monitoring, and error handling functions.
Src/PEx/src/main/java/pex/PEx.java Enhanced environment initialization, test driver lookup, and exit code handling.
Files not reviewed (1)
  • Src/PEx/pom.xml: Language not supported

* @param resultException Exception to store any error encountered
* @return true if all tasks are completed
*/
private static boolean checkAndProcessCompletedTasks(Set<Integer> completedTasks, Exception resultException) {
Copy link
Preview

Copilot AI Apr 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method 'checkAndProcessCompletedTasks' reassigns the parameter 'resultException' in the catch blocks, but these changes will not propagate back to the caller due to Java's pass-by-value semantics. Consider using a mutable wrapper for the exception or returning an object that encapsulates both the completion status and any exception encountered.

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant