提交 3e0b5a63 编写于 作者: A alanharder

Remove old fields that have been deprecated since before 1.100

tasks.Mailer          from,subject,failureOnly,charset 1.10
model.Project         slave                            1.60
model.Descriptor      properties                       1.62
model.Slave           command,localFS                  1.69
model.AbstractProject enableRemoteTrigger              1.77
model.FingerprintMap  core                             1.91
If anyone still has very old XML with these, OldDataMonitor will
still handle it (as unreadable data instead of old data, and
with a bit more noise in the log).
上级 f1f1e162
......@@ -100,7 +100,6 @@ import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
......@@ -201,11 +200,6 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
*/
private volatile String jdk;
/**
* @deprecated since 2007-01-29.
*/
private transient boolean enableRemoteTrigger;
private volatile BuildAuthorizationToken authToken = null;
/**
......@@ -253,8 +247,6 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
}
});
// boolean! Can't tell if xml file contained false..
if (enableRemoteTrigger) OldDataMonitor.report(this, "1.77");
if(triggers==null) {
// it didn't exist in < 1.28
triggers = new Vector<Trigger<?>>();
......
......@@ -29,9 +29,6 @@ import hudson.XmlFile;
import hudson.BulkChange;
import hudson.Util;
import static hudson.Functions.jsStringEscape;
import hudson.diagnosis.OldDataMonitor;
import hudson.init.InitMilestone;
import hudson.init.Initializer;
import hudson.model.listeners.SaveableListener;
import hudson.util.ReflectionUtils;
import hudson.util.ReflectionUtils.Parameter;
......@@ -43,14 +40,12 @@ import org.springframework.util.StringUtils;
import org.jvnet.tiger_types.Types;
import org.apache.commons.io.IOUtils;
import static hudson.init.InitMilestone.EXTENSIONS_AUGMENTED;
import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND;
import javax.servlet.ServletException;
import javax.servlet.RequestDispatcher;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedHashMap;
......@@ -118,16 +113,6 @@ import java.beans.Introspector;
* @see Describable
*/
public abstract class Descriptor<T extends Describable<T>> implements Saveable {
/**
* Up to Hudson 1.61 this was used as the primary persistence mechanism.
* Going forward Hudson simply persists all the non-transient fields
* of {@link Descriptor}, just like others, so this is pointless.
*
* @deprecated since 2006-11-16
*/
@Deprecated
private transient Map<String,Object> properties;
/**
* The class being described by this descriptor.
*/
......@@ -881,10 +866,4 @@ public abstract class Descriptor<T extends Describable<T>> implements Saveable {
* Used in {@link #checkMethods} to indicate that there's no check method.
*/
private static final String NONE = "\u0000";
private Object readResolve() {
if (properties!=null)
OldDataMonitor.report(this, "1.62");
return this;
}
}
/*
* The MIT License
*
* Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi
* Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
......@@ -24,13 +24,11 @@
package hudson.model;
import hudson.Util;
import hudson.diagnosis.OldDataMonitor;
import hudson.util.KeyedDataStorage;
import java.io.File;
import java.io.IOException;
import java.util.Locale;
import java.util.concurrent.ConcurrentHashMap;
/**
* Cache of {@link Fingerprint}s.
......@@ -45,14 +43,6 @@ import java.util.concurrent.ConcurrentHashMap;
*/
public final class FingerprintMap extends KeyedDataStorage<Fingerprint,FingerprintParams> {
/**
* @deprecated since 2007-03-26.
* Some old version of Hudson incorrectly serialized this information to the disk.
* So we need this field to be here for such configuration to be read correctly.
* This field is otherwise no longer in use.
*/
private transient ConcurrentHashMap<String,Object> core = new ConcurrentHashMap<String,Object>();
/**
* Returns true if there's some data in the fingerprint database.
*/
......@@ -102,11 +92,6 @@ public final class FingerprintMap extends KeyedDataStorage<Fingerprint,Fingerpri
protected Fingerprint load(String key) throws IOException {
return Fingerprint.load(toByteArray(key));
}
private Object readResolve() {
if (core != null) OldDataMonitor.report(Hudson.getInstance(), "1.91");
return this;
}
}
class FingerprintParams {
......
/*
* The MIT License
*
* Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi, Jorg Heymans, Stephen Connolly, Tom Huybrechts
* Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi,
* Jorg Heymans, Stephen Connolly, Tom Huybrechts
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
......@@ -212,16 +213,4 @@ public abstract class Project<P extends Project<P,B>,B extends Build<P,B>>
return r;
}
/**
* @deprecated since 2006-11-05.
* Left for legacy config file compatibility
*/
@Deprecated
private transient String slave;
private Object readResolve() {
if (slave != null) OldDataMonitor.report(this, "1.60");
return this;
}
}
/*
* The MIT License
*
* Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi, Erik Ramfelt, Martin Eigenbrodt, Stephen Connolly, Tom Huybrechts
* Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi,
* Erik Ramfelt, Martin Eigenbrodt, Stephen Connolly, Tom Huybrechts
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
......@@ -27,7 +28,6 @@ import hudson.FilePath;
import hudson.Launcher;
import hudson.Util;
import hudson.Launcher.RemoteLauncher;
import hudson.diagnosis.OldDataMonitor;
import hudson.model.Descriptor.FormException;
import hudson.remoting.Callable;
import hudson.remoting.VirtualChannel;
......@@ -337,12 +337,6 @@ public abstract class Slave extends Node implements Serializable {
*/
private Object readResolve() {
// convert the old format to the new one
if(command!=null && agentCommand==null) {
if(command.length()>0) command += ' ';
agentCommand = command+"java -jar ~/bin/slave.jar";
}
if (command!=null || localFS!=null)
OldDataMonitor.report(Hudson.getInstance(), "1.69");
if (launcher == null) {
launcher = (agentCommand == null || agentCommand.trim().length() == 0)
? new JNLPLauncher()
......@@ -383,26 +377,10 @@ public abstract class Slave extends Node implements Serializable {
//
// backward compatibility
//
/**
* In Hudson < 1.69 this was used to store the local file path
* to the remote workspace. No longer in use.
*
* @deprecated
* ... but still in use during the transition.
*/
private File localFS;
/**
* In Hudson < 1.69 this was used to store the command
* to connect to the remote machine, like "ssh myslave".
*
* @deprecated
*/
private transient String command;
/**
* Command line to launch the agent, like
* "ssh myslave java -jar /path/to/hudson-remoting.jar"
* @deprecated in 1.216
*/
private transient String agentCommand;
......
/*
* The MIT License
*
* Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi,
* Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi,
* Bruce Chapman, Erik Ramfelt, Jean-Baptiste Quenot, Luca Domenico Milanesio
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
......@@ -30,7 +30,6 @@ import hudson.Functions;
import hudson.Launcher;
import hudson.RestrictedSince;
import hudson.Util;
import hudson.diagnosis.OldDataMonitor;
import static hudson.Util.fixEmptyAndTrim;
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
......@@ -40,14 +39,12 @@ import hudson.model.UserPropertyDescriptor;
import hudson.model.Hudson;
import hudson.util.FormValidation;
import hudson.util.Secret;
import hudson.util.XStream2;
import org.apache.tools.ant.types.selectors.SelectorUtils;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.export.Exported;
import com.thoughtworks.xstream.converters.UnmarshallingContext;
import javax.mail.Authenticator;
import javax.mail.Message;
......@@ -93,13 +90,6 @@ public class Mailer extends Notifier {
*/
public boolean sendToIndividuals;
// TODO: left so that XStream won't get angry. figure out how to set the error handling behavior
// in XStream. Deprecated since 2005-04-23.
private transient String from;
private transient String subject;
private transient boolean failureOnly;
private transient String charset;
@Override
public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException {
if(debug)
......@@ -516,12 +506,4 @@ public class Mailer extends Notifier {
* Debug probe point to be activated by the scripting console.
*/
public static boolean debug = false;
public static class ConverterImpl extends XStream2.PassthruConverter<Mailer> {
public ConverterImpl(XStream2 xstream) { super(xstream); }
@Override protected void callback(Mailer m, UnmarshallingContext context) {
if (m.from != null || m.subject != null || m.failureOnly || m.charset != null)
OldDataMonitor.report(context, "1.10");
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册