Skip to content
Permalink
Browse files
[JENKINS-4610] - Remove historical CVS code in the ChangeLogParser in…
…itialization (#2248)

* Remove CVS historical code - JENKINS-4610

* Fix whitespace issue
  • Loading branch information
slide authored and oleg-nenashev committed May 11, 2016
1 parent 1047cd9 commit 58a5d2249deb2abfa6e0c4e7854ac2fc2f3fc1b7
Showing with 1 addition and 18 deletions.
  1. +1 −18 core/src/main/java/hudson/model/AbstractBuild.java
@@ -127,7 +127,6 @@

/**
* SCM used for this build.
* Maybe null, for historical reason, in which case CVS is assumed.
*/
private ChangeLogParser scm;

@@ -597,9 +596,6 @@ public void defaultCheckout() throws IOException, InterruptedException {
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 @@ protected final boolean preBuild(BuildListener listener,Iterable<? extends Build
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;
}
}

0 comments on commit 58a5d22

Please sign in to comment.