Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-47416] Do not call ViewGroup.getUrl from migrateLegacyPrimaryAllViewLocalizedName #3088

Merged
merged 1 commit into from
Oct 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions core/src/main/java/hudson/model/AllView.java
Original file line number Diff line number Diff line change
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