Skip to content

Commit 84ae979

Browse files
authored
Merge pull request #46 from jenkinsci/dependabot/maven/edu.hm.hafner-codingstyle-1.4.0
Bump codingstyle from 1.1.0 to 1.4.0
2 parents 6c46ff5 + 9f7a36d commit 84ae979

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

Jenkinsfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
buildPlugin(useAci: true)
1+
@Library('pipeline-library@code-coverage') _
2+
3+
buildPlugin(failFast: false,
4+
checkstyle: [qualityGates: [[threshold: 1, type: 'NEW', unstable: true]]],
5+
pmd: [qualityGates: [[threshold: 1, type: 'NEW', unstable: true]]] )

pom.xml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.jvnet.hudson.plugins</groupId>
66
<artifactId>analysis-pom</artifactId>
7-
<version>4.0.0</version>
7+
<version>4.1.0</version>
88
<relativePath />
99
</parent>
1010

@@ -24,7 +24,7 @@
2424
<module.name>${project.groupId}.plugin.util.api</module.name>
2525

2626
<commons.lang.version>3.11</commons.lang.version>
27-
<codingstyle.library.version>1.1.0</codingstyle.library.version>
27+
<codingstyle.library.version>${codingstyle.config.version}</codingstyle.library.version>
2828
</properties>
2929

3030
<licenses>
@@ -42,6 +42,15 @@
4242
</developer>
4343
</developers>
4444

45+
<dependencyManagement>
46+
<dependencies>
47+
<dependency>
48+
<artifactId>commons-io</artifactId>
49+
<version>2.7</version>
50+
<groupId>commons-io</groupId>
51+
</dependency>
52+
</dependencies>
53+
</dependencyManagement>
4554
<dependencies>
4655

4756
<dependency>

src/main/java/io/jenkins/plugins/util/BuildAction.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import java.util.concurrent.locks.ReentrantLock;
1010

1111
import edu.hm.hafner.util.VisibleForTesting;
12-
import edu.umd.cs.findbugs.annotations.Nullable;
12+
import edu.umd.cs.findbugs.annotations.CheckForNull;
1313

1414
import hudson.model.Action;
1515
import hudson.model.Run;
@@ -32,7 +32,7 @@ public abstract class BuildAction<T> implements LastBuildAction, RunAction2, Ser
3232
private transient Run<?, ?> owner;
3333
private transient ReentrantLock lock = new ReentrantLock();
3434

35-
@Nullable
35+
@CheckForNull
3636
private transient WeakReference<T> resultReference;
3737

3838
/**
@@ -152,7 +152,7 @@ private Path getResultXmlPath() {
152152
* @return the next available {@link BuildAction}, or an empty result if there is no such action
153153
*/
154154
public static <T extends BuildAction<?>> Optional<T> getBuildActionFromHistoryStartingFrom(
155-
@Nullable final Run<?, ?> baseline, final Class<T> buildActionClass) {
155+
@CheckForNull final Run<?, ?> baseline, final Class<T> buildActionClass) {
156156
for (Run<?, ?> run = baseline; run != null; run = run.getPreviousBuild()) {
157157
T action = run.getAction(buildActionClass);
158158
if (action != null) {

src/main/java/io/jenkins/plugins/util/EnvironmentResolver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import org.apache.commons.lang3.StringUtils;
44

55
import edu.hm.hafner.util.VisibleForTesting;
6-
import edu.umd.cs.findbugs.annotations.Nullable;
6+
import edu.umd.cs.findbugs.annotations.CheckForNull;
77

88
import hudson.EnvVars;
99
import hudson.Util;
@@ -42,7 +42,7 @@ public EnvironmentResolver() {
4242
*
4343
* @return the expanded value
4444
*/
45-
public String expandEnvironmentVariables(@Nullable final EnvVars environment, final String nonExpandedValue) {
45+
public String expandEnvironmentVariables(@CheckForNull final EnvVars environment, final String nonExpandedValue) {
4646
String expanded = nonExpandedValue;
4747
if (environment != null && !environment.isEmpty()) {
4848
for (int i = 0; i < resolveVariablesDepth && StringUtils.isNotBlank(expanded); i++) {

0 commit comments

Comments
 (0)