Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 17, 2025

Problem

The DockerAvailableCondition class was failing to compile with the following error:

e: Class 'DockerAvailableCondition' is not abstract and does not implement abstract member:
fun evaluateExecutionCondition(context: ExtensionContext): ConditionEvaluationResult

e: 'evaluateExecutionCondition' overrides nothing. Potential signatures for overriding:
fun evaluateExecutionCondition(context: ExtensionContext): ConditionEvaluationResult

Root Cause

The evaluateExecutionCondition method was defined with a nullable ExtensionContext? parameter, but the ExecutionCondition interface in JUnit Jupiter 6.0.0 requires a non-nullable ExtensionContext parameter. This signature mismatch prevented the method from properly overriding the abstract method from the interface.

Solution

Changed the parameter type from nullable to non-nullable to match the interface signature:

// Before
override fun evaluateExecutionCondition(context: ExtensionContext?): ConditionEvaluationResult

// After
override fun evaluateExecutionCondition(context: ExtensionContext): ConditionEvaluationResult

Testing

  • ✅ Compilation successful
  • ✅ All 247 existing tests pass
  • ✅ Full build completes without errors
  • ✅ No new security vulnerabilities introduced

This is a minimal fix that only changes the parameter nullability to align with the JUnit Jupiter API requirements.

Original prompt

Fix the compilation error:

e: file:///home/runner/work/gradle-release-plugin/gradle-release-plugin/release-plugin/src/test/kotlin/io/github/simonhauck/release/testdriver/DockerAvailableCondition.kt:9:1 Class 'DockerAvailableCondition' is not abstract and does not implement abstract member:
fun evaluateExecutionCondition(context: ExtensionContext): ConditionEvaluationResult
e: file:///home/runner/work/gradle-release-plugin/gradle-release-plugin/release-plugin/src/test/kotlin/io/github/simonhauck/release/testdriver/DockerAvailableCondition.kt:11:5 'evaluateExecutionCondition' overrides nothing. Potential signatures for overriding:
fun evaluateExecutionCondition(context: ExtensionContext): ConditionEvaluationResult


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Fix compilation error in DockerAvailableCondition class Fix DockerAvailableCondition compilation error with JUnit Jupiter 6.0.0 Oct 17, 2025
@Copilot Copilot AI requested a review from simonhauck October 17, 2025 19:48
Copilot finished work on behalf of simonhauck October 17, 2025 19:48
@simonhauck simonhauck marked this pull request as ready for review October 20, 2025 06:30
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.

2 participants