From efa072c23273f7d8f8394eb5d498d9c5cfaf2ca2 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Fri, 25 May 2007 22:41:50 +0000 Subject: [PATCH] fixed NPE as reported in http://www.nabble.com/Possible-NPE-bug--tf3793595.html git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3351 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/scm/SCMS.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/scm/SCMS.java b/core/src/main/java/hudson/scm/SCMS.java index 1f28e02094..ee4c3e31d4 100644 --- a/core/src/main/java/hudson/scm/SCMS.java +++ b/core/src/main/java/hudson/scm/SCMS.java @@ -28,7 +28,7 @@ public class SCMS { */ public static SCM parseSCM(StaplerRequest req) throws FormException { String scm = req.getParameter("scm"); - if(scm==null) return null; + if(scm==null) return new NullSCM(); int scmidx = Integer.parseInt(scm); SCMDescriptor d = SCMS.get(scmidx);