Skip to content

Commit

Permalink
Deprecate usage of the "options" constants for removal (#360)
Browse files Browse the repository at this point in the history
We don't yet have the replacements as of 1.3.3. Those will
be added in 1.4.0.

Closes #356
  • Loading branch information
sleberknight authored Jun 3, 2024
1 parent edba784 commit 2ffc365
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/kiwiproject/consul/Consul.java
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ static void addSslSocketFactory(@Nullable SSLContext sslContext,

private static void addTimeouts(OkHttpClient.Builder builder,
NetworkTimeoutConfig networkTimeoutConfig) {

if (networkTimeoutConfig.getClientConnectTimeoutMillis() >= 0) {
builder.connectTimeout(networkTimeoutConfig.getClientConnectTimeoutMillis(), TimeUnit.MILLISECONDS);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@
@Value.Style(jakarta = true)
public abstract class DeleteOptions implements ParamAdder {

/**
* @deprecated for removal in 2.0.0 (replacement will be in 1.4.0)
*/
@Deprecated(since = "1.3.3", forRemoval = true)
public static final DeleteOptions BLANK = ImmutableDeleteOptions.builder().build();

/**
* @deprecated for removal in 2.0.0 (replacement will be in 1.4.0)
*/
@Deprecated(since = "1.3.3", forRemoval = true)
public static final DeleteOptions RECURSE = ImmutableDeleteOptions.builder().recurse(true).build();

public abstract Optional<Long> getCas();
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/kiwiproject/consul/option/EventOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
@Value.Style(jakarta = true)
public abstract class EventOptions implements ParamAdder {

/**
* @deprecated for removal in 2.0.0 (replacement will be in 1.4.0)
*/
@Deprecated(since = "1.3.3", forRemoval = true)
public static final EventOptions BLANK = ImmutableEventOptions.builder().build();

public abstract Optional<String> getDatacenter();
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/kiwiproject/consul/option/PutOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
@Value.Style(jakarta = true)
public abstract class PutOptions implements ParamAdder {

/**
* @deprecated for removal in 2.0.0 (replacement will be in 1.4.0)
*/
@Deprecated(since = "1.3.3", forRemoval = true)
public static final PutOptions BLANK = ImmutablePutOptions.builder().build();

public abstract Optional<Long> getCas();
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/kiwiproject/consul/option/QueryOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
@Value.Style(jakarta = true)
public abstract class QueryOptions implements ParamAdder {

/**
* @deprecated for removal in 2.0.0 (replacement will be in 1.4.0)
*/
@Deprecated(since = "1.3.3", forRemoval = true)
public static final QueryOptions BLANK = ImmutableQueryOptions.builder().build();

public abstract Optional<String> getWait();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
@Value.Style(jakarta = true)
public abstract class QueryParameterOptions implements ParamAdder {

/**
* @deprecated for removal in 2.0.0 (replacement will be in 1.4.0)
*/
@Deprecated(since = "1.3.3", forRemoval = true)
public static final QueryParameterOptions BLANK = ImmutableQueryParameterOptions.builder().build();

public abstract Optional<Boolean> getReplaceExistingChecks();
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/kiwiproject/consul/option/RoleOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
@Value.Style(jakarta = true)
public abstract class RoleOptions implements ParamAdder {

/**
* @deprecated for removal in 2.0.0 (replacement will be in 1.4.0)
*/
@Deprecated(since = "1.3.3", forRemoval = true)
public static final RoleOptions BLANK = ImmutableRoleOptions.builder().build();

public abstract Optional<String> getPolicy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
@Value.Style(jakarta = true)
public abstract class TokenQueryOptions implements ParamAdder {

/**
* @deprecated for removal in 2.0.0 (replacement will be in 1.4.0)
*/
@Deprecated(since = "1.3.3", forRemoval = true)
public static final TokenQueryOptions BLANK = ImmutableTokenQueryOptions.builder().build();

public abstract Optional<String> getPolicy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
@Value.Style(jakarta = true)
public abstract class TransactionOptions implements ParamAdder {

/**
* @deprecated for removal in 2.0.0 (replacement will be in 1.4.0)
*/
@Deprecated(since = "1.3.3", forRemoval = true)
public static final TransactionOptions BLANK = ImmutableTransactionOptions.builder().build();

public abstract Optional<String> getDatacenter();
Expand Down

0 comments on commit 2ffc365

Please sign in to comment.