Skip to content

Commit

Permalink
chore: formatting with spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbjerre committed Oct 17, 2024
1 parent a4e0ed0 commit d6d034f
Show file tree
Hide file tree
Showing 53 changed files with 4,588 additions and 4,777 deletions.
454 changes: 222 additions & 232 deletions pom.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/main/java/org/jenkinsci/plugins/gwt/ExpressionType.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.jenkinsci.plugins.gwt;

public enum ExpressionType {
XPath,
JSONPath;
XPath,
JSONPath;
}
24 changes: 12 additions & 12 deletions src/main/java/org/jenkinsci/plugins/gwt/FoundJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

public class FoundJob {

private final String fullName;
private final GenericTrigger genericTrigger;
private final String fullName;
private final GenericTrigger genericTrigger;

public FoundJob(String fullName, GenericTrigger genericTrigger) {
this.fullName = fullName;
this.genericTrigger = genericTrigger;
}
public FoundJob(String fullName, GenericTrigger genericTrigger) {
this.fullName = fullName;
this.genericTrigger = genericTrigger;
}

public GenericTrigger getGenericTrigger() {
return genericTrigger;
}
public GenericTrigger getGenericTrigger() {
return genericTrigger;
}

public String getFullName() {
return fullName;
}
public String getFullName() {
return fullName;
}
}
92 changes: 46 additions & 46 deletions src/main/java/org/jenkinsci/plugins/gwt/GenericCause.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,60 +9,60 @@

public class GenericCause extends Cause {

private final Map<String, String> resolvedVariables;
private final String postContent;
private final boolean printContributedVariables;
private final boolean printPostContent;
/** Used at runtime to only print once. */
private boolean postContentPrinted;
private final Map<String, String> resolvedVariables;
private final String postContent;
private final boolean printContributedVariables;
private final boolean printPostContent;
/** Used at runtime to only print once. */
private boolean postContentPrinted;

private final String cause;
private final String cause;

public GenericCause(
final String postContent,
final Map<String, String> resolvedVariables,
final boolean printContributedVariables,
final boolean printPostContent,
final String cause) {
this.postContent = postContent;
this.resolvedVariables = resolvedVariables;
this.printContributedVariables = printContributedVariables;
this.printPostContent = printPostContent;
this.postContentPrinted = false;
if (!isNullOrEmpty(cause)) {
this.cause = cause;
} else {
this.cause = "Generic Cause";
public GenericCause(
final String postContent,
final Map<String, String> resolvedVariables,
final boolean printContributedVariables,
final boolean printPostContent,
final String cause) {
this.postContent = postContent;
this.resolvedVariables = resolvedVariables;
this.printContributedVariables = printContributedVariables;
this.printPostContent = printPostContent;
this.postContentPrinted = false;
if (!isNullOrEmpty(cause)) {
this.cause = cause;
} else {
this.cause = "Generic Cause";
}
}
}

public boolean isPrintContributedVariables() {
return printContributedVariables;
}
public boolean isPrintContributedVariables() {
return printContributedVariables;
}

public boolean isPrintPostContent() {
return printPostContent;
}
public boolean isPrintPostContent() {
return printPostContent;
}

public void setPostContentPrinted(boolean postContentPrinted) {
this.postContentPrinted = postContentPrinted;
}
public void setPostContentPrinted(boolean postContentPrinted) {
this.postContentPrinted = postContentPrinted;
}

public boolean isPostContentPrinted() {
return postContentPrinted;
}
public boolean isPostContentPrinted() {
return postContentPrinted;
}

public Map<String, String> getResolvedVariables() {
return resolvedVariables;
}
public Map<String, String> getResolvedVariables() {
return resolvedVariables;
}

public String getPostContent() {
return postContent;
}
public String getPostContent() {
return postContent;
}

@Override
public String getShortDescription() {
PolicyFactory policy = Sanitizers.FORMATTING.and(Sanitizers.LINKS);
return policy.sanitize(cause);
}
@Override
public String getShortDescription() {
PolicyFactory policy = Sanitizers.FORMATTING.and(Sanitizers.LINKS);
return policy.sanitize(cause);
}
}
55 changes: 28 additions & 27 deletions src/main/java/org/jenkinsci/plugins/gwt/GenericHeaderVariable.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,39 @@

public class GenericHeaderVariable extends AbstractDescribableImpl<GenericHeaderVariable> {

@Extension public static final DescriptorImpl DESCRIPTOR = new DescriptorImpl();

public static class DescriptorImpl extends Descriptor<GenericHeaderVariable> {
@Override
public String getDisplayName() {
return "";
@Extension
public static final DescriptorImpl DESCRIPTOR = new DescriptorImpl();

public static class DescriptorImpl extends Descriptor<GenericHeaderVariable> {
@Override
public String getDisplayName() {
return "";
}
}
}

private final String key;
private final String regexpFilter;
private final String key;
private final String regexpFilter;

@DataBoundConstructor
public GenericHeaderVariable(String key, String regexpFilter) {
this.key = checkNotNull(key, "Variable name");
this.regexpFilter = regexpFilter;
}
@DataBoundConstructor
public GenericHeaderVariable(String key, String regexpFilter) {
this.key = checkNotNull(key, "Variable name");
this.regexpFilter = regexpFilter;
}

public String getKey() {
return key;
}
public String getKey() {
return key;
}

public String getRegexpFilter() {
return regexpFilter;
}
public String getRegexpFilter() {
return regexpFilter;
}

public String getHeaderName() {
return key;
}
public String getHeaderName() {
return key;
}

@Override
public String toString() {
return "GenericHeaderVariable [key=" + key + ", regexpFilter=" + regexpFilter + "]";
}
@Override
public String toString() {
return "GenericHeaderVariable [key=" + key + ", regexpFilter=" + regexpFilter + "]";
}
}
55 changes: 28 additions & 27 deletions src/main/java/org/jenkinsci/plugins/gwt/GenericRequestVariable.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,39 @@

public class GenericRequestVariable extends AbstractDescribableImpl<GenericRequestVariable> {

@Extension public static final DescriptorImpl DESCRIPTOR = new DescriptorImpl();

public static class DescriptorImpl extends Descriptor<GenericRequestVariable> {
@Override
public String getDisplayName() {
return "";
@Extension
public static final DescriptorImpl DESCRIPTOR = new DescriptorImpl();

public static class DescriptorImpl extends Descriptor<GenericRequestVariable> {
@Override
public String getDisplayName() {
return "";
}
}
}

private final String key;
private final String regexpFilter;
private final String key;
private final String regexpFilter;

@DataBoundConstructor
public GenericRequestVariable(String key, String regexpFilter) {
this.key = checkNotNull(key, "Variable name");
this.regexpFilter = regexpFilter;
}
@DataBoundConstructor
public GenericRequestVariable(String key, String regexpFilter) {
this.key = checkNotNull(key, "Variable name");
this.regexpFilter = regexpFilter;
}

public String getRegexpFilter() {
return regexpFilter;
}
public String getRegexpFilter() {
return regexpFilter;
}

public String getKey() {
return key;
}
public String getKey() {
return key;
}

public String getParameterName() {
return key;
}
public String getParameterName() {
return key;
}

@Override
public String toString() {
return "GenericRequestVariable [key=" + key + ", regexpFilter=" + regexpFilter + "]";
}
@Override
public String toString() {
return "GenericRequestVariable [key=" + key + ", regexpFilter=" + regexpFilter + "]";
}
}
17 changes: 8 additions & 9 deletions src/main/java/org/jenkinsci/plugins/gwt/GenericResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@

public class GenericResponse {

static HttpResponse jsonResponse(
final int httpStatusCode, final String message, final Map<String, Object> jobs) {
final GenericWebhookResponse genericResponse = new GenericWebhookResponse(message, jobs);
return new JsonHttpResponse(JSONObject.fromObject(genericResponse), httpStatusCode);
}
static HttpResponse jsonResponse(final int httpStatusCode, final String message, final Map<String, Object> jobs) {
final GenericWebhookResponse genericResponse = new GenericWebhookResponse(message, jobs);
return new JsonHttpResponse(JSONObject.fromObject(genericResponse), httpStatusCode);
}

static HttpResponse jsonResponse(final int httpStatusCode, final String message) {
final GenericWebhookResponse genericResponse = new GenericWebhookResponse(message);
return new JsonHttpResponse(JSONObject.fromObject(genericResponse), httpStatusCode);
}
static HttpResponse jsonResponse(final int httpStatusCode, final String message) {
final GenericWebhookResponse genericResponse = new GenericWebhookResponse(message);
return new JsonHttpResponse(JSONObject.fromObject(genericResponse), httpStatusCode);
}
}
Loading

0 comments on commit d6d034f

Please sign in to comment.