Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh dependencies #98

Merged
merged 1 commit into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 10 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.17</version>
<version>4.33</version>
<relativePath />
</parent>

<properties>
<changelist>999999-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/token-macro-plugin</gitHubRepo>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
<jenkins.version>2.289.1</jenkins.version>
<java.level>8</java.level>
</properties>

<licenses>
<license>
<name>The MIT License (MIT)</name>
<url>http://opensource.org/licenses/MIT</url>
<url>https://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>
Expand All @@ -28,7 +28,7 @@
<packaging>hpi</packaging>
<name>Token Macro Plugin</name>
<description>This plugin adds reusable macro expansion capability for other plugins to use.</description>
<url>https://github.com/jenkinsci/token-macro-plugin</url>
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>

<developers>
<developer>
Expand Down Expand Up @@ -82,12 +82,17 @@
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>2.6.0</version>
<version>2.7.0</version>
<exclusions>
<exclusion> <!-- Note that json-smart *also* bundles ASM 5 inline, which we cannot do anything about. Bad form! -->
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
<!-- Provided by Jenkins core -->
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -129,7 +134,6 @@
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-basic-steps</artifactId>
<version>2.23</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -147,39 +151,14 @@
<dependency>
<groupId>org.jenkinsci.plugins</groupId>
<artifactId>pipeline-model-definition</artifactId>
<version>1.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.8.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>hamcrest-core</artifactId>
<groupId>org.hamcrest</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<quiet>true</quiet>
<links>
<link>http://javadoc.jenkins.io/</link>
</links>
<!-- workaround for https://bugs.openjdk.java.net/browse/JDK-8212233 -->
<source>8</source>
</configuration>
</plugin>
</plugins>
</build>

<repositories>
<repository>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
*/
package org.jenkinsci.plugins.tokenmacro;

import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;

/**
* Signals that the evaluation of the macro has failed, and the error should be presented to users
Expand All @@ -36,15 +36,15 @@ public class MacroEvaluationException extends Exception {

private final @CheckForNull String macroName;

public MacroEvaluationException(@Nonnull String message) {
public MacroEvaluationException(@NonNull String message) {
this(message, null, null);
}

public MacroEvaluationException(@Nonnull String message, @CheckForNull Throwable cause) {
public MacroEvaluationException(@NonNull String message, @CheckForNull Throwable cause) {
this(message, null, cause);
}

public MacroEvaluationException(@CheckForNull String message, @Nonnull String macroName) {
public MacroEvaluationException(@CheckForNull String message, @NonNull String macroName) {
this(message, macroName, null);
}

Expand Down
10 changes: 5 additions & 5 deletions src/main/java/org/jenkinsci/plugins/tokenmacro/TokenMacro.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@

import java.io.IOException;

import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import jenkins.model.Jenkins;


Expand Down Expand Up @@ -244,8 +244,8 @@ public static String expandAll(Run<?,?> run, FilePath workspace, TaskListener li
* @return Retrieved workspace
* @throws MacroEvaluationException Workspace is inaccessible
*/
@Nonnull
protected static FilePath getWorkspace(@Nonnull AbstractBuild<?, ?> context)
@NonNull
protected static FilePath getWorkspace(@NonNull AbstractBuild<?, ?> context)
throws MacroEvaluationException {
final FilePath workspace = context.getWorkspace();
if (workspace == null) {
Expand All @@ -267,7 +267,7 @@ protected static FilePath getWorkspace(@Nonnull AbstractBuild<?, ?> context)
* @return the previous run, or null if that run is missing, or is still in progress
*/
@CheckForNull
public static Run<?, ?> getPreviousRun(@Nonnull Run<?, ?> run, TaskListener listener) {
public static Run<?, ?> getPreviousRun(@NonNull Run<?, ?> run, TaskListener listener) {
Run<?, ?> previousRun = run.getPreviousBuild();
if (previousRun != null && previousRun.isBuilding()) {
listener.getLogger().println(Messages.TokenMacro_Run_still_in_progress(previousRun.getDisplayName()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
import org.jenkinsci.plugins.workflow.steps.*;
import org.kohsuke.stapler.DataBoundConstructor;

import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

public class TokenMacroStep extends Step {

private final @Nonnull String stringWithMacro;
private final @NonNull String stringWithMacro;

@DataBoundConstructor
public TokenMacroStep(@Nonnull String stringWithMacro) {
public TokenMacroStep(@NonNull String stringWithMacro) {
this.stringWithMacro = stringWithMacro;
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jenkinsci/plugins/tokenmacro/Transform.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.jenkinsci.plugins.tokenmacro;

import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;

/**
* Created by acearl on 2/24/2016.
*/
public abstract class Transform {
public abstract String transform (@Nonnull String input) throws MacroEvaluationException;
public abstract String transform (@NonNull String input) throws MacroEvaluationException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.jenkinsci.plugins.tokenmacro.MacroEvaluationException;
import org.jenkinsci.plugins.tokenmacro.TokenMacro;

import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;

/**
*
Expand Down Expand Up @@ -51,7 +51,7 @@ public String evaluate(Run<?,?> run, FilePath workspace, TaskListener listener,
return getAdminAddress();
}

@Nonnull
@NonNull
public String getAdminAddress() throws MacroEvaluationException {
JenkinsLocationConfiguration configuration = JenkinsLocationConfiguration.get();
if (configuration == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro;
import org.jenkinsci.plugins.tokenmacro.MacroEvaluationException;

import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.io.IOException;
import java.util.Collections;
import java.util.List;
Expand Down Expand Up @@ -47,7 +47,7 @@ public String evaluate(Run<?,?> run, FilePath workspace, TaskListener listener,
return "Unknown";
}

@Nonnull
@NonNull
@SuppressFBWarnings
private Run<?,?> getUpstreamRun(Cause.UpstreamCause cause) throws MacroEvaluationException {
if(cause.getUpstreamRun() == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.jenkinsci.plugins.tokenmacro.MacroEvaluationException;
import org.jenkinsci.plugins.tokenmacro.Transform;

import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;

/**
* Created by acearl on 2/25/2016.
Expand All @@ -19,7 +19,7 @@ public SubstringTransform(int offset, int length) {
}

@Override
public String transform(@Nonnull String input) throws MacroEvaluationException {
public String transform(@NonNull String input) throws MacroEvaluationException {
if(offset > input.length()) {
throw new MacroEvaluationException(String.format("Offset given (%d) is larger than the string", offset));
}
Expand Down