Skip to content

Commit 5328c45

Browse files
committed
Fix PMD and CheckStyle warnings.
1 parent 05f4542 commit 5328c45

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

plugin/src/main/java/io/jenkins/plugins/forensics/git/delta/DeltaRepositoryCallback.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import java.io.ByteArrayOutputStream;
44
import java.io.IOException;
55
import java.nio.charset.StandardCharsets;
6+
import java.util.EnumMap;
67
import java.util.HashMap;
78
import java.util.List;
89
import java.util.Map;
@@ -196,7 +197,8 @@ private FileChanges createFileChanges(final FileEditType fileEditType, final Dif
196197

197198
diffFormatter.format(diffEntry);
198199

199-
FileChanges fileChanges = new FileChanges(filePath, oldFilePath, fileContent, fileEditType, new HashMap<>());
200+
FileChanges fileChanges = new FileChanges(filePath, oldFilePath, fileContent, fileEditType,
201+
new EnumMap<>(ChangeEditType.class));
200202

201203
for (Edit edit : diffFormatter.toFileHeader(diffEntry).toEditList()) {
202204
createChange(edit).ifPresent(fileChanges::addChange);
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
/**
22
* Git implementation for determining the code difference - so called 'delta' - between two commits.
3-
*
4-
* @author Florian Orendi
53
*/
64
@DefaultAnnotation(NonNull.class)
75
package io.jenkins.plugins.forensics.git.delta;
86

97
import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
10-
import edu.umd.cs.findbugs.annotations.NonNull;
8+
import edu.umd.cs.findbugs.annotations.NonNull;

plugin/src/main/java/io/jenkins/plugins/forensics/git/miner/package-info.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/**
22
* Provides API classes to obtain commit statistics for files in a repository.
3+
*
34
* <p>
45
* For pull requests (or more generally: for jobs that have a reference build defined) the classes in this package
56
* collect a statistical summary for all containing commits. This includes the commits count, the changed files count,
@@ -10,6 +11,7 @@
1011
* Additionally, the classes in this package will collect commit statistics for all repository files in the style of
1112
* the book "Code as a Crime Scene":
1213
* </p>
14+
*
1315
* <ul>
1416
* <li> commits count </li>
1517
* <li> different authors count </li>

plugin/src/main/java/io/jenkins/plugins/forensics/git/reference/package-info.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/**
22
* Provides classes to discover reference builds in Git projects.
3+
*
34
* <p>
45
* Several plugins that report build statistics (test results, code coverage, metrics, static analysis warnings)
56
* typically show their reports in two different ways: either as absolute report (e.g., total number of tests or

0 commit comments

Comments
 (0)