com/github/valdr/thirdparty/**/*.class
diff --git a/valdr-bean-validation/src/main/java/com/github/valdr/BuiltInConstraint.java b/valdr-bean-validation/src/main/java/com/github/valdr/BuiltInConstraint.java
index 2aff3b7..b975cc9 100644
--- a/valdr-bean-validation/src/main/java/com/github/valdr/BuiltInConstraint.java
+++ b/valdr-bean-validation/src/main/java/com/github/valdr/BuiltInConstraint.java
@@ -8,15 +8,15 @@
import java.util.Arrays;
import java.util.stream.Collectors;
-import javax.validation.constraints.Digits;
-import javax.validation.constraints.Email;
-import javax.validation.constraints.Future;
-import javax.validation.constraints.Max;
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Past;
-import javax.validation.constraints.Pattern;
-import javax.validation.constraints.Size;
+import jakarta.validation.constraints.Digits;
+import jakarta.validation.constraints.Email;
+import jakarta.validation.constraints.Future;
+import jakarta.validation.constraints.Max;
+import jakarta.validation.constraints.Min;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Past;
+import jakarta.validation.constraints.Pattern;
+import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.SneakyThrows;
diff --git a/valdr-bean-validation/src/main/java/com/github/valdr/ConstraintParser.java b/valdr-bean-validation/src/main/java/com/github/valdr/ConstraintParser.java
index f5548b9..2a99f80 100644
--- a/valdr-bean-validation/src/main/java/com/github/valdr/ConstraintParser.java
+++ b/valdr-bean-validation/src/main/java/com/github/valdr/ConstraintParser.java
@@ -19,7 +19,7 @@
/**
* Parses classes in defined packages for supported Bean Validation (JSR
* 303)
- * annotations ({@code javax.validation.*}) and configured custom annotations.
+ * annotations ({@code jakarta.validation.*}) and configured custom annotations.
*
The parsing result is a JSON string that complies with the document specified by valdr.
*
diff --git a/valdr-bean-validation/src/main/java/com/github/valdr/ValidationRulesServlet.java b/valdr-bean-validation/src/main/java/com/github/valdr/ValidationRulesServlet.java
index ffa000b..2504938 100644
--- a/valdr-bean-validation/src/main/java/com/github/valdr/ValidationRulesServlet.java
+++ b/valdr-bean-validation/src/main/java/com/github/valdr/ValidationRulesServlet.java
@@ -7,11 +7,11 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
@@ -24,7 +24,7 @@
* custom Bean Validation annotations. The Servlet then builds and returns a JSON document with all validation rules
* (i.e. Bean Validation constraints). The JSON document adheres to structure specified by valdr.
*
- * Servlet can be configured using following {@link javax.servlet.ServletConfig} init parameters (* = mandatory):
+ * Servlet can be configured using following {@link jakarta.servlet.ServletConfig} init parameters (* = mandatory):
*
* - configFile: path to JSON configuration file, if omitted valdr-bean-validation.json is expected at root of class
* path
diff --git a/valdr-bean-validation/src/main/java/com/github/valdr/decorator/PatternDecorator.java b/valdr-bean-validation/src/main/java/com/github/valdr/decorator/PatternDecorator.java
index 2084cae..6837942 100644
--- a/valdr-bean-validation/src/main/java/com/github/valdr/decorator/PatternDecorator.java
+++ b/valdr-bean-validation/src/main/java/com/github/valdr/decorator/PatternDecorator.java
@@ -7,7 +7,7 @@
import com.github.valdr.ConstraintAttributes;
/**
- * Decorates the map of attributes of the {@link javax.validation.constraints.Pattern} constraint.
+ * Decorates the map of attributes of the {@link jakarta.validation.constraints.Pattern} constraint.
*/
public class PatternDecorator extends AbstractConstraintAttributesDecorator {
diff --git a/valdr-bean-validation/src/test/java/com/github/valdr/AnnotatedClassTest.java b/valdr-bean-validation/src/test/java/com/github/valdr/AnnotatedClassTest.java
index 990c2ff..708d3e8 100644
--- a/valdr-bean-validation/src/test/java/com/github/valdr/AnnotatedClassTest.java
+++ b/valdr-bean-validation/src/test/java/com/github/valdr/AnnotatedClassTest.java
@@ -2,7 +2,7 @@
import com.github.valdr.model.a.TestModelWithASingleAnnotatedMember;
import com.google.common.collect.Lists;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.empty;
diff --git a/valdr-bean-validation/src/test/java/com/github/valdr/ClasspathScannerTest.java b/valdr-bean-validation/src/test/java/com/github/valdr/ClasspathScannerTest.java
index 2377f72..4407514 100644
--- a/valdr-bean-validation/src/test/java/com/github/valdr/ClasspathScannerTest.java
+++ b/valdr-bean-validation/src/test/java/com/github/valdr/ClasspathScannerTest.java
@@ -5,14 +5,14 @@
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
-import org.junit.Test;
+import org.hamcrest.collection.IsEmptyCollection;
+import org.junit.jupiter.api.Test;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.empty;
import static org.hamcrest.core.Is.is;
/**
@@ -30,7 +30,7 @@ public void shouldFindNothingForEmptyPackageNames() {
// when
Set> classesToParse = classpathScanner.findClassesToParse();
// then
- assertThat(classesToParse, is(empty()));
+ assertThat(classesToParse, IsEmptyCollection.empty());
}
/**
@@ -43,7 +43,7 @@ public void shouldFindNothingForEmptyPackageNameString() {
// when
Set> classesToParse = classpathScanner.findClassesToParse();
// then
- assertThat(classesToParse, is(empty()));
+ assertThat(classesToParse, IsEmptyCollection.empty());
}
/**
diff --git a/valdr-bean-validation/src/test/java/com/github/valdr/ConstraintParserTest.java b/valdr-bean-validation/src/test/java/com/github/valdr/ConstraintParserTest.java
index 6b92466..96a9754 100644
--- a/valdr-bean-validation/src/test/java/com/github/valdr/ConstraintParserTest.java
+++ b/valdr-bean-validation/src/test/java/com/github/valdr/ConstraintParserTest.java
@@ -14,16 +14,16 @@
import com.github.valdr.model.h.TestModelWithPatterns;
import com.github.valdr.model.validation.CustomValidation;
import com.google.common.collect.Lists;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.Collections;
import java.util.List;
-import static org.hamcrest.Matchers.containsString;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.startsWith;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.StringContains.containsString;
+import static org.hamcrest.core.StringStartsWith.startsWith;
public class ConstraintParserTest {
private static final String LS = System.getProperty("line.separator");
@@ -71,7 +71,7 @@ public void shouldReturnDefaultMessage() {
" \"" + TestModelWithASingleAnnotatedMember.class.getSimpleName() + "\" : {" + LS +
" \"notNullString\" : {" + LS +
" \"required\" : {" + LS +
- " \"message\" : \"{javax.validation.constraints.NotNull.message}\"" + LS +
+ " \"message\" : \"{jakarta.validation.constraints.NotNull.message}\"" + LS +
" }" + LS +
" }" + LS +
" }" + LS +
@@ -164,7 +164,7 @@ public void shouldSupportEmailAnnotation() {
// then
assertThat(json, containsString(TestModelWithEmailAnnotation.class.getSimpleName()));
assertThat(json, containsString("email"));
- assertThat(json, containsString("{javax.validation.constraints.Email.message}"));
+ assertThat(json, containsString("{jakarta.validation.constraints.Email.message}"));
}
/**
@@ -198,9 +198,9 @@ public void shouldConsiderSuperClassMembers() throws IOException {
JsonNode jsonNode = new ObjectMapper().readTree(json);
// then
assertThat(jsonNode.get(SuperClassWithValidatedMember.class.getSimpleName()).get("notNullString").get("required")
- .get("message").asText(), is("{javax.validation.constraints.NotNull.message}"));
+ .get("message").asText(), is("{jakarta.validation.constraints.NotNull.message}"));
assertThat(jsonNode.get(SubClassWithNoValidatedMembers.class.getSimpleName()).get("notNullString").get
- ("required").get("message").asText(), is("{javax.validation.constraints.NotNull.message}"));
+ ("required").get("message").asText(), is("{jakarta.validation.constraints.NotNull.message}"));
}
/**
diff --git a/valdr-bean-validation/src/test/java/com/github/valdr/OptionsTest.java b/valdr-bean-validation/src/test/java/com/github/valdr/OptionsTest.java
index 5bd13c8..114c587 100644
--- a/valdr-bean-validation/src/test/java/com/github/valdr/OptionsTest.java
+++ b/valdr-bean-validation/src/test/java/com/github/valdr/OptionsTest.java
@@ -1,10 +1,11 @@
package com.github.valdr;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.fail;
/**
* Tests Options.
diff --git a/valdr-bean-validation/src/test/java/com/github/valdr/ValdrBeanValidationTest.java b/valdr-bean-validation/src/test/java/com/github/valdr/ValdrBeanValidationTest.java
index bd0f7d9..5c8e1b6 100644
--- a/valdr-bean-validation/src/test/java/com/github/valdr/ValdrBeanValidationTest.java
+++ b/valdr-bean-validation/src/test/java/com/github/valdr/ValdrBeanValidationTest.java
@@ -4,7 +4,6 @@
import com.github.valdr.util.SysOutSlurper;
import org.apache.commons.io.FileUtils;
-import org.junit.Test;
import java.io.File;
import java.io.FileWriter;
@@ -12,11 +11,12 @@
import java.nio.charset.Charset;
import lombok.SneakyThrows;
+import org.junit.jupiter.api.Test;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.fail;
/**
* Tests ValdrBeanValidation.
diff --git a/valdr-bean-validation/src/test/java/com/github/valdr/ValidationRulesServletTest.java b/valdr-bean-validation/src/test/java/com/github/valdr/ValidationRulesServletTest.java
index 66be7d0..b3d1b47 100644
--- a/valdr-bean-validation/src/test/java/com/github/valdr/ValidationRulesServletTest.java
+++ b/valdr-bean-validation/src/test/java/com/github/valdr/ValidationRulesServletTest.java
@@ -1,7 +1,7 @@
package com.github.valdr;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.test.util.ReflectionTestUtils;
@@ -10,13 +10,13 @@
import java.io.FileWriter;
import java.io.IOException;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletException;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.fail;
import static org.mockito.BDDMockito.given;
import static org.mockito.BDDMockito.mock;
@@ -30,8 +30,8 @@ public class ValidationRulesServletTest {
private MockHttpServletResponse response;
private MockHttpServletRequest request;
- @Before
- public void setUp() throws Exception {
+ @BeforeEach
+ public void setUp() {
servletConfig = mock(ServletConfig.class);
response = new MockHttpServletResponse();
request = new MockHttpServletRequest();
diff --git a/valdr-bean-validation/src/test/java/com/github/valdr/decorator/PatternDecoratorTest.java b/valdr-bean-validation/src/test/java/com/github/valdr/decorator/PatternDecoratorTest.java
index 6639e03..4fadb04 100644
--- a/valdr-bean-validation/src/test/java/com/github/valdr/decorator/PatternDecoratorTest.java
+++ b/valdr-bean-validation/src/test/java/com/github/valdr/decorator/PatternDecoratorTest.java
@@ -1,14 +1,14 @@
package com.github.valdr.decorator;
import com.github.valdr.ConstraintAttributes;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
@@ -25,7 +25,7 @@ public class PatternDecoratorTest {
@Test
public void shouldStoreThePatternForValueAttribute() {
/*
- * javax.validation.constraints.Pattern uses the attribute 'regex' to define the pattern. However, for valdr the
+ * jakarta.validation.constraints.Pattern uses the attribute 'regex' to define the pattern. However, for valdr the
* pattern must be passed in the 'value' attribute.
*/
// given
diff --git a/valdr-bean-validation/src/test/java/com/github/valdr/model/a/TestModelWithASingleAnnotatedMember.java b/valdr-bean-validation/src/test/java/com/github/valdr/model/a/TestModelWithASingleAnnotatedMember.java
index 81489b3..392373d 100644
--- a/valdr-bean-validation/src/test/java/com/github/valdr/model/a/TestModelWithASingleAnnotatedMember.java
+++ b/valdr-bean-validation/src/test/java/com/github/valdr/model/a/TestModelWithASingleAnnotatedMember.java
@@ -2,7 +2,7 @@
import lombok.Getter;
-import javax.validation.constraints.NotNull;
+import jakarta.validation.constraints.NotNull;
@Getter
public class TestModelWithASingleAnnotatedMember {
diff --git a/valdr-bean-validation/src/test/java/com/github/valdr/model/c/TestModelWithASingleAnnotatedMemberWithCustomMessageKey.java b/valdr-bean-validation/src/test/java/com/github/valdr/model/c/TestModelWithASingleAnnotatedMemberWithCustomMessageKey.java
index cbbe60e..a3dce5c 100644
--- a/valdr-bean-validation/src/test/java/com/github/valdr/model/c/TestModelWithASingleAnnotatedMemberWithCustomMessageKey.java
+++ b/valdr-bean-validation/src/test/java/com/github/valdr/model/c/TestModelWithASingleAnnotatedMemberWithCustomMessageKey.java
@@ -2,7 +2,7 @@
import lombok.Getter;
-import javax.validation.constraints.NotNull;
+import jakarta.validation.constraints.NotNull;
@Getter
public class TestModelWithASingleAnnotatedMemberWithCustomMessageKey {
diff --git a/valdr-bean-validation/src/test/java/com/github/valdr/model/d/SuperClassWithValidatedMember.java b/valdr-bean-validation/src/test/java/com/github/valdr/model/d/SuperClassWithValidatedMember.java
index 4b07b77..ca55471 100644
--- a/valdr-bean-validation/src/test/java/com/github/valdr/model/d/SuperClassWithValidatedMember.java
+++ b/valdr-bean-validation/src/test/java/com/github/valdr/model/d/SuperClassWithValidatedMember.java
@@ -2,7 +2,7 @@
import lombok.Getter;
-import javax.validation.constraints.NotNull;
+import jakarta.validation.constraints.NotNull;
@Getter
public class SuperClassWithValidatedMember {
diff --git a/valdr-bean-validation/src/test/java/com/github/valdr/model/e/TestModelClassWithLotsOfIrrelevantAnnotations.java b/valdr-bean-validation/src/test/java/com/github/valdr/model/e/TestModelClassWithLotsOfIrrelevantAnnotations.java
index 8f90362..d5ab290 100644
--- a/valdr-bean-validation/src/test/java/com/github/valdr/model/e/TestModelClassWithLotsOfIrrelevantAnnotations.java
+++ b/valdr-bean-validation/src/test/java/com/github/valdr/model/e/TestModelClassWithLotsOfIrrelevantAnnotations.java
@@ -2,11 +2,9 @@
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
-import org.hibernate.validator.constraints.SafeHtml;
public class TestModelClassWithLotsOfIrrelevantAnnotations {
@Deprecated
- @SafeHtml
@Getter
@JsonIgnore
private String foo;
diff --git a/valdr-bean-validation/src/test/java/com/github/valdr/model/f/TestModelWithEmailAnnotation.java b/valdr-bean-validation/src/test/java/com/github/valdr/model/f/TestModelWithEmailAnnotation.java
index d8b363f..abb0c88 100644
--- a/valdr-bean-validation/src/test/java/com/github/valdr/model/f/TestModelWithEmailAnnotation.java
+++ b/valdr-bean-validation/src/test/java/com/github/valdr/model/f/TestModelWithEmailAnnotation.java
@@ -1,6 +1,6 @@
package com.github.valdr.model.f;
-import javax.validation.constraints.Email;
+import jakarta.validation.constraints.Email;
public class TestModelWithEmailAnnotation {
@Email
diff --git a/valdr-bean-validation/src/test/java/com/github/valdr/model/h/TestModelWithPatterns.java b/valdr-bean-validation/src/test/java/com/github/valdr/model/h/TestModelWithPatterns.java
index a230222..49cf76c 100644
--- a/valdr-bean-validation/src/test/java/com/github/valdr/model/h/TestModelWithPatterns.java
+++ b/valdr-bean-validation/src/test/java/com/github/valdr/model/h/TestModelWithPatterns.java
@@ -1,6 +1,6 @@
package com.github.valdr.model.h;
-import javax.validation.constraints.Pattern;
+import jakarta.validation.constraints.Pattern;
public class TestModelWithPatterns {
@Pattern(regexp = "abc")
diff --git a/valdr-bean-validation/src/test/java/com/github/valdr/model/i/TestModelWithoutAnyConstraintAnnotations.java b/valdr-bean-validation/src/test/java/com/github/valdr/model/i/TestModelWithoutAnyConstraintAnnotations.java
index 24412a8..2f3359a 100644
--- a/valdr-bean-validation/src/test/java/com/github/valdr/model/i/TestModelWithoutAnyConstraintAnnotations.java
+++ b/valdr-bean-validation/src/test/java/com/github/valdr/model/i/TestModelWithoutAnyConstraintAnnotations.java
@@ -4,14 +4,14 @@
import lombok.Getter;
import lombok.NonNull;
-import javax.persistence.Column;
-import javax.persistence.MappedSuperclass;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import javax.persistence.Version;
-import javax.xml.bind.annotation.XmlRootElement;
+import jakarta.persistence.Column;
+import jakarta.persistence.MappedSuperclass;
+import jakarta.persistence.PrePersist;
+import jakarta.persistence.PreUpdate;
+import jakarta.persistence.Temporal;
+import jakarta.persistence.TemporalType;
+import jakarta.persistence.Version;
+import jakarta.xml.bind.annotation.XmlRootElement;
import java.util.Date;
/**
diff --git a/valdr-bean-validation/src/test/java/com/github/valdr/model/validation/CustomValidation.java b/valdr-bean-validation/src/test/java/com/github/valdr/model/validation/CustomValidation.java
index c7e5f6b..39d06d8 100644
--- a/valdr-bean-validation/src/test/java/com/github/valdr/model/validation/CustomValidation.java
+++ b/valdr-bean-validation/src/test/java/com/github/valdr/model/validation/CustomValidation.java
@@ -1,7 +1,7 @@
package com.github.valdr.model.validation;
-import javax.validation.Constraint;
+import jakarta.validation.Constraint;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
diff --git a/valdr-bean-validation/src/test/java/com/github/valdr/serializer/MinimalMapSerializerTest.java b/valdr-bean-validation/src/test/java/com/github/valdr/serializer/MinimalMapSerializerTest.java
index 724d5ee..c0a0de4 100644
--- a/valdr-bean-validation/src/test/java/com/github/valdr/serializer/MinimalMapSerializerTest.java
+++ b/valdr-bean-validation/src/test/java/com/github/valdr/serializer/MinimalMapSerializerTest.java
@@ -5,16 +5,16 @@
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.github.valdr.MinimalMap;
import lombok.Value;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
/**
* Tests {@link MinimalMapSerializer}.
@@ -26,7 +26,7 @@ public class MinimalMapSerializerTest {
/**
* Initializes the map.
*/
- @Before
+ @BeforeEach
public void setup() {
attributeMap = new TestMinimalMap();
}
diff --git a/valdr-bean-validation/valdr-bean-validation.iml b/valdr-bean-validation/valdr-bean-validation.iml
index e07368d..059c9f4 100644
--- a/valdr-bean-validation/valdr-bean-validation.iml
+++ b/valdr-bean-validation/valdr-bean-validation.iml
@@ -1,6 +1,17 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -12,40 +23,48 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file