We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d609e92 commit cabd3fdCopy full SHA for cabd3fd
src/main/java/jenkins/plugins/git/traits/CloneOptionTrait.java
@@ -51,8 +51,10 @@ public CloneOptionTrait(CloneOption extension) {
51
52
@Override
53
protected void decorateContext(SCMSourceContext<?, ?> context) {
54
- CloneOption extension = getExtension();
55
- ((GitSCMSourceContext<?, ?>) context).shallow(extension.isShallow()).depth(extension.getDepth());
+ if (context instanceof GitSCMSourceContext gitContext) {
+ CloneOption extension = getExtension();
56
+ gitContext.shallow(extension.isShallow()).depth(extension.getDepth());
57
+ }
58
}
59
60
/**
0 commit comments