Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fix checkstyle #59

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- name: "CLA Assistant"
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
uses: contributor-assistant/github-action@v2.3.1
uses: contributor-assistant/github-action@v2.5.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_DATABASE_ACCESS_TOKEN }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ public class PolarisConfigurationLoaderTest {

private PolarisConfigurationLoader configurationLoader;

private final String MOCK_GROUP = "mock_group";
private static final String MOCK_GROUP = "mock_group";

private final String MOCK_FILE = "mock_file.properties";
private static final String MOCK_FILE = "mock_file.properties";

private final String USER_NAME = "user.name";
private static final String USER_NAME = "user.name";

private PolarisConfigurationLoader mockLoader() {
PolarisConfigurationLoader loader = new PolarisConfigurationLoader();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Tencent is pleased to support the open source community by making tRPC available.
*
* Copyright (C) 2023 THL A29 Limited, a Tencent company.
* Copyright (C) 2023 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* If you have downloaded a copy of the tRPC source code from Tencent,
Expand All @@ -11,15 +11,15 @@

package com.tencent.trpc.container.config;

import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import java.util.Map;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;


/**
Expand All @@ -37,7 +37,7 @@ public void setUp() throws Exception {
properties.put("string", "string");
properties.put("integer", 10);
properties.put("boolean", true);
properties.put("collection", Arrays.asList(1,2));
properties.put("collection", Arrays.asList(1, 2));
this.yamlUtils = new YamlUtils("");
}

Expand Down Expand Up @@ -100,7 +100,7 @@ public void testGetCollection() {
}

@Test
public void testGetStringList(){
public void testGetStringList() {
List<String> collection = yamlUtils.getStringList(properties, "collection");
Assert.assertNotNull(collection);
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.junit.Before;
import org.junit.Test;

public class EnvironmentConfigurationTest{
public class EnvironmentConfigurationTest {

private Environment environment;

Expand Down Expand Up @@ -57,6 +57,6 @@ public void teardown() {
@Test
public void testGetInternalProperty() {
Object internalProperty = environment.getInternalProperty("server.app");
Assert.assertEquals(internalProperty,"wechat");
Assert.assertEquals(internalProperty, "wechat");
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Tencent is pleased to support the open source community by making tRPC available.
*
* Copyright (C) 2023 THL A29 Limited, a Tencent company.
* Copyright (C) 2023 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* If you have downloaded a copy of the tRPC source code from Tencent,
Expand Down Expand Up @@ -53,7 +53,7 @@ public void testParseDefaultStartedListeners() {
try {
ServerConfig serverConfig = ServerConfigParser.parseServerConfig(null, null);
Assert.assertNotNull(serverConfig);
}catch (Exception e){
} catch (Exception e) {
assertTrue(e instanceof IllegalArgumentException);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ public String getRawMetadataStringValue(String key) {
return request.getMeta().getCallInfo().getCalleeMethod();
case MessageMetadataContainer.LABEL_KEY_PATH:
return request.getInvocation().getRpcMethodInfo().getServiceInterface().getCanonicalName();
default:
// skip
}
return null;
}
Expand Down
Loading