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

Bump version of analysis-pom to 4.1.0 (and codingstyle to 1.4.0) #15

Merged
merged 2 commits into from
Aug 25, 2020
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
17 changes: 17 additions & 0 deletions etc/assertj-templates/assertions_entry_point_class_template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package ${package};

/**
* Entry point for assertions of different data types. Each method in this class is a static factory for the
* type-specific assertion objects.
*/
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings("NM")
@javax.annotation.Generated(value="assertj-assertions-generator")
public class Assertions extends org.assertj.core.api.Assertions {
${all_assertions_entry_points}
/**
* Creates a new <code>{@link Assertions}</code>.
*/
protected Assertions() {
// empty
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package ${package};

/**
* Entry point for soft assertions of different data types.
*/
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings("NM")
@javax.annotation.Generated(value="assertj-assertions-generator")
public class SoftAssertions extends org.assertj.core.api.AutoCloseableSoftAssertions {
${all_assertions_entry_points}
}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-pom</artifactId>
<version>4.0.0</version>
<version>4.1.0</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -84,4 +84,4 @@
</pluginRepository>
</pluginRepositories>

</project>
</project>
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
package io.jenkins.plugins.checks;

import edu.umd.cs.findbugs.annotations.Nullable;
import java.io.File;

import edu.umd.cs.findbugs.annotations.CheckForNull;

import hudson.Extension;
import hudson.FilePath;
import hudson.model.*;
import hudson.model.Job;
import hudson.model.Queue;
import hudson.model.Result;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.model.listeners.RunListener;
import hudson.model.listeners.SCMListener;
import hudson.model.queue.QueueListener;
import hudson.scm.SCM;
import hudson.scm.SCMRevisionState;

import io.jenkins.plugins.checks.api.ChecksConclusion;
import io.jenkins.plugins.checks.api.ChecksDetails.ChecksDetailsBuilder;
import io.jenkins.plugins.checks.api.ChecksPublisher;
import io.jenkins.plugins.checks.api.ChecksPublisherFactory;
import io.jenkins.plugins.checks.api.ChecksStatus;

import java.io.File;

/**
* A publisher which publishes different statuses through the checks API based on the stage of the {@link Queue.Item}
* or {@link Run}.
Expand Down Expand Up @@ -77,8 +83,8 @@ public static class JobCheckoutListener extends SCMListener {
*/
@Override
public void onCheckout(final Run<?, ?> run, final SCM scm, final FilePath workspace,
final TaskListener listener, @Nullable final File changelogFile,
@Nullable final SCMRevisionState pollingBaseline) {
final TaskListener listener, @CheckForNull final File changelogFile,
@CheckForNull final SCMRevisionState pollingBaseline) {
publish(ChecksPublisherFactory.fromRun(run, listener), ChecksStatus.IN_PROGRESS, ChecksConclusion.NONE);
}
}
Expand All @@ -100,7 +106,7 @@ public static class JobCompletedListener extends RunListener<Run<?, ?>> {
* </p>
*/
@Override
public void onCompleted(final Run run, @Nullable final TaskListener listener) {
public void onCompleted(final Run run, @CheckForNull final TaskListener listener) {
publish(ChecksPublisherFactory.fromRun(run, listener), ChecksStatus.COMPLETED, extractConclusion(run));
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/jenkins/plugins/checks/api/ChecksAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import java.util.Optional;

import edu.umd.cs.findbugs.annotations.Nullable;

import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.Beta;

Expand Down Expand Up @@ -33,8 +33,8 @@ public class ChecksAction {
* a reference for the action on the integrator's system
*/
@SuppressFBWarnings("NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE")
public ChecksAction(@Nullable final String label, @Nullable final String description,
@Nullable final String identifier) {
public ChecksAction(@CheckForNull final String label, @CheckForNull final String description,
@CheckForNull final String identifier) {
this.label = label;
this.description = description;
this.identifier = identifier;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/io/jenkins/plugins/checks/api/ChecksImage.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import java.util.Optional;

import edu.umd.cs.findbugs.annotations.Nullable;

import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.Beta;

Expand All @@ -28,7 +28,7 @@ public class ChecksImage {
* a short description of the image
*/
@SuppressFBWarnings("NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE")
public ChecksImage(@Nullable final String alt, @Nullable final String imageUrl, @Nullable final String caption) {
public ChecksImage(@CheckForNull final String alt, @CheckForNull final String imageUrl, @CheckForNull final String caption) {
this.alt = alt;
this.imageUrl = imageUrl;
this.caption = caption;
Expand Down