Skip to content

Commit

Permalink
Add more deprecation information to ErrorContextBuilder
Browse files Browse the repository at this point in the history
Use KiwiDeprecated annotation on ErrorContextBuilder#buildWithDataStoreFactory
to provide more information about when this will be deprecated.
  • Loading branch information
sleberknight committed Jun 3, 2024
1 parent ca26310 commit 38332cc
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.jdbi.v3.core.Jdbi;
import org.kiwiproject.base.KiwiDeprecated;
import org.kiwiproject.base.KiwiDeprecated.Severity;
import org.kiwiproject.dropwizard.error.config.CleanupConfig;
import org.kiwiproject.dropwizard.error.dao.ApplicationErrorDao;
import org.kiwiproject.dropwizard.error.dao.ApplicationErrorJdbc;
Expand Down Expand Up @@ -305,9 +307,13 @@ public ErrorContext buildInMemoryH2() {
* @implNote If you do not invoke {@link #dataStoreType(DataStoreType)} prior to calling this method, this method
* will attempt to determine which {@link DataStoreType} it should use by calling
* {@link ApplicationErrorJdbc#dataStoreTypeOf(DataSourceFactory)}.
* @deprecated use {@link #buildWithJdbi3(DataSourceFactory)}
* @deprecated use {@link #buildWithJdbi3(DataSourceFactory)}. This will be removed in version 3.0.0.
*/
@Deprecated(since = "2.1.0")
@Deprecated(since = "2.1.0", forRemoval = true)
@KiwiDeprecated(removeAt = "3.0.0",
reference = "https://github.com/kiwiproject/dropwizard-application-errors/issues/375",
usageSeverity = Severity.SEVERE,
replacedBy = "#buildWithJdbi3(DataSourceFactory)")
public ErrorContext buildWithDataStoreFactory(DataSourceFactory dataSourceFactory) {
return buildWithJdbi3(dataSourceFactory);
}
Expand Down

0 comments on commit 38332cc

Please sign in to comment.