From ac250bca611a37c63eb60383a2615198bbe4eeb8 Mon Sep 17 00:00:00 2001 From: Brandon Siegel Date: Mon, 7 Sep 2020 15:40:52 -0700 Subject: [PATCH] Fix checkstyle --- .../azure/data/tables/CosmosThrottled.java | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/CosmosThrottled.java b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/CosmosThrottled.java index 52020f5609420..4e1bdd2b1951a 100644 --- a/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/CosmosThrottled.java +++ b/sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables/CosmosThrottled.java @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. package com.azure.data.tables; import com.azure.core.exception.AzureException; @@ -19,7 +21,10 @@ protected CosmosThrottled(T client, boolean isPlaybackMode) { public abstract boolean isCosmos(); public void runVoid(Consumer action) { - run(c -> { action.accept(c); return null; }); + run(c -> { + action.accept(c); + return null; + }); } public T getClient() { @@ -33,26 +38,20 @@ public TResult run(Function action) { int retryCount = 0; int delay = 1500; - while (true) - { - try - { + while (true) { + try { return action.apply(client); - } - catch (TableServiceErrorException e) - { + } catch (TableServiceErrorException e) { if (e.getResponse().getStatusCode() != 429) { throw e; } - if (++retryCount > 10) - { + if (++retryCount > 10) { throw e; } // Disable retry throttling in Playback mode. - if (!isPlaybackMode) - { + if (!isPlaybackMode) { try { Thread.sleep(delay); } catch (InterruptedException interruptedException) {