mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-20 07:22:32 +00:00
version can be null.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@8649 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
4bc6410a32
commit
23293f9a63
2 files changed
+3
-2
No files matched your search
@@ -715,7 +715,7 @@ public class Functions {
|
||||
*
|
||||
* @since 1.150
|
||||
*/
|
||||
public static Object defaulted(Object value, Object defaultValue) {
|
||||
public static <T> T defaulted(T value, T defaultValue) {
|
||||
return value!=null ? value : defaultValue;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import hudson.CopyOnWrite;
|
||||
import hudson.FilePath;
|
||||
import hudson.StructuredForm;
|
||||
import hudson.Util;
|
||||
import hudson.Functions;
|
||||
import hudson.maven.reporters.MavenMailer;
|
||||
import hudson.model.AbstractProject;
|
||||
import hudson.model.Action;
|
||||
@@ -243,7 +244,7 @@ public final class MavenModule extends AbstractMavenProject<MavenModule,MavenBui
|
||||
* Gets groupId+artifactId+version as {@link ModuleDependency}.
|
||||
*/
|
||||
public ModuleDependency asDependency() {
|
||||
return new ModuleDependency(moduleName,version);
|
||||
return new ModuleDependency(moduleName,Functions.defaulted(version,ModuleDependency.UNKNOWN));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user