Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[JENKINS-43507] Prevent java.lang.AbstractMethodError when used as a …
…test dependency against older Jenkins
- Loading branch information
Showing
with
8 additions
and
1 deletion.
-
+8
−1
src/main/java/jenkins/branch/ProjectNameProperty.java
|
@@ -28,6 +28,7 @@ |
|
|
import com.cloudbees.hudson.plugins.folder.AbstractFolder; |
|
|
import com.cloudbees.hudson.plugins.folder.AbstractFolderProperty; |
|
|
import com.cloudbees.hudson.plugins.folder.AbstractFolderPropertyDescriptor; |
|
|
import edu.umd.cs.findbugs.annotations.NonNull; |
|
|
import hudson.Extension; |
|
|
import hudson.model.Descriptor; |
|
|
import jenkins.scm.api.SCMNavigator; |
|
@@ -48,7 +49,7 @@ |
|
|
* |
|
|
* @since 2.0.0 |
|
|
*/ |
|
|
public class ProjectNameProperty extends AbstractFolderProperty<MultiBranchProject<?,?>> { |
|
|
public class ProjectNameProperty extends AbstractFolderProperty<MultiBranchProject<?, ?>> { |
|
|
|
|
|
private final String name; |
|
|
|
|
@@ -67,6 +68,12 @@ public String getName() { |
|
|
|
|
|
@Extension |
|
|
public static class DescriptorImpl extends AbstractFolderPropertyDescriptor { |
|
|
@NonNull |
|
|
@Override |
|
|
public String getDisplayName() { |
|
|
return "Project name"; |
|
|
} |
|
|
|
|
|
@Override |
|
|
public boolean isApplicable(Class<? extends AbstractFolder> containerType) { |
|
|
return MultiBranchProject.class.isAssignableFrom(containerType); |
|
|