[SCB-2593] enable checkstyle LocalFinalVariableName (#3111)
diff --git a/ci/checkstyle/checkstyle.xml b/ci/checkstyle/checkstyle.xml
index 08abf89..21df6b5 100644
--- a/ci/checkstyle/checkstyle.xml
+++ b/ci/checkstyle/checkstyle.xml
@@ -48,6 +48,11 @@
<!-- Checks for placement of the left curly brace ('{'). -->
<property name="severity" value="error"/>
</module>
+ <module name="LocalFinalVariableName">
+ <!-- Validates identifiers for local final variables against the
+ expression "^[a-z][a-zA-Z0-9]*$". -->
+ <property name="severity" value="error"/>
+ </module>
<module name="LocalVariableName">
<!-- Validates identifiers for local variables against the
expression "^[a-z][a-zA-Z0-9]*$". -->
diff --git a/handlers/handler-flowcontrol-qps/src/test/java/org/apache/servicecomb/qps/QpsControllerManagerTest.java b/handlers/handler-flowcontrol-qps/src/test/java/org/apache/servicecomb/qps/QpsControllerManagerTest.java
index 3405e7f..3cd0fc6 100644
--- a/handlers/handler-flowcontrol-qps/src/test/java/org/apache/servicecomb/qps/QpsControllerManagerTest.java
+++ b/handlers/handler-flowcontrol-qps/src/test/java/org/apache/servicecomb/qps/QpsControllerManagerTest.java
@@ -485,22 +485,22 @@
@Test
public void testDeleteQpsController() {
- final String MICROSERVICE_NAME = "springmvcClient";
- final String SCHEMA_ID = "controller";
- final String OPERATION_ID = "add";
- final String CONFIG_KEY = "springmvcClient.controller.add";
+ final String microserviceName = "springmvcClient";
+ final String schemaId = "controller";
+ final String operationId = "add";
+ final String configKey = "springmvcClient.controller.add";
QpsControllerManager testManager = new QpsControllerManager(true);
- Invocation testInvocation = getMockInvocation(MICROSERVICE_NAME, SCHEMA_ID, OPERATION_ID);
- Mockito.when(testInvocation.getSchemaId()).thenReturn(SCHEMA_ID);
+ Invocation testInvocation = getMockInvocation(microserviceName, schemaId, operationId);
+ Mockito.when(testInvocation.getSchemaId()).thenReturn(schemaId);
- QpsStrategy strategy1 = testManager.getOrCreate(MICROSERVICE_NAME, testInvocation);
+ QpsStrategy strategy1 = testManager.getOrCreate(microserviceName, testInvocation);
- setConfigWithDefaultPrefix(true, CONFIG_KEY, 1);
+ setConfigWithDefaultPrefix(true, configKey, 1);
- deleteConfigWithDefaultPrefix(true, CONFIG_KEY);
+ deleteConfigWithDefaultPrefix(true, configKey);
- QpsStrategy strategy2 = testManager.getOrCreate(MICROSERVICE_NAME, testInvocation);
+ QpsStrategy strategy2 = testManager.getOrCreate(microserviceName, testInvocation);
Assertions.assertEquals(strategy1, strategy2);
}