Skip to content

Commit

Permalink
Bump json-schema-validator from 2.0.4 to 2.2.14
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Nov 23, 2021
1 parent 6b2d8c3 commit 1eedafc
Show file tree
Hide file tree
Showing 16 changed files with 46 additions and 43 deletions.
3 changes: 2 additions & 1 deletion pipeline-model-api/pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ The MIT License
~
Expand Down Expand Up @@ -44,7 +45,7 @@
<artifactId>jackson2-api</artifactId>
</dependency>
<dependency>
<groupId>com.github.fge</groupId>
<groupId>com.github.java-json-tools</groupId>
<artifactId>json-schema-validator</artifactId>
<exclusions>
<exclusion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

package org.jenkinsci.plugins.pipeline.modeldefinition;

import com.github.fge.jsonschema.exceptions.ProcessingException;
import com.github.fge.jsonschema.core.exceptions.ProcessingException;
import com.github.fge.jsonschema.main.JsonSchema;
import com.github.fge.jsonschema.main.JsonSchemaFactory;
import hudson.Extension;
Expand Down
1 change: 1 addition & 0 deletions pipeline-model-definition/pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ The MIT License
~
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
package org.jenkinsci.plugins.pipeline.modeldefinition

import com.fasterxml.jackson.databind.JsonNode
import com.github.fge.jsonschema.tree.JsonTree
import com.github.fge.jsonschema.tree.SimpleJsonTree
import com.github.fge.jsonschema.util.JsonLoader
import com.github.fge.jsonschema.core.tree.JsonTree
import com.github.fge.jsonschema.core.tree.SimpleJsonTree
import com.github.fge.jackson.JsonLoader
import com.google.common.base.Predicate
import com.google.common.cache.CacheBuilder
import com.google.common.cache.CacheLoader
Expand Down Expand Up @@ -91,7 +91,6 @@ import org.kohsuke.accmod.restrictions.NoExternalUse

import edu.umd.cs.findbugs.annotations.CheckForNull
import edu.umd.cs.findbugs.annotations.NonNull
import edu.umd.cs.findbugs.annotations.Nullable
import javax.lang.model.SourceVersion
import java.util.concurrent.TimeUnit

Expand Down Expand Up @@ -158,7 +157,7 @@ class Utils {
static Predicate<FlowNode> nodeIdNotEquals(final FlowNode original) {
return new Predicate<FlowNode>() {
@Override
boolean apply(@Nullable FlowNode input) {
boolean apply(FlowNode input) {
return input == null || original == null || original.id != input.id
}
}
Expand All @@ -167,7 +166,7 @@ class Utils {
static Predicate<FlowNode> endNodeForStage(final BlockStartNode startNode) {
return new Predicate<FlowNode>() {
@Override
boolean apply(@Nullable FlowNode input) {
boolean apply(FlowNode input) {
return input != null &&
input instanceof BlockEndNode &&
input.getStartNode() == startNode
Expand Down Expand Up @@ -212,7 +211,7 @@ class Utils {
static Predicate<FlowNode> isParallelBranchFlowNode(final String stageName, FlowExecution execution = null) {
return new Predicate<FlowNode>() {
@Override
boolean apply(@Nullable FlowNode input) {
boolean apply(FlowNode input) {
if (input != null) {
if (input.getAction(LabelAction.class) != null &&
input.getAction(ThreadNameAction.class) != null &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ package org.jenkinsci.plugins.pipeline.modeldefinition.parser

import com.cloudbees.groovy.cps.NonCPS
import com.fasterxml.jackson.databind.JsonNode
import com.github.fge.jsonschema.exceptions.ProcessingException
import com.github.fge.jsonschema.core.exceptions.ProcessingException
import com.github.fge.jsonschema.main.JsonSchema
import com.github.fge.jsonschema.report.ProcessingReport
import com.github.fge.jsonschema.tree.JsonTree
import com.github.fge.jsonschema.tree.SimpleJsonTree
import com.github.fge.jsonschema.util.JsonLoader
import com.github.fge.jsonschema.core.report.ProcessingReport
import com.github.fge.jsonschema.core.tree.JsonTree
import com.github.fge.jsonschema.core.tree.SimpleJsonTree
import com.github.fge.jackson.JsonLoader
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings
import jenkins.model.Jenkins
import net.sf.json.JSONObject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
package org.jenkinsci.plugins.pipeline.modeldefinition.parser

import com.fasterxml.jackson.databind.JsonNode
import com.github.fge.jsonschema.exceptions.JsonReferenceException
import com.github.fge.jsonschema.exceptions.ProcessingException
import com.github.fge.jsonschema.jsonpointer.JsonPointer
import com.github.fge.jsonschema.report.ProcessingMessage
import com.github.fge.jsonschema.report.ProcessingReport
import com.github.fge.jsonschema.tree.JsonTree
import com.github.fge.jsonschema.core.exceptions.JsonReferenceException
import com.github.fge.jsonschema.core.exceptions.ProcessingException
import com.github.fge.jackson.jsonpointer.JsonPointer
import com.github.fge.jsonschema.core.report.ProcessingMessage
import com.github.fge.jsonschema.core.report.ProcessingReport
import com.github.fge.jsonschema.core.tree.JsonTree
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings
import org.jenkinsci.plugins.pipeline.modeldefinition.Messages
import org.jenkinsci.plugins.pipeline.modeldefinition.ModelStepLoader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
*/
package org.jenkinsci.plugins.pipeline.modeldefinition.validator

import com.github.fge.jsonschema.jsonpointer.JsonPointer
import com.github.fge.jsonschema.tree.JsonTree
import com.github.fge.jackson.jsonpointer.JsonPointer
import com.github.fge.jsonschema.core.tree.JsonTree
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings
import net.sf.json.JSONArray
import net.sf.json.JSONObject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
package org.jenkinsci.plugins.pipeline.modeldefinition.endpoints;

import com.fasterxml.jackson.databind.JsonNode;
import com.github.fge.jsonschema.tree.SimpleJsonTree;
import com.github.fge.jsonschema.util.JsonLoader;
import com.github.fge.jsonschema.core.tree.SimpleJsonTree;
import com.github.fge.jackson.JsonLoader;
import com.google.common.collect.ImmutableList;
import hudson.Extension;
import hudson.model.RootAction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public static Iterable<Object[]> configsWithErrors() {

result.add(new Object[]{"perStageConfigEmptySteps", Messages.JSONParser_TooFewItems(0, 1)});
result.add(new Object[]{"perStageConfigMissingSteps", Messages.JSONParser_MissingRequiredProperties("'steps'")});
result.add(new Object[]{"perStageConfigUnknownSection", "additional properties are not allowed"});
result.add(new Object[]{"perStageConfigUnknownSection", "object instance has properties which are not allowed by the schema"});

result.add(new Object[]{"unknownAgentType", Messages.ModelValidatorImpl_InvalidAgentType("foo", "[any, label, none, otherField]")});

Expand All @@ -234,7 +234,7 @@ public static Iterable<Object[]> configsWithErrors() {
result.add(new Object[]{"unknownBareAgentType", Messages.ModelValidatorImpl_InvalidAgentType("foo", legalAgentTypes)});
result.add(new Object[]{"agentMissingRequiredParam", Messages.ModelValidatorImpl_MultipleAgentParameters("otherField", "[label, otherField]")});
result.add(new Object[]{"agentUnknownParamForType", Messages.ModelValidatorImpl_InvalidAgentParameter("fruit", "otherField", "[label, otherField, nested]")});
result.add(new Object[]{"notificationsSectionRemoved", "additional properties are not allowed"});
result.add(new Object[]{"notificationsSectionRemoved", "object instance has properties which are not allowed by the schema"});
result.add(new Object[]{"unknownWhenConditional", Messages.ModelValidatorImpl_UnknownWhenConditional("banana",
"allOf, anyOf, branch, buildingTag, changeRequest, changelog, changeset, environment, equals, expression, isRestartedRun, not, tag")});
result.add(new Object[]{"whenInvalidParameterType", Messages.ModelValidatorImpl_InvalidUnnamedParameterType("class java.lang.String", 4, Integer.class)});
Expand Down Expand Up @@ -280,8 +280,8 @@ public static Iterable<Object[]> configsWithErrors() {


// TODO: Better error messaging for these schema violations.
result.add(new Object[]{"nestedWhenWithArgs", "instance failed to match at least one schema"});
result.add(new Object[]{"invalidWhenWithChildren", "instance failed to match at least one schema"});
result.add(new Object[]{"nestedWhenWithArgs", "instance failed to match at least one required schema among 2"});
result.add(new Object[]{"invalidWhenWithChildren", "instance failed to match at least one required schema among 2"});

result.add(new Object[]{"malformed", "Unexpected close marker ']': expected '}'"});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
package org.jenkinsci.plugins.pipeline.modeldefinition;

import com.fasterxml.jackson.databind.JsonNode;
import com.github.fge.jsonschema.tree.SimpleJsonTree;
import com.github.fge.jsonschema.util.JsonLoader;
import com.github.fge.jsonschema.core.tree.SimpleJsonTree;
import com.github.fge.jackson.JsonLoader;
import org.codehaus.groovy.control.ErrorCollector;
import org.codehaus.groovy.control.Janitor;
import org.codehaus.groovy.control.MultipleCompilationErrorsException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import com.gargoylesoftware.htmlunit.html.HtmlSelect;
import com.gargoylesoftware.htmlunit.util.NameValuePair;
import com.github.fge.jsonschema.util.JsonLoader;
import com.github.fge.jackson.JsonLoader;
import hudson.model.*;
import hudson.scm.ChangeLogSet;
import hudson.security.ACL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
*/
package org.jenkinsci.plugins.pipeline.modeldefinition.validator;

import com.github.fge.jsonschema.report.ProcessingMessage;
import com.github.fge.jsonschema.report.ProcessingReport;
import com.github.fge.jsonschema.core.report.ProcessingMessage;
import com.github.fge.jsonschema.core.report.ProcessingReport;
import net.sf.json.JSONObject;
import org.jenkinsci.plugins.pipeline.modeldefinition.AbstractModelDefTest;
import org.jenkinsci.plugins.pipeline.modeldefinition.ast.ModelASTPipelineDef;
Expand Down
1 change: 1 addition & 0 deletions pipeline-model-extensions/pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ The MIT License
~
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner;
import org.jenkinsci.plugins.workflow.support.steps.StageStep;

import edu.umd.cs.findbugs.annotations.Nullable;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;

Expand All @@ -53,7 +52,7 @@ public class CommonUtils {
public static Predicate<FlowNode> isStageWithOptionalName(final String stageName) {
return new Predicate<FlowNode>() {
@Override
public boolean apply(@Nullable FlowNode input) {
public boolean apply(FlowNode input) {
if (input != null) {
if (input instanceof StepStartNode
&& ((StepStartNode) input).getDescriptor() instanceof StageStep.DescriptorImpl
Expand Down Expand Up @@ -108,7 +107,7 @@ public static List<FlowNode> findPossiblyUnfinishedEndNodeForCurrentStage(String
public static Predicate<FlowNode> isSomewhereWithinStage(final FlowNode stageStartNode) {
return new Predicate<FlowNode>() {
@Override
public boolean apply(@Nullable FlowNode input) {
public boolean apply(FlowNode input) {
if (input != null && stageStartNode instanceof BlockStartNode) {
return input.getEnclosingBlocks().contains(stageStartNode);
}
Expand Down
1 change: 1 addition & 0 deletions pipeline-stage-tags-metadata/pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ The MIT License
~
Expand Down
15 changes: 8 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ The MIT License
~
Expand Down Expand Up @@ -26,7 +27,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.29</version>
<version>4.31</version>
<relativePath />
</parent>

Expand All @@ -42,7 +43,7 @@
<licenses>
<license>
<name>MIT</name>
<url>http://opensource.org/licenses/MIT</url>
<url>https://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>
Expand Down Expand Up @@ -73,8 +74,8 @@
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.235.x</artifactId>
<version>918.vae501d2cdc99</version>
<artifactId>bom-2.319.x</artifactId>
<version>1013.vf8058992a042</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down Expand Up @@ -121,9 +122,9 @@
<version>1.46.1</version>
</dependency>
<dependency>
<groupId>com.github.fge</groupId>
<groupId>com.github.java-json-tools</groupId>
<artifactId>json-schema-validator</artifactId>
<version>2.0.4</version>
<version>2.2.14</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down Expand Up @@ -160,7 +161,7 @@
<revision>1.9.4</revision>
<changelist>-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/pipeline-model-definition-plugin</gitHubRepo>
<jenkins.version>2.235.5</jenkins.version>
<jenkins.version>2.321</jenkins.version>
<java.level>8</java.level>
<groovy.version>2.4.12</groovy.version>
<argLine>-Djava.awt.headless=true -Xmx4g -Xms512m -XX:MaxPermSize=512m</argLine>
Expand Down

0 comments on commit 1eedafc

Please sign in to comment.