提交 58a5d224 编写于 作者: A Alex Earl 提交者: Oleg Nenashev

[JENKINS-4610] - Remove historical CVS code in the ChangeLogParser initialization (#2248)

* Remove CVS historical code - JENKINS-4610

* Fix whitespace issue
上级 1047cd9e
......@@ -127,7 +127,6 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
/**
* SCM used for this build.
* Maybe null, for historical reason, in which case CVS is assumed.
*/
private ChangeLogParser scm;
......@@ -597,9 +596,6 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
AbstractProject<?, ?> project = build.getProject();
for (int retryCount=project.getScmCheckoutRetryCount(); ; retryCount--) {
// for historical reasons, null in the scm field means CVS, so we need to explicitly set this to something
// in case check out fails and leaves a broken changelog.xml behind.
// see http://www.nabble.com/CVSChangeLogSet.parse-yields-SAXParseExceptions-when-parsing-bad-*AccuRev*-changelog.xml-files-td22213663.html
build.scm = NullChangeLogParser.INSTANCE;
try {
......@@ -870,20 +866,7 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
public ChangeLogSet<? extends Entry> getChangeSet() {
synchronized (changeSetLock) {
if (scm==null) {
// for historical reason, null means CVS.
try {
Class<?> c = Jenkins.getInstance().getPluginManager().uberClassLoader.loadClass("hudson.scm.CVSChangeLogParser");
scm = (ChangeLogParser)c.newInstance();
} catch (ClassNotFoundException e) {
// if CVS isn't available, fall back to something non-null.
scm = NullChangeLogParser.INSTANCE;
} catch (InstantiationException e) {
scm = NullChangeLogParser.INSTANCE;
throw (Error)new InstantiationError().initCause(e);
} catch (IllegalAccessException e) {
scm = NullChangeLogParser.INSTANCE;
throw (Error)new IllegalAccessError().initCause(e);
}
scm = NullChangeLogParser.INSTANCE;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册