Skip to content

Commit a2b1429

Browse files
committed
Resolve style issues
1 parent 860c8b1 commit a2b1429

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/function/runner/library/function/CreateFunctionHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public class CreateFunctionHandler {
4848
private static final OperatingSystemEnum DEFAULT_OS = OperatingSystemEnum.Windows;
4949
private static final String APP_INSIGHTS_INSTRUMENTATION_KEY = "APPINSIGHTS_INSTRUMENTATIONKEY";
5050

51-
private FunctionDeployModel ctx;
52-
private Operation operation;
51+
private final FunctionDeployModel ctx;
52+
private final Operation operation;
5353

5454
public CreateFunctionHandler(FunctionDeployModel ctx, Operation operation) {
5555
Preconditions.checkNotNull(ctx);
@@ -93,7 +93,7 @@ private FunctionApp createFunctionApp() {
9393
appSettings.putAll(bindingApplicationInsights());
9494
withCreate.withAppSettings(appSettings);
9595

96-
FunctionApp result = withCreate.create();
96+
final FunctionApp result = withCreate.create();
9797
operation.trackProperty("pricingTier", ctx.getPricingTier());
9898
AzureMessager.getMessager().info(message("function.create.hint.functionCreated", ctx.getAppName()));
9999
return result;

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/function/runner/library/function/DeployFunctionHandler.java

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import com.microsoft.azure.management.appservice.FunctionApp;
1010
import com.microsoft.azure.management.appservice.FunctionApp.Update;
1111
import com.microsoft.azure.toolkit.intellij.function.runner.deploy.FunctionDeployModel;
12-
import com.microsoft.azure.toolkit.intellij.function.runner.library.IPrompter;
1312
import com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException;
1413
import com.microsoft.azure.toolkit.lib.common.exception.AzureToolkitRuntimeException;
1514
import com.microsoft.azure.toolkit.lib.common.messager.AzureMessager;
@@ -34,13 +33,14 @@
3433
import org.apache.commons.lang3.StringUtils;
3534
import org.jetbrains.annotations.NotNull;
3635

37-
import java.io.IOException;
3836
import java.util.List;
3937
import java.util.Map;
4038
import java.util.function.Consumer;
4139
import java.util.stream.Collectors;
4240

43-
import static com.microsoft.azure.toolkit.lib.legacy.appservice.DeploymentType.*;
41+
import static com.microsoft.azure.toolkit.lib.legacy.appservice.DeploymentType.DOCKER;
42+
import static com.microsoft.azure.toolkit.lib.legacy.appservice.DeploymentType.RUN_FROM_BLOB;
43+
import static com.microsoft.azure.toolkit.lib.legacy.appservice.DeploymentType.RUN_FROM_ZIP;
4444
import static com.microsoft.intellij.ui.messages.AzureBundle.message;
4545

4646
/**
@@ -58,13 +58,11 @@ public class DeployFunctionHandler {
5858
private static final String HTTP_TRIGGER = "httpTrigger";
5959

6060
private static final OperatingSystemEnum DEFAULT_OS = OperatingSystemEnum.Windows;
61-
private FunctionDeployModel model;
62-
private IPrompter prompter;
63-
private Operation operation;
61+
private final FunctionDeployModel model;
62+
private final Operation operation;
6463

65-
public DeployFunctionHandler(@NotNull FunctionDeployModel model, @NotNull IPrompter prompter, @NotNull Operation operation) {
64+
public DeployFunctionHandler(@NotNull FunctionDeployModel model, @NotNull Operation operation) {
6665
this.model = model;
67-
this.prompter = prompter;
6866
this.operation = operation;
6967
}
7068

@@ -80,7 +78,7 @@ public FunctionApp execute() throws Exception {
8078
return (FunctionApp) deployTarget.getApp();
8179
}
8280

83-
private void updateFunctionAppSettings(final FunctionApp app) throws AzureExecutionException {
81+
private void updateFunctionAppSettings(final FunctionApp app) {
8482
AzureMessager.getMessager().info(message("function.deploy.hint.updateFunctionApp"));
8583
// Work around of https://github.com/Azure/azure-sdk-for-java/issues/1755
8684
final Update update = app.update();
@@ -128,9 +126,6 @@ private void listHTTPTriggerUrls() {
128126
* Sync triggers and return function list of deployed function app
129127
* Will retry when get empty result, the max retry times is LIST_TRIGGERS_MAX_RETRY
130128
* @return List of functions in deployed function app
131-
* @throws AzureExecutionException Throw if get empty result after LIST_TRIGGERS_MAX_RETRY times retry
132-
* @throws IOException Throw if meet IOException while getting Azure client
133-
* @throws InterruptedException Throw when thread was interrupted while sleeping between retry
134129
*/
135130
@AzureOperation(
136131
name = "function|trigger.list",

0 commit comments

Comments
 (0)