Skip to content

Commit 2af1fc9

Browse files
committed
HSEARCH-5369 Add missing since attributes to @deprecated
1 parent aa80404 commit 2af1fc9

File tree

89 files changed

+205
-200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+205
-200
lines changed

backend/elasticsearch-aws/src/main/java/org/hibernate/search/backend/elasticsearch/aws/spi/ElasticsearcAwsCredentialsProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/**
1212
* @deprecated Implement {@link ElasticsearchAwsCredentialsProvider} instead.
1313
*/
14-
@Deprecated
14+
@Deprecated(since = "6.1")
1515
public interface ElasticsearcAwsCredentialsProvider extends ElasticsearchAwsCredentialsProvider {
1616

1717
AwsCredentialsProvider create(ConfigurationPropertySource propertySource);

backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/ElasticsearchVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public ElasticsearchDistributionName distribution() {
176176
* @return The "major" number of this version, i.e. the {@code x} in {@code x.y.z-qualifier}.
177177
* @deprecated Use {@link #majorOptional()} instead.
178178
*/
179-
@Deprecated
179+
@Deprecated(since = "7.0")
180180
public int major() {
181181
if ( major == null ) {
182182
return 0;

backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/cfg/ElasticsearchBackendSettings.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,15 +341,15 @@ private Defaults() {
341341
* is now dynamic and depends on the value of the {@link ElasticsearchBackendSettings#VERSION} property.
342342
* @see ElasticsearchBackendSettings#VERSION_CHECK_ENABLED
343343
*/
344-
@Deprecated
344+
@Deprecated(since = "7.0")
345345
public static final boolean VERSION_CHECK_ENABLED = true;
346346

347347
/**
348348
* @deprecated The default for this property is now dynamic and depends on the mapper.
349349
* If the multi-tenancy is enabled in the mapper, the default is {@link MultiTenancyStrategyName#DISCRIMINATOR}.
350350
* Otherwise, the default is still {@link MultiTenancyStrategyName#NONE}.
351351
*/
352-
@Deprecated
352+
@Deprecated(since = "6.1")
353353
public static final MultiTenancyStrategyName MULTI_TENANCY_STRATEGY = MultiTenancyStrategyName.NONE;
354354

355355
public static final TypeNameMappingStrategyName MAPPING_TYPE_NAME_STRATEGY = TypeNameMappingStrategyName.DISCRIMINATOR;

backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/cfg/ElasticsearchIndexSettings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ private Defaults() {
181181
* is now dynamic and depends on the targeted Elasticsearch distribution.
182182
* @see ElasticsearchIndexSettings#SCHEMA_MANAGEMENT_MINIMAL_REQUIRED_STATUS
183183
*/
184-
@Deprecated
184+
@Deprecated(since = "7.0")
185185
public static final IndexStatus SCHEMA_MANAGEMENT_MINIMAL_REQUIRED_STATUS = IndexStatus.YELLOW;
186186
public static final int SCHEMA_MANAGEMENT_MINIMAL_REQUIRED_STATUS_WAIT_TIMEOUT = 10_000;
187187
public static final int INDEXING_QUEUE_COUNT = 10;

backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/cfg/spi/ElasticsearchBackendImplSettings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
* @deprecated Use {@link org.hibernate.search.backend.elasticsearch.cfg.impl.ElasticsearchBackendImplSettings} instead.
1111
*/
12-
@Deprecated
12+
@Deprecated(since = "6.2")
1313
public final class ElasticsearchBackendImplSettings {
1414

1515
private ElasticsearchBackendImplSettings() {

backend/lucene/src/main/java/org/hibernate/search/backend/lucene/cfg/LuceneBackendSettings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ private Defaults() {
106106
* If the multi-tenancy is enabled in the mapper, the default is {@link MultiTenancyStrategyName#DISCRIMINATOR}.
107107
* Otherwise, the default is still {@link MultiTenancyStrategyName#NONE}.
108108
*/
109-
@Deprecated
109+
@Deprecated(since = "6.1")
110110
public static final MultiTenancyStrategyName MULTI_TENANCY_STRATEGY = MultiTenancyStrategyName.NONE;
111111
}
112112
}

build/config/src/main/resources/checkstyle.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@
110110
<property name="message" value="Avoid throwing 'AssertionError': use org.hibernate.search.util.common.AssertionFailure" />
111111
</module>
112112

113+
<module name="RegexpSingleline">
114+
<property name="format" value="@Deprecated(?:\s*+\(\s*+(?!.*\bsince\s*+=).*\))?\s*+[^(].*+" />
115+
<property name="message" value="When deprecating something include the `since` attribute" />
116+
</module>
117+
113118
<module name="SuppressionFilter">
114119
<property name="file" value="/suppressions.xml" />
115120
</module>

engine/src/main/java/org/hibernate/search/engine/Version.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static String versionString() {
2828
* @return A string representation of the version of Hibernate Search.
2929
* @deprecated Use {@link #versionString()} instead.
3030
*/
31-
@Deprecated
31+
@Deprecated(since = "6.0")
3232
@Search5DeprecatedAPI
3333
public static String getVersionString() {
3434
return versionString();

engine/src/main/java/org/hibernate/search/engine/backend/orchestration/spi/BatchingExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public synchronized void stop() {
105105
/**
106106
* @deprecated Use {@link #submit(BatchedWork, OperationSubmitter)} instead.
107107
*/
108-
@Deprecated
108+
@Deprecated(since = "6.2")
109109
public void submit(W work) throws InterruptedException {
110110
submit( work, OperationSubmitter.blocking() );
111111
}

engine/src/main/java/org/hibernate/search/engine/backend/types/converter/FromDocumentFieldValueConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @param <V> The type of target values.
1414
* @deprecated Implement {@link FromDocumentValueConverter} instead.
1515
*/
16-
@Deprecated
16+
@Deprecated(since = "6.1")
1717
public interface FromDocumentFieldValueConverter<F, V> extends FromDocumentValueConverter<F, V> {
1818

1919
@Override

0 commit comments

Comments
 (0)