From 6a2e907e7d4c00ae673a054cc3c65feb24f559de Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Sun, 15 Oct 2017 18:38:39 -0400 Subject: [PATCH] [JENKINS-47416] ViewGroup.getUrl could throw NPE during deserialization, so do not call it from migrateLegacyPrimaryAllViewLocalizedName. --- core/src/main/java/hudson/model/AllView.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/hudson/model/AllView.java b/core/src/main/java/hudson/model/AllView.java index 8db2f352a1a2..4daedafd5a92 100644 --- a/core/src/main/java/hudson/model/AllView.java +++ b/core/src/main/java/hudson/model/AllView.java @@ -27,7 +27,6 @@ import java.util.Locale; import java.util.logging.Level; import java.util.logging.Logger; -import javax.annotation.CheckForNull; import javax.annotation.Nonnull; import jenkins.util.SystemProperties; import org.apache.commons.lang.StringUtils; @@ -121,7 +120,7 @@ protected void submit(StaplerRequest req) throws IOException, ServletException, * its name is one of the localized forms of {@link Messages#_Hudson_ViewName()} and the user has not opted out of * fixing the view name by setting the system property {@code hudson.mode.AllView.JENKINS-38606} to {@code false}. * Use this method to round-trip the primary view name, e.g. - * {@code primaryView = applyJenkins38606Fixup(views, primaryView)} + * {@code primaryView = migrateLegacyPrimaryAllViewLocalizedName(views, primaryView)} *

* NOTE: we can only fix the localized name of an {@link AllView} if it is the primary view as otherwise urls * would change, whereas the primary view is special and does not normally get accessed by the @@ -164,7 +163,7 @@ public static String migrateLegacyPrimaryAllViewLocalizedName(@Nonnull List