Permalink
Browse files

Use configured server URL instead of resolved one. Fixes JENKINS-22279

  • Loading branch information...
dlindner committed Mar 25, 2014
1 parent 196ddf9 commit d6431ab28fa474c98443126f66364b5cb3394cb5
Showing with 4 additions and 6 deletions.
  1. +4 −6 src/main/java/hudson/plugins/crap4j/CrapBuildResult.java
@@ -1,14 +1,15 @@
package hudson.plugins.crap4j;

import com.thoughtworks.xstream.XStream;
import hudson.XmlFile;
import hudson.model.AbstractBuild;
import hudson.model.Hudson;
import hudson.model.ModelObject;
import hudson.plugins.crap4j.display.DecreasingCrapLoadComparator;
import hudson.plugins.crap4j.model.ICrapMethodPresentation;
import hudson.plugins.crap4j.model.IMethodCrap;
import hudson.plugins.crap4j.model.ProjectCrapBean;
import hudson.util.XStream2;

import java.io.File;
import java.io.IOException;
import java.lang.ref.WeakReference;
@@ -18,13 +19,10 @@
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;

import jenkins.model.Jenkins;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;

import com.thoughtworks.xstream.XStream;
import hudson.model.Hudson;

public class CrapBuildResult implements ModelObject, ICrapMethodPresentation {

private transient WeakReference<ProjectCrapBean> crap;
@@ -92,7 +90,7 @@ public String getDisplayName() {

//@Override
public String getTitle() {
return "All Crappy Methods for <a href=\"" + Hudson.getInstance().getRootUrlFromRequest() + getOwner().getUrl() + "\">" + getOwner().getDisplayName() + "</a>";
return "All Crappy Methods for <a href=\"" + Jenkins.getInstance().getRootUrl() + getOwner().getUrl() + "\">" + getOwner().getDisplayName() + "</a>";
}

//@Override

0 comments on commit d6431ab

Please sign in to comment.