diff --git a/Jenkinsfile b/Jenkinsfile
index 94565de82..15eb98791 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -258,6 +258,7 @@ stage('Default build') {
install \
"} \
-Pdist \
+ -Pcoverage \
-Pjqassistant -Pci-build \
${enableDefaultBuildIT ? '' : '-DskipITs'} \
${toTestJdkArg(environments.content.jdk.default)} \
diff --git a/build/reports/pom.xml b/build/reports/pom.xml
index 6915655e0..4d11d84cf 100644
--- a/build/reports/pom.xml
+++ b/build/reports/pom.xml
@@ -156,4 +156,31 @@
+
+
+ coverage-report
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+
+
+ jacoco-report-aggregate
+ package
+
+ report-aggregate
+
+
+
+ **/*.exec
+
+
+
+
+
+
+
+
+
diff --git a/engine/pom.xml b/engine/pom.xml
index 0bced06ec..2dc760d12 100644
--- a/engine/pom.xml
+++ b/engine/pom.xml
@@ -316,6 +316,27 @@
tests
4
+
+
+ default-test
+
+
+ **/ByteBuddy*Test
+
+
+
+
+ bytebuddy-test
+ test
+ test
+
+ ${surefire.jvm.nojacoco.args}
+
+ **/ByteBuddy*Test
+
+
+
+
org.apache.maven.plugins
diff --git a/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodvalidation/RelaxedMethodParameterConstraintsTest.java b/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodvalidation/RelaxedMethodParameterConstraintsTest.java
index 231a18eac..1dc01c62f 100644
--- a/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodvalidation/RelaxedMethodParameterConstraintsTest.java
+++ b/engine/src/test/java/org/hibernate/validator/test/internal/engine/methodvalidation/RelaxedMethodParameterConstraintsTest.java
@@ -72,7 +72,7 @@ public void disallowStrengtheningInSubType() {
}
@Test
- public void allowStrengtheningInSubType() {
+ public void allowStrengtheningInSubType() throws NoSuchMethodException {
HibernateValidatorConfiguration configuration = Validation.byProvider( HibernateValidator.class ).configure();
configuration.allowOverridingMethodAlterParameterConstraint( true );
@@ -83,7 +83,7 @@ public void allowStrengtheningInSubType() {
Set> violations =
validator.forExecutables().validateParameters(
new RealizationWithAdditionalMethodParameterConstraint(),
- RealizationWithAdditionalMethodParameterConstraint.class.getDeclaredMethods()[0],
+ RealizationWithAdditionalMethodParameterConstraint.class.getDeclaredMethod( "bar", String.class ),
new Object[] { "foo" }
);
diff --git a/engine/src/test/java/org/hibernate/validator/test/internal/util/ExecutableHelperTest.java b/engine/src/test/java/org/hibernate/validator/test/internal/util/ExecutableHelperTest.java
index 6d57201ad..4552c2c80 100644
--- a/engine/src/test/java/org/hibernate/validator/test/internal/util/ExecutableHelperTest.java
+++ b/engine/src/test/java/org/hibernate/validator/test/internal/util/ExecutableHelperTest.java
@@ -117,7 +117,7 @@ public void methodDefinedInOtherTypeHierarchyDoesNotOverride() throws Exception
@Test
public void methodWithNarrowedParameterTypeDoesNotOverride() throws Exception {
- Method methodFromBase = SimpleServiceBase.class.getDeclaredMethods()[0];
+ Method methodFromBase = SimpleServiceBase.class.getDeclaredMethod( "doSomething", Number.class );
Method methodFromImpl = SimpleServiceImpl1.class.getDeclaredMethod( "doSomething", Number.class );
assertThat( executableHelper.overrides( methodFromImpl, methodFromBase ) ).isTrue();
@@ -129,7 +129,7 @@ public void methodWithNarrowedParameterTypeDoesNotOverride() throws Exception {
@Test
public void methodWithIntermediateClass() throws Exception {
- Method methodFromBase = SimpleServiceBase.class.getDeclaredMethods()[0];
+ Method methodFromBase = SimpleServiceBase.class.getDeclaredMethod( "doSomething", Number.class );
Method methodFromImpl = SimpleServiceImpl2.class.getDeclaredMethod( "doSomething", Number.class );
assertThat( executableHelper.overrides( methodFromImpl, methodFromBase ) ).isTrue();
@@ -141,7 +141,7 @@ public void methodWithIntermediateClass() throws Exception {
@Test
public void methodWithGenerics() throws Exception {
- Method methodFromBase = GenericServiceBase.class.getDeclaredMethods()[0];
+ Method methodFromBase = GenericServiceBase.class.getDeclaredMethod( "doSomething", Object.class );
Method methodFromImpl = GenericServiceImpl1.class.getDeclaredMethod( "doSomething", Number.class );
assertThat( executableHelper.overrides( methodFromImpl, methodFromBase ) ).isTrue();
@@ -153,7 +153,7 @@ public void methodWithGenerics() throws Exception {
@Test
public void methodWithGenericsAndIntermediateClass() throws Exception {
- Method methodFromBase = GenericServiceBase.class.getDeclaredMethods()[0];
+ Method methodFromBase = GenericServiceBase.class.getDeclaredMethod( "doSomething", Object.class );
Method methodFromImpl = GenericServiceImpl2.class.getDeclaredMethod( "doSomething", Number.class );
assertThat( executableHelper.overrides( methodFromImpl, methodFromBase ) ).isTrue();
@@ -165,10 +165,10 @@ public void methodWithGenericsAndIntermediateClass() throws Exception {
@Test
public void methodWithGenericsAndMultipleIntermediateClasses() throws Exception {
- Method methodFromBase = GenericServiceBase.class.getDeclaredMethods()[0];
+ Method methodFromBase = GenericServiceBase.class.getDeclaredMethod( "doSomething", Object.class );
Method methodFromImpl = GenericServiceImpl3.class.getDeclaredMethod( "doSomething", Number.class );
- assertThat( executableHelper.overrides( methodFromImpl, methodFromBase ) ).isTrue();
+ assertThat( executableHelper.overrides( methodFromImpl, methodFromBase ) ).as( methodFromImpl + " : " + methodFromBase ).isTrue();
methodFromImpl = GenericServiceImpl2.class.getDeclaredMethod( "doSomething", Integer.class );
@@ -177,7 +177,7 @@ public void methodWithGenericsAndMultipleIntermediateClasses() throws Exception
@Test
public void methodWithParameterizedSubType() throws Exception {
- Method methodFromBase = GenericServiceBase.class.getDeclaredMethods()[0];
+ Method methodFromBase = GenericServiceBase.class.getDeclaredMethod( "doSomething", Object.class );
Method methodFromImpl = ParameterizedSubType.class.getDeclaredMethod( "doSomething", Object.class );
assertThat( executableHelper.overrides( methodFromImpl, methodFromBase ) ).isTrue();
diff --git a/pom.xml b/pom.xml
index 051c766bc..7815fe1c0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -269,6 +269,7 @@
2.17.1
3.3.2
2.43.0
+ 0.8.12
forbidden-junit.txt
@@ -358,6 +359,9 @@
+
+
+
+ initialize
+
+ prepare-agent-integration
+
+
+ failsafe.jvm.args.jacoco
+ ${project.build.directory}/coverage/jacoco.exec
+
+
+
+
+
+
+
+