diff --git a/src/main/java/com/sonyericsson/jenkins/plugins/bfa/PluginImpl.java b/src/main/java/com/sonyericsson/jenkins/plugins/bfa/PluginImpl.java index 857c7542..9428c248 100644 --- a/src/main/java/com/sonyericsson/jenkins/plugins/bfa/PluginImpl.java +++ b/src/main/java/com/sonyericsson/jenkins/plugins/bfa/PluginImpl.java @@ -43,8 +43,6 @@ import hudson.security.PermissionGroup; import hudson.util.CopyOnWriteList; import net.sf.json.JSONObject; -import hudson.tasks.Mailer; -import org.kohsuke.stapler.Stapler; import org.kohsuke.stapler.StaplerRequest; import java.io.IOException; @@ -244,20 +242,7 @@ public static String getImageUrl(String size, String name) { * @return a URL to the image. */ public static String getFullImageUrl(String size, String name) { - String url = Mailer.descriptor().getUrl(); - if (url != null) { - String contextPath = ""; - StaplerRequest currentRequest = Stapler.getCurrentRequest(); - if (currentRequest != null) { - contextPath = currentRequest.getContextPath(); - } - if (contextPath.startsWith("/")) { - contextPath = contextPath.substring(1); - } - return Hudson.getInstance().getRootUrl() + contextPath + getImageUrl(size, name); - } - return Hudson.getInstance().getRootUrlFromRequest() + getStaticImagesBase() - + "/" + size + "/" + name; + return Hudson.getInstance().getRootUrl() + getImageUrl(size, name); } /**