Skip to content

Commit

Permalink
Code cleanup (#303)
Browse files Browse the repository at this point in the history
* Suppress warning in ConsulResponse that deprecated code is still used
* Replace printStackTrace() with Logger in KeyValueClientITest
  • Loading branch information
sleberknight authored Dec 17, 2023
1 parent 5436d4f commit 40410b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import org.kiwiproject.consul.option.ImmutableQueryOptions;
import org.kiwiproject.consul.option.PutOptions;
import org.kiwiproject.consul.option.QueryOptions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.nio.charset.Charset;
import java.util.HashSet;
Expand All @@ -39,6 +41,8 @@

class KeyValueClientITest extends BaseIntegrationTest {

private static final Logger LOG = LoggerFactory.getLogger(KeyValueClientITest.class);

private static final Charset TEST_CHARSET = Charset.forName("IBM297");

private KeyValueClient keyValueClient;
Expand Down Expand Up @@ -398,7 +402,7 @@ public void onComplete(ConsulResponse<List<Value>> consulResponse) {

@Override
public void onFailure(Throwable throwable) {
throwable.printStackTrace();
LOG.error("getValues failed for key {}", key, throwable);
completed.countDown();
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public BigInteger getIndex() {
* @deprecated replaced by {@link #getCacheResponseInfo()}
* @see <a href="https://developer.hashicorp.com/consul/api-docs/features/caching#background-refresh-caching">Background Refresh Caching</a>
*/
@SuppressWarnings("DeprecatedIsStillUsed")
@Deprecated(since = "1.1.0", forRemoval = true)
public Optional<CacheResponseInfo> getCacheReponseInfo(){
return getCacheResponseInfo();
Expand Down

0 comments on commit 40410b2

Please sign in to comment.