public void setUrl(@CheckForNull String jenkinsUrl) { String url = Util.nullify(jenkinsUrl); if(url!=null && !url.endsWith("/")) url += '/'; this.jenkinsUrl = url; save(); updateSecureSessionFlag(); }
@Override public synchronized void load() { // for backward compatibility, if we don't have our own data yet, then // load from Mailer. XmlFile file = getConfigFile(); if(!file.exists()) { XStream2 xs = new XStream2(); xs.addCompatibilityAlias("hudson.tasks.Mailer$DescriptorImpl",JenkinsLocationConfiguration.class); file = new XmlFile(xs,new File(Jenkins.get().getRootDir(),"hudson.tasks.Mailer.xml")); if (file.exists()) { try { file.unmarshal(this); if (jenkinsUrl==null) jenkinsUrl = hudsonUrl; } catch (IOException e) { LOGGER.log(Level.WARNING, "Failed to load "+file, e); } } } else { super.load(); } updateSecureSessionFlag(); }
public void setUrl(@CheckForNull String jenkinsUrl) { String url = Util.nullify(jenkinsUrl); if(url!=null && !url.endsWith("/")) url += '/'; this.jenkinsUrl = url; save(); updateSecureSessionFlag(); }
@Override public synchronized void load() { // for backward compatibility, if we don't have our own data yet, then // load from Mailer. XmlFile file = getConfigFile(); if(!file.exists()) { XStream2 xs = new XStream2(); xs.addCompatibilityAlias("hudson.tasks.Mailer$DescriptorImpl",JenkinsLocationConfiguration.class); file = new XmlFile(xs,new File(Jenkins.getInstance().getRootDir(),"hudson.tasks.Mailer.xml")); if (file.exists()) { try { file.unmarshal(this); if (jenkinsUrl==null) jenkinsUrl = hudsonUrl; } catch (IOException e) { LOGGER.log(Level.WARNING, "Failed to load "+file, e); } } } else { super.load(); } updateSecureSessionFlag(); }