Skip to content
Open
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@ jobs:
matrix:
os:
- {
name: "Linux JDK 21",
name: "Linux JDK 25",
runs-on: 'ubuntu-latest',
java: {
version: 21
version: 25
},
maven: {
args: ''
}
}
- {
name: "Windows JDK 21",
name: "Windows JDK 25",
runs-on: 'windows-latest',
java: {
version: 21
version: 25
},
maven: {
args: ''
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Just fork this repository, build your test case and attach it as an archive to a

### <a id="setup-build-tools"></a> Build tools

You will need JDK 21 or above for the build.
You will need JDK 25 or above for the build.

A maven wrapper script is provided at the root of the repository (`./mvnw`),
so you can use that and don't need to care about the required version of Maven
Expand Down Expand Up @@ -97,7 +97,7 @@ If you already did that, close IntelliJ IDEA, run `./mvnw clean`, and open Intel
You will need to change some settings:

* `Build, Execution, Deployment > Build Tools > Maven`: set `Maven home path` to `Use Maven wrapper`
* In `Project structure`, make sure the project JDK is JDK 21.
* In `Project structure`, make sure the project JDK is JDK 25.
* Set up [formatting rules and code style](#setup-ide-formatting).

Then a few steps will initialize your workspace:
Expand Down Expand Up @@ -349,19 +349,19 @@ than [the one required for the build](#setup-build-tools),
you will need to have both JDKs installed,
and then you will need to pass additional properties to Maven.

To test Hibernate Validator against the JDK 17:
To test Hibernate Validator against the JDK 25:

```bash
./mvnw clean install
```

To test Hibernate Validator against JDKs other than 17:
To test Hibernate Validator against JDKs other than 25:

```bash
./mvnw clean install -Djava-version.test.release=21 -Djava-version.test.compiler.java_home=/path/to/jdk21
```

Or more simply, if the JDK you want to test against is newer than 21 and is your default JDK:
Or more simply, if the JDK you want to test against is newer than 25 and is your default JDK:

```bash
./mvnw clean install -Djava-version.test.release=18
Expand Down
18 changes: 6 additions & 12 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ import org.hibernate.jenkins.pipeline.helpers.alternative.AlternativeMultiMap
*
*/

@Field final String DEFAULT_JDK_TOOL = 'OpenJDK 21 Latest'
@Field final String DEFAULT_JDK_TOOL = 'OpenJDK 25 Latest'
@Field final String MAVEN_TOOL = 'Apache Maven 3.9'

// Default node pattern, to be used for resource-intensive stages.
Expand Down Expand Up @@ -115,31 +115,25 @@ stage('Configure') {
new JdkBuildEnvironment(testJavaVersion: '17', testCompilerTool: 'OpenJDK 17 Latest',
condition: TestCondition.AFTER_MERGE),
new JdkBuildEnvironment(testJavaVersion: '21', testCompilerTool: 'OpenJDK 21 Latest',
condition: TestCondition.BEFORE_MERGE,
isDefault: true),
condition: TestCondition.AFTER_MERGE),

// We want to enable preview features when testing newer builds of OpenJDK:
// even if we don't use these features, just enabling them can cause side effects
// and it's useful to test that.
new JdkBuildEnvironment(testJavaVersion: '23', testCompilerTool: 'OpenJDK 23 Latest',
testLauncherArgs: '--enable-preview',
condition: TestCondition.AFTER_MERGE),
new JdkBuildEnvironment(testJavaVersion: '24', testCompilerTool: 'OpenJDK 24 Latest',
testLauncherArgs: '--enable-preview',
condition: TestCondition.AFTER_MERGE),
new JdkBuildEnvironment(testJavaVersion: '25', testCompilerTool: 'OpenJDK 25 Latest',
testLauncherArgs: '--enable-preview',
condition: TestCondition.AFTER_MERGE),
condition: TestCondition.BEFORE_MERGE,
isDefault: true),
new JdkBuildEnvironment(testJavaVersion: '26', testCompilerTool: 'OpenJDK 26 Latest',
testLauncherArgs: '--enable-preview',
condition: TestCondition.AFTER_MERGE)
],
wildflyTck: [
new WildFlyTckBuildEnvironment(testJavaVersion: '21', testCompilerTool: 'OpenJDK 21 Latest',
new WildFlyTckBuildEnvironment(testJavaVersion: '25', testCompilerTool: 'OpenJDK 25 Latest',
condition: TestCondition.ON_DEMAND)
],
sigtest: [
new SigTestBuildEnvironment(testJavaVersion: '21', jdkTool: 'OpenJDK 21 Latest',
new SigTestBuildEnvironment(testJavaVersion: '25', jdkTool: 'OpenJDK 25 Latest',
condition: TestCondition.BEFORE_MERGE)
]
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import jakarta.validation.valueextraction.ExtractedValue;
import jakarta.validation.valueextraction.ValueExtractor;

import org.hibernate.validator.internal.IgnoreForbiddenApisErrors;
import org.hibernate.validator.internal.engine.path.MutableNode;

import javafx.beans.property.ListProperty;
Expand All @@ -24,8 +23,6 @@
*
* @author Guillaume Smet
*/
@SuppressWarnings("restriction")
@IgnoreForbiddenApisErrors(reason = "Usage of JavaFX classes")
class ListPropertyValueExtractor implements ValueExtractor<ListProperty<@ExtractedValue ?>> {

static final ValueExtractorDescriptor DESCRIPTOR = new ValueExtractorDescriptor( new ListPropertyValueExtractor(), ListProperty.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import jakarta.validation.valueextraction.ExtractedValue;
import jakarta.validation.valueextraction.ValueExtractor;

import org.hibernate.validator.internal.IgnoreForbiddenApisErrors;
import org.hibernate.validator.internal.engine.path.MutableNode;

import javafx.beans.property.MapProperty;
Expand All @@ -24,8 +23,6 @@
*
* @author Guillaume Smet
*/
@SuppressWarnings("restriction")
@IgnoreForbiddenApisErrors(reason = "Usage of JavaFX classes")
class MapPropertyKeyExtractor implements ValueExtractor<MapProperty<@ExtractedValue ?, ?>> {

static final ValueExtractorDescriptor DESCRIPTOR = new ValueExtractorDescriptor( new MapPropertyKeyExtractor(), MapProperty.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import jakarta.validation.valueextraction.ExtractedValue;
import jakarta.validation.valueextraction.ValueExtractor;

import org.hibernate.validator.internal.IgnoreForbiddenApisErrors;
import org.hibernate.validator.internal.engine.path.MutableNode;

import javafx.beans.property.MapProperty;
Expand All @@ -24,8 +23,6 @@
*
* @author Guillaume Smet
*/
@SuppressWarnings("restriction")
@IgnoreForbiddenApisErrors(reason = "Usage of JavaFX classes")
class MapPropertyValueExtractor implements ValueExtractor<MapProperty<?, @ExtractedValue ?>> {

static final ValueExtractorDescriptor DESCRIPTOR = new ValueExtractorDescriptor( new MapPropertyValueExtractor(), MapProperty.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,13 @@
import jakarta.validation.valueextraction.UnwrapByDefault;
import jakarta.validation.valueextraction.ValueExtractor;

import org.hibernate.validator.internal.IgnoreForbiddenApisErrors;

import javafx.beans.value.ObservableValue;

/**
* A value extractor for JavaFX's {@link ObservableValue}, e.g. {@code Property<String>}.
*
* @author Gunnar Morling
*/
@SuppressWarnings("restriction")
@IgnoreForbiddenApisErrors(reason = "Usage of JavaFX classes")
@UnwrapByDefault
class ObservableValueValueExtractor implements ValueExtractor<ObservableValue<@ExtractedValue ?>> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import jakarta.validation.valueextraction.ExtractedValue;
import jakarta.validation.valueextraction.ValueExtractor;

import org.hibernate.validator.internal.IgnoreForbiddenApisErrors;
import org.hibernate.validator.internal.engine.path.MutableNode;

import javafx.beans.property.ReadOnlyListProperty;
Expand All @@ -24,8 +23,6 @@
*
* @author Guillaume Smet
*/
@SuppressWarnings("restriction")
@IgnoreForbiddenApisErrors(reason = "Usage of JavaFX classes")
class ReadOnlyListPropertyValueExtractor implements ValueExtractor<ReadOnlyListProperty<@ExtractedValue ?>> {

static final ValueExtractorDescriptor DESCRIPTOR = new ValueExtractorDescriptor( new ReadOnlyListPropertyValueExtractor(), ReadOnlyListProperty.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import jakarta.validation.valueextraction.ExtractedValue;
import jakarta.validation.valueextraction.ValueExtractor;

import org.hibernate.validator.internal.IgnoreForbiddenApisErrors;
import org.hibernate.validator.internal.engine.path.MutableNode;

import javafx.beans.property.ReadOnlyMapProperty;
Expand All @@ -24,8 +23,6 @@
*
* @author Guillaume Smet
*/
@SuppressWarnings("restriction")
@IgnoreForbiddenApisErrors(reason = "Usage of JavaFX classes")
class ReadOnlyMapPropertyKeyExtractor implements ValueExtractor<ReadOnlyMapProperty<@ExtractedValue ?, ?>> {

static final ValueExtractorDescriptor DESCRIPTOR = new ValueExtractorDescriptor( new ReadOnlyMapPropertyKeyExtractor(), ReadOnlyMapProperty.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import jakarta.validation.valueextraction.ExtractedValue;
import jakarta.validation.valueextraction.ValueExtractor;

import org.hibernate.validator.internal.IgnoreForbiddenApisErrors;
import org.hibernate.validator.internal.engine.path.MutableNode;

import javafx.beans.property.ReadOnlyMapProperty;
Expand All @@ -24,8 +23,6 @@
*
* @author Guillaume Smet
*/
@SuppressWarnings("restriction")
@IgnoreForbiddenApisErrors(reason = "Usage of JavaFX classes")
class ReadOnlyMapPropertyValueExtractor implements ValueExtractor<ReadOnlyMapProperty<?, @ExtractedValue ?>> {

static final ValueExtractorDescriptor DESCRIPTOR = new ValueExtractorDescriptor( new ReadOnlyMapPropertyValueExtractor(), ReadOnlyMapProperty.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import jakarta.validation.valueextraction.ExtractedValue;
import jakarta.validation.valueextraction.ValueExtractor;

import org.hibernate.validator.internal.IgnoreForbiddenApisErrors;
import org.hibernate.validator.internal.engine.path.MutableNode;

import javafx.beans.property.ReadOnlySetProperty;
Expand All @@ -24,8 +23,6 @@
*
* @author Guillaume Smet
*/
@SuppressWarnings("restriction")
@IgnoreForbiddenApisErrors(reason = "Usage of JavaFX classes")
class ReadOnlySetPropertyValueExtractor implements ValueExtractor<ReadOnlySetProperty<@ExtractedValue ?>> {

static final ValueExtractorDescriptor DESCRIPTOR = new ValueExtractorDescriptor( new ReadOnlySetPropertyValueExtractor(), ReadOnlySetProperty.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import jakarta.validation.valueextraction.ExtractedValue;
import jakarta.validation.valueextraction.ValueExtractor;

import org.hibernate.validator.internal.IgnoreForbiddenApisErrors;
import org.hibernate.validator.internal.engine.path.MutableNode;

import javafx.beans.property.SetProperty;
Expand All @@ -24,8 +23,6 @@
*
* @author Guillaume Smet
*/
@SuppressWarnings("restriction")
@IgnoreForbiddenApisErrors(reason = "Usage of JavaFX classes")
class SetPropertyValueExtractor implements ValueExtractor<SetProperty<@ExtractedValue ?>> {

static final ValueExtractorDescriptor DESCRIPTOR = new ValueExtractorDescriptor( new SetPropertyValueExtractor(), SetProperty.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import jakarta.validation.Validator;
import jakarta.validation.constraints.Min;

import org.hibernate.validator.internal.IgnoreForbiddenApisErrors;
import org.hibernate.validator.internal.util.actions.GetClassLoader;
import org.hibernate.validator.internal.util.actions.SetContextClassLoader;
import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator;
Expand Down Expand Up @@ -141,7 +140,6 @@ public ELIgnoringClassLoader(String packageMissing) {
}

@Override
@IgnoreForbiddenApisErrors(reason = "getPackage() is deprecated but getDefinedPackage() is only available from JDK 9.")
public Class<?> loadClass(String className) throws ClassNotFoundException {
// This is what we in the end want to achieve. Throw ClassNotFoundException for jakarta.el classes
if ( className.startsWith( packageMissing ) ) {
Expand Down
2 changes: 1 addition & 1 deletion jenkins/nightly/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@Library('hibernate-jenkins-pipeline-helpers') _

def withMavenWorkspace(Closure body) {
withMavenWorkspace('OpenJDK 21 Latest', body)
withMavenWorkspace('OpenJDK 25 Latest', body)
}

def withMavenWorkspace(jdk, Closure body) {
Expand Down
2 changes: 1 addition & 1 deletion jenkins/release/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pipeline {
}
tools {
maven 'Apache Maven 3.9'
jdk 'OpenJDK 21 Latest'
jdk 'OpenJDK 25 Latest'
}
options {
buildDiscarder logRotator(daysToKeepStr: '30', numToKeepStr: '10')
Expand Down
2 changes: 1 addition & 1 deletion jenkins/snapshot-publish/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pipeline {
}
tools {
maven 'Apache Maven 3.9'
jdk 'OpenJDK 21 Latest'
jdk 'OpenJDK 25 Latest'
}
options {
// Wait for 1h before publishing snapshots, in case there's more commits.
Expand Down
Loading