Skip to content

Commit 2350c8a

Browse files
committed
Remove Hibernate substitutions and deprecated properties usage
This commit raises the baseline to Hibernate 6.5 for native support, which allows to remove remaining Hibernate substitutions as well as deprecated properties usage. Closes gh-32314
1 parent dfc053a commit 2350c8a

File tree

3 files changed

+1
-137
lines changed

3 files changed

+1
-137
lines changed

Diff for: spring-orm/src/main/java/org/springframework/orm/jpa/vendor/SpringHibernateJpaPersistenceProvider.java

+1-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,7 +24,6 @@
2424
import jakarta.persistence.spi.PersistenceUnitInfo;
2525
import org.hibernate.bytecode.enhance.spi.EnhancementContext;
2626
import org.hibernate.cfg.Configuration;
27-
import org.hibernate.cfg.Environment;
2827
import org.hibernate.jpa.HibernatePersistenceProvider;
2928
import org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl;
3029
import org.hibernate.jpa.boot.internal.PersistenceUnitInfoDescriptor;
@@ -43,16 +42,8 @@
4342
* @since 4.1
4443
* @see Configuration#addPackage
4544
*/
46-
@SuppressWarnings("removal") // for Environment properties on Hibernate 6.2
4745
class SpringHibernateJpaPersistenceProvider extends HibernatePersistenceProvider {
4846

49-
static {
50-
if (NativeDetector.inNativeImage()) {
51-
System.setProperty(Environment.BYTECODE_PROVIDER, Environment.BYTECODE_PROVIDER_NAME_NONE);
52-
System.setProperty(Environment.USE_REFLECTION_OPTIMIZER, Boolean.FALSE.toString());
53-
}
54-
}
55-
5647
@Override
5748
@SuppressWarnings({"rawtypes", "unchecked"}) // on Hibernate 6
5849
public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, Map properties) {

Diff for: spring-orm/src/main/java/org/springframework/orm/jpa/vendor/Target_BytecodeProvider.java

-59
This file was deleted.

Diff for: spring-orm/src/main/java/org/springframework/orm/jpa/vendor/Target_BytecodeProviderInitiator.java

-68
This file was deleted.

0 commit comments

Comments
 (0)