Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Fixed NPE.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Sep 24, 2012
1 parent 4c66581 commit 6f7ca21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -36,7 +36,7 @@
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-core</artifactId>
<version>1.45</version>
<version>1.48-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
Expand Down
24 changes: 5 additions & 19 deletions src/main/java/hudson/plugins/pmd/PmdMavenResultAction.java
Expand Up @@ -6,8 +6,10 @@
import hudson.maven.MavenModuleSet;
import hudson.maven.MavenModuleSetBuild;
import hudson.model.Action;
import hudson.model.AbstractBuild;
import hudson.plugins.analysis.core.HealthDescriptor;
import hudson.plugins.analysis.core.MavenResultAction;
import hudson.plugins.analysis.core.ParserResult;

import java.util.List;
import java.util.Map;
Expand All @@ -20,23 +22,6 @@
* @author Ulli Hafner
*/
public class PmdMavenResultAction extends MavenResultAction<PmdResult> {
/**
* Creates a new instance of {@link PmdMavenResultAction}. This instance
* will have no result set in the beginning. The result will be set
* successively after each of the modules are build.
*
* @param owner
* the associated build of this action
* @param healthDescriptor
* health descriptor to use
* @param defaultEncoding
* the default encoding to be used when reading and parsing files
*/
public PmdMavenResultAction(final MavenModuleSetBuild owner, final HealthDescriptor healthDescriptor,
final String defaultEncoding) {
super(new PmdResultAction(owner, healthDescriptor), defaultEncoding, "PMD");
}

/**
* Creates a new instance of {@link PmdMavenResultAction}.
*
Expand All @@ -49,14 +34,15 @@ public PmdMavenResultAction(final MavenModuleSetBuild owner, final HealthDescrip
* @param result
* the result in this build
*/
public PmdMavenResultAction(final MavenBuild owner, final HealthDescriptor healthDescriptor,
public PmdMavenResultAction(final AbstractBuild<?, ?> owner, final HealthDescriptor healthDescriptor,
final String defaultEncoding, final PmdResult result) {
super(new PmdResultAction(owner, healthDescriptor, result), defaultEncoding, "PMD");
}

/** {@inheritDoc} */
public MavenAggregatedReport createAggregatedAction(final MavenModuleSetBuild build, final Map<MavenModule, List<MavenBuild>> moduleBuilds) {
return new PmdMavenResultAction(build, getHealthDescriptor(), getDisplayName());
return new PmdMavenResultAction(build, getHealthDescriptor(), getDisplayName(),
new PmdResult(build, getDefaultEncoding(), new ParserResult()));
}

/** {@inheritDoc} */
Expand Down

1 comment on commit 6f7ca21

@buildhive
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jenkins » pmd-plugin #35 FAILURE
Looks like this commit caused a build failure
(what's this?)

Please sign in to comment.