Skip to content

Commit

Permalink
[JENKINS-4610] - Remove historical CVS code in the ChangeLogParser in…
Browse files Browse the repository at this point in the history
…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 58a5d22
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions core/src/main/java/hudson/model/AbstractBuild.java
Expand Up @@ -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;

Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -870,20 +866,7 @@ public Collection<Fingerprint> getBuildFingerprints() {
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;
}
}

Expand Down

0 comments on commit 58a5d22

Please sign in to comment.