Skip to content

Fix type casting in PluginSpec for ConfigScope [ci fast]#6469

Merged
pditommaso merged 1 commit intomasterfrom
fix-plugin-spec-type-safety
Oct 10, 2025
Merged

Fix type casting in PluginSpec for ConfigScope [ci fast]#6469
pditommaso merged 1 commit intomasterfrom
fix-plugin-spec-type-safety

Conversation

@pditommaso
Copy link
Member

Summary

This PR improves type safety in the PluginSpec class by replacing an unsafe cast with explicit type checking and casting when loading ConfigScope extension points.

Changes

  • Replace direct cast (Class<? extends ConfigScope>) on line 49 with deferred casting after type check
  • Cast is now performed after isAssignableFrom check ensures the class is actually a ConfigScope implementation
  • Prevents potential ClassCastException when loading classes that may not be ConfigScope implementations

Files Changed

  • modules/nextflow/src/main/groovy/nextflow/plugin/spec/PluginSpec.groovy

🤖 Generated with Claude Code

Replace unsafe cast with explicit type checking and casting to ensure
type safety when loading ConfigScope extension points. This prevents
potential ClassCastException when loading classes that may not be
ConfigScope implementations.

Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
@netlify
Copy link

netlify bot commented Oct 10, 2025

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 78eb9c8
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/68e8fe180f4b310008edb927

pditommaso referenced this pull request Oct 10, 2025
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
@pditommaso pditommaso merged commit b00644c into master Oct 10, 2025
11 checks passed
@pditommaso pditommaso deleted the fix-plugin-spec-type-safety branch October 10, 2025 12:49
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