From 1f93e8842e6d7102838cbff9a465dbb651a64ba9 Mon Sep 17 00:00:00 2001 From: CodeNoobKing Date: Fri, 26 Jan 2024 16:31:50 +0800 Subject: [PATCH] format --- .../arklet/core/ops/UnifiedOperationServiceImpl.java | 3 ++- .../component/UnifiedOperationServiceImplTests.java | 10 ++++------ .../alipay/sofa/serverless/common/util/OSUtils.java | 1 - .../sofa/serverless/common/util/OSUtilsTest.java | 1 - 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/sofa-serverless-runtime/arklet-core/src/main/java/com/alipay/sofa/serverless/arklet/core/ops/UnifiedOperationServiceImpl.java b/sofa-serverless-runtime/arklet-core/src/main/java/com/alipay/sofa/serverless/arklet/core/ops/UnifiedOperationServiceImpl.java index d2e441f74..3f508b321 100644 --- a/sofa-serverless-runtime/arklet-core/src/main/java/com/alipay/sofa/serverless/arklet/core/ops/UnifiedOperationServiceImpl.java +++ b/sofa-serverless-runtime/arklet-core/src/main/java/com/alipay/sofa/serverless/arklet/core/ops/UnifiedOperationServiceImpl.java @@ -68,7 +68,8 @@ public ClientResponse safeBatchInstall(String bizUrl) { BizOperation bizOperation = new BizOperation() .setOperationType(BizOperation.OperationType.INSTALL); - bizOperation.putParameter(Constants.CONFIG_BIZ_URL, OSUtils.getLocalFileProtocolPrefix() + bizUrl); + bizOperation.putParameter(Constants.CONFIG_BIZ_URL, + OSUtils.getLocalFileProtocolPrefix() + bizUrl); Map mainAttributes = batchInstallHelper.getMainAttributes(bizUrl); bizOperation.setBizName((String) mainAttributes.get(Constants.ARK_BIZ_NAME)); bizOperation.setBizVersion((String) mainAttributes.get(Constants.ARK_BIZ_VERSION)); diff --git a/sofa-serverless-runtime/arklet-core/src/test/java/com/alipay/sofa/serverless/arklet/core/component/UnifiedOperationServiceImplTests.java b/sofa-serverless-runtime/arklet-core/src/test/java/com/alipay/sofa/serverless/arklet/core/component/UnifiedOperationServiceImplTests.java index 9ec994c7b..6067107f2 100644 --- a/sofa-serverless-runtime/arklet-core/src/test/java/com/alipay/sofa/serverless/arklet/core/component/UnifiedOperationServiceImplTests.java +++ b/sofa-serverless-runtime/arklet-core/src/test/java/com/alipay/sofa/serverless/arklet/core/component/UnifiedOperationServiceImplTests.java @@ -49,7 +49,7 @@ public class UnifiedOperationServiceImplTests { private UnifiedOperationServiceImpl unifiedOperationService; @Spy - private BatchInstallHelper batchInstallHelper; + private BatchInstallHelper batchInstallHelper; @Before public void setUp() { @@ -131,13 +131,11 @@ public void testBatchInstall() { } BatchInstallResponse response = unifiedOperationService.batchInstall(BatchInstallRequest - .builder().bizDirAbsolutePath("/path/to/biz").build()); + .builder().bizDirAbsolutePath("/path/to/biz").build()); - Assert.assertTrue(response.getBizUrlToResponse(). - containsKey("/file/a-biz.jar")); + Assert.assertTrue(response.getBizUrlToResponse().containsKey("/file/a-biz.jar")); - Assert.assertTrue(response.getBizUrlToResponse(). - containsKey("/file/b-biz.jar")); + Assert.assertTrue(response.getBizUrlToResponse().containsKey("/file/b-biz.jar")); } } diff --git a/sofa-serverless-runtime/sofa-serverless-common/src/main/java/com/alipay/sofa/serverless/common/util/OSUtils.java b/sofa-serverless-runtime/sofa-serverless-common/src/main/java/com/alipay/sofa/serverless/common/util/OSUtils.java index ea0909f01..dae83627e 100644 --- a/sofa-serverless-runtime/sofa-serverless-common/src/main/java/com/alipay/sofa/serverless/common/util/OSUtils.java +++ b/sofa-serverless-runtime/sofa-serverless-common/src/main/java/com/alipay/sofa/serverless/common/util/OSUtils.java @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package com.alipay.sofa.serverless.common.util; /** diff --git a/sofa-serverless-runtime/sofa-serverless-common/src/test/java/com/alipay/sofa/serverless/common/util/OSUtilsTest.java b/sofa-serverless-runtime/sofa-serverless-common/src/test/java/com/alipay/sofa/serverless/common/util/OSUtilsTest.java index cb017a0db..470226abf 100644 --- a/sofa-serverless-runtime/sofa-serverless-common/src/test/java/com/alipay/sofa/serverless/common/util/OSUtilsTest.java +++ b/sofa-serverless-runtime/sofa-serverless-common/src/test/java/com/alipay/sofa/serverless/common/util/OSUtilsTest.java @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package com.alipay.sofa.serverless.common.util; import org.junit.Assert;