Skip to content

Commit 1b62581

Browse files
committed
fix some warnings in the XxxxSettings classes
1 parent 04a15ce commit 1b62581

File tree

9 files changed

+38
-30
lines changed

9 files changed

+38
-30
lines changed

hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ public interface AvailableSettings
106106
* @since 5.3
107107
*/
108108
@Deprecated(since = "7.0", forRemoval = true)
109+
@SuppressWarnings("DeprecatedIsStillUsed")
109110
String DELAY_ENTITY_LOADER_CREATIONS = "hibernate.loader.delay_entity_loader_creations";
110111

111112
/**
@@ -157,6 +158,7 @@ public interface AvailableSettings
157158
* @deprecated This is no longer useful and will be removed.
158159
*/
159160
@Deprecated(since = "7.0", forRemoval = true)
161+
@SuppressWarnings("DeprecatedIsStillUsed")
160162
String DISCARD_PC_ON_CLOSE = "hibernate.discard_pc_on_close";
161163

162164
/**

hibernate-core/src/main/java/org/hibernate/cfg/BatchSettings.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,6 @@ public interface BatchSettings {
6969
* @deprecated Use {@link #BUILDER} instead
7070
*/
7171
@Deprecated(since="6.4")
72+
@SuppressWarnings("DeprecatedIsStillUsed")
7273
String BATCH_STRATEGY = "hibernate.jdbc.factory_class";
7374
}

hibernate-core/src/main/java/org/hibernate/cfg/BytecodeSettings.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public interface BytecodeSettings {
2424
* See HHH-17643
2525
*/
2626
@Deprecated( forRemoval = true )
27+
@SuppressWarnings("DeprecatedIsStillUsed")
2728
String BYTECODE_PROVIDER = "hibernate.bytecode.provider";
2829

2930
/**

hibernate-core/src/main/java/org/hibernate/cfg/JdbcSettings.java

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import org.hibernate.sql.ast.spi.ParameterMarkerStrategy;
1616

1717
/**
18-
* Settings related to JDBC, Connections, pools, Dialects, etc
18+
* Settings related to JDBC, Connections, pools, Dialects, and so on.
1919
*
2020
* @author Steve Ebersole
2121
*/
@@ -162,7 +162,7 @@ public interface JdbcSettings extends C3p0Settings, AgroalSettings, HikariCPSett
162162
/**
163163
* Used in conjunction with {@value #JAKARTA_HBM2DDL_DB_NAME} for the purpose of
164164
* determining the {@link org.hibernate.dialect.Dialect} to use when the name does
165-
* not provide enough detail.
165+
* not provide enough information.
166166
* <p>
167167
* The value is expected to match what would be returned from
168168
* {@link java.sql.DatabaseMetaData#getDatabaseProductVersion()}) for the
@@ -175,7 +175,7 @@ public interface JdbcSettings extends C3p0Settings, AgroalSettings, HikariCPSett
175175
/**
176176
* Used in conjunction with {@value #JAKARTA_HBM2DDL_DB_NAME} for the purpose of
177177
* determining the {@link org.hibernate.dialect.Dialect} to use when the name does
178-
* not provide enough detail.
178+
* not provide enough information.
179179
* <p>
180180
* The value is expected to match what would be returned from
181181
* {@link java.sql.DatabaseMetaData#getDatabaseMajorVersion()}) for the underlying
@@ -188,7 +188,7 @@ public interface JdbcSettings extends C3p0Settings, AgroalSettings, HikariCPSett
188188
/**
189189
* Used in conjunction with {@value #JAKARTA_HBM2DDL_DB_NAME} for the purpose of
190190
* determining the {@link org.hibernate.dialect.Dialect} to use when the name does
191-
* not provide enough detail.
191+
* not provide enough information.
192192
* <p>
193193
* The value is expected to match what would be returned from
194194
* {@link java.sql.DatabaseMetaData#getDatabaseMinorVersion()}) for the underlying
@@ -258,7 +258,7 @@ public interface JdbcSettings extends C3p0Settings, AgroalSettings, HikariCPSett
258258
* The default implementation is not recommended for use in production.
259259
*
260260
* @apiNote The term {@code "class"} appears in the setting name due to legacy reasons;
261-
* however it can accept instances.
261+
* however, it can accept instances.
262262
*/
263263
String CONNECTION_PROVIDER = "hibernate.connection.provider_class";
264264

@@ -303,14 +303,15 @@ public interface JdbcSettings extends C3p0Settings, AgroalSettings, HikariCPSett
303303

304304
/**
305305
* Indicates that connections obtained from the configured {@link ConnectionProvider} have
306-
* auto-commit already disabled when they are acquired.
306+
* {@linkplain java.sql.Connection#getAutoCommit auto-commit} already disabled when they
307+
* are acquired.
307308
* <p>
308309
* It is inappropriate to set this value to {@code true} when the connections returned by
309310
* the provider do not, in fact, have auto-commit disabled. Doing so may lead to Hibernate
310311
* executing SQL operations outside the scope of any transaction.
311312
*
312313
* @apiNote By default, Hibernate calls {@link java.sql.Connection#setAutoCommit(boolean)}
313-
* on newly-obtained connections. With this setting enabled, that call is skipped, along
314+
* on newly obtained connections. With this setting enabled, that call is skipped, along
314315
* with some other operations, in the interest of performance.
315316
*
316317
* @settingDefault {@code false}
@@ -332,6 +333,7 @@ public interface JdbcSettings extends C3p0Settings, AgroalSettings, HikariCPSett
332333
* and {@link org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProvider}.
333334
*/
334335
@Deprecated(since="7")
336+
@SuppressWarnings("DeprecatedIsStillUsed")
335337
String CONNECTION_PREFIX = "hibernate.connection";
336338

337339
/**
@@ -340,7 +342,7 @@ public interface JdbcSettings extends C3p0Settings, AgroalSettings, HikariCPSett
340342
* either:
341343
* <ul>
342344
* <li>an instance of {@code StatementInspector},
343-
* <li>a {@link Class} representing an class that implements {@code StatementInspector}, or
345+
* <li>a {@link Class} representing a class that implements {@code StatementInspector}, or
344346
* <li>the name of a class that implements {@code StatementInspector}.
345347
* </ul>
346348
*
@@ -423,6 +425,7 @@ public interface JdbcSettings extends C3p0Settings, AgroalSettings, HikariCPSett
423425
* @deprecated It's not necessary to set this explicitly
424426
*/
425427
@Deprecated(since = "7", forRemoval = true)
428+
@SuppressWarnings("DeprecatedIsStillUsed")
426429
String USE_SCROLLABLE_RESULTSET = "hibernate.jdbc.use_scrollable_resultset";
427430

428431
/**
@@ -539,12 +542,12 @@ public interface JdbcSettings extends C3p0Settings, AgroalSettings, HikariCPSett
539542
* Whether access to JDBC {@linkplain java.sql.DatabaseMetaData metadata} is allowed during bootstrap.
540543
* <p/>
541544
* Typically, Hibernate accesses this metadata to understand the capabilities of the underlying
542-
* database to help minimize needed configuration. Disabling this access means that only explicit
543-
* settings are used. At a minimum, the Dialect to use must be specified using either the {@value #DIALECT}
544-
* or {@value JdbcSettings#JAKARTA_HBM2DDL_DB_NAME} setting. When the Dialect to use is specified in
545+
* database to help minimize needed configuration. Disabling this access means that only explicit
546+
* settings are used. At a minimum, the Dialect to use must be specified using either the {@value #DIALECT}
547+
* or {@value JdbcSettings#JAKARTA_HBM2DDL_DB_NAME} setting. When the Dialect to use is specified in
545548
* this manner it is generally a good idea to specify the
546-
* {@linkplain JdbcSettings#JAKARTA_HBM2DDL_DB_VERSION database version} as well - Dialects use the version
547-
* to configure themselves.
549+
* {@linkplain JdbcSettings#JAKARTA_HBM2DDL_DB_VERSION database version} as well - Dialects use the
550+
* version to configure themselves.
548551
*
549552
* @apiNote The specified Dialect may also provide defaults into the "explicit" settings.
550553
*

hibernate-core/src/main/java/org/hibernate/cfg/JpaComplianceSettings.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,5 +190,6 @@ public interface JpaComplianceSettings {
190190
* @deprecated Prefer {@link #JPA_QUERY_COMPLIANCE}
191191
*/
192192
@Deprecated
193+
@SuppressWarnings("DeprecatedIsStillUsed")
193194
String JPAQL_STRICT_COMPLIANCE= "hibernate.query.jpaql_strict_compliance";
194195
}

hibernate-core/src/main/java/org/hibernate/cfg/ManagedBeanSettings.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ public interface ManagedBeanSettings {
8080
String DELAY_CDI_ACCESS = "hibernate.delay_cdi_access";
8181

8282
/**
83-
* Controls whether Hibernate can try to create beans other than converters
84-
* and listeners using CDI. Only meaningful when a CDI {@link #BEAN_CONTAINER container}
83+
* Controls whether Hibernate can try to create beans other than converters and
84+
* listeners using CDI. Only meaningful when a CDI {@link #BEAN_CONTAINER container}
8585
* is used.
8686
* <p>
8787
* By default, Hibernate will only attempt to create converter and listener beans using CDI.

hibernate-core/src/main/java/org/hibernate/cfg/MappingSettings.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ public interface MappingSettings {
326326
String XML_FORMAT_MAPPER = "hibernate.type.xml_format_mapper";
327327

328328
/**
329-
* Specifies whether to use the legacy provider specific and non-portable XML format for collections and byte arrays
330-
* for XML serialization/deserialization.
329+
* Specifies whether to use the legacy provider-specific and non-portable XML format for
330+
* collections and byte arrays for XML serialization/deserialization.
331331
* <p>
332332
* {@code false} by default. This property only exists for backwards compatibility.
333333
*
@@ -355,8 +355,8 @@ public interface MappingSettings {
355355
* The possible options for this setting are enumerated by
356356
* {@link org.hibernate.annotations.TimeZoneStorageType}.
357357
*
358-
* @apiNote For backward compatibility with older versions of Hibernate, set this property to
359-
* {@link org.hibernate.annotations.TimeZoneStorageType#NORMALIZE NORMALIZE}.
358+
* @apiNote For backward compatibility with older versions of Hibernate, set this property
359+
* to {@link org.hibernate.annotations.TimeZoneStorageType#NORMALIZE NORMALIZE}.
360360
*
361361
* @settingDefault {@link org.hibernate.annotations.TimeZoneStorageType#DEFAULT DEFAULT},
362362
* which guarantees that the {@linkplain java.time.OffsetDateTime#toInstant() instant}
@@ -374,7 +374,7 @@ public interface MappingSettings {
374374
* Used to specify the {@link org.hibernate.boot.model.naming.ImplicitNamingStrategy}
375375
* class to use. The following shortcut names are defined for this setting:
376376
* <ul>
377-
* <li>{@code "default"} and {@code "jpa"} are an abbreviations for
377+
* <li>{@code "default"} and {@code "jpa"} are abbreviations for
378378
* {@link org.hibernate.boot.model.naming.ImplicitNamingStrategyJpaCompliantImpl}
379379
* <li>{@code "legacy-jpa"} is an abbreviation for
380380
* {@link org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl}
@@ -465,7 +465,7 @@ public interface MappingSettings {
465465
* Accepts any of:
466466
* <ul>
467467
* <li>an instance of {@code CollectionClassification}
468-
* <li>the (case insensitive) name of a {@code CollectionClassification} (list e.g.)
468+
* <li>the (case-insensitive) name of a {@code CollectionClassification} (list e.g.)
469469
* <li>a {@link Class} representing either {@link java.util.List} or {@link java.util.Collection}
470470
* </ul>
471471
*

hibernate-core/src/main/java/org/hibernate/cfg/SchemaToolingSettings.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ public interface SchemaToolingSettings {
193193
String HBM2DDL_AUTO = "hibernate.hbm2ddl.auto";
194194

195195
/**
196-
* For cases where the {@value #JAKARTA_HBM2DDL_SCRIPTS_ACTION} value indicates that schema commands
197-
* should be written to DDL script file, specifies if schema commands should be appended to
198-
* the end of the file rather than written at the beginning of the file.
196+
* For cases where the {@value #JAKARTA_HBM2DDL_SCRIPTS_ACTION} value indicates that schema
197+
* commands should be written to a DDL script file, specifies if schema commands should be
198+
* appended to the end of the file rather than written at the beginning of the file.
199199
* <p>
200200
* Values are: {@code true} for appending schema commands to the end of the file, {@code false}
201201
* for writing schema commands at the beginning.
@@ -233,9 +233,9 @@ public interface SchemaToolingSettings {
233233

234234
/**
235235
* Used to specify the {@link org.hibernate.tool.schema.spi.SchemaFilterProvider} to be
236-
* used by create, drop, migrate and validate operations on the database schema. A
236+
* used by create, drop, migrate, and validate operations on the database schema. A
237237
* {@code SchemaFilterProvider} provides filters that can be used to limit the scope of
238-
* these operations to specific namespaces, tables and sequences. All objects are
238+
* these operations to specific namespaces, tables, and sequences. All objects are
239239
* included by default.
240240
*
241241
* @since 5.1
@@ -318,7 +318,7 @@ public interface SchemaToolingSettings {
318318
/**
319319
* Specifies a comma-separated list of extra table types, in addition to the
320320
* default types {@code "TABLE"} and {@code "VIEW"}, to recognize as physical
321-
* tables when performing schema update, creation and validation.
321+
* tables when performing schema update, creation, and validation.
322322
*
323323
* @since 5.0
324324
*/

hibernate-core/src/main/java/org/hibernate/cfg/TransactionSettings.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public interface TransactionSettings {
2929
* @settingDefault With Jakarta Persistence bootstrapping, based on the persistence unit's {@link PersistenceUnitInfo#getTransactionType()};
3030
* otherwise {@code jdbc}.
3131
*
32-
* @implSpec With non Jakarta Persistence bootstrapping, Hibernate will use {@code jdbc} as the default which
33-
* will cause problems if the application actually uses JTA-based transactions.
32+
* @implSpec With non-Jakarta Persistence bootstrapping, Hibernate will use {@code jdbc} as the
33+
* default which will cause problems if the application actually uses JTA-based transactions.
3434
*
3535
* @see #JTA_PLATFORM
3636
*
@@ -152,7 +152,7 @@ public interface TransactionSettings {
152152
* Allows a detached proxy or lazy collection to be fetched even when not
153153
* associated with an open persistence context, by creating a temporary
154154
* persistence context when the proxy or collection is accessed. This
155-
* behavior is not recommended, since it can easily break transaction
155+
* behavior is not recommended since it can easily break transaction
156156
* isolation or lead to data aliasing; it is therefore disabled by default.
157157
*
158158
* @settingDefault {@code false} (disabled)

0 commit comments

Comments
 (0)