Skip to content

Commit

Permalink
Merge pull request #3088 from jglick/JENKINS-47416
Browse files Browse the repository at this point in the history
[JENKINS-47416] Do not call ViewGroup.getUrl from migrateLegacyPrimaryAllViewLocalizedName
  • Loading branch information
jglick committed Oct 17, 2017
2 parents 3be716b + 6a2e907 commit 8ac33fd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/src/main/java/hudson/model/AllView.java
Expand Up @@ -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;
Expand Down Expand Up @@ -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)}
* <p>
* 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
Expand Down Expand Up @@ -164,7 +163,7 @@ public static String migrateLegacyPrimaryAllViewLocalizedName(@Nonnull List<View
// bingo JENKINS-38606 detected
LOGGER.log(Level.INFO,
"JENKINS-38606 detected for AllView in {0}; renaming view from {1} to {2}",
new Object[]{allView.owner.getUrl(), primaryView, DEFAULT_VIEW_NAME});
new Object[] {allView.owner, primaryView, DEFAULT_VIEW_NAME});
allView.name = DEFAULT_VIEW_NAME;
return DEFAULT_VIEW_NAME;
}
Expand Down

0 comments on commit 8ac33fd

Please sign in to comment.