Apollo Client

##### Parent Project

- Apollo

##### Project Documentation

- Project Information
- Project Reports
  - Checkstyle
  - Cobertura Test Coverage

## Checkstyle Results

The following document contains the results of Checkstyle 6.18 with google_checks.xml ruleset.

## Summary

Files | Info | Warnings | Errors
--- | --- | --- | ---
35 | 0 | 121 | 0

## Files

File | I | W | E
--- | --- | --- | ---
com/ctrip/framework/apollo/Config.java | 0 | 1 | 0
com/ctrip/framework/apollo/ConfigFile.java | 0 | 3 | 0
com/ctrip/framework/apollo/ConfigService.java | 0 | 4 | 0
com/ctrip/framework/apollo/ds/ApolloDataSourceProvider.java | 0 | 36 | 0
com/ctrip/framework/apollo/internals/AbstractConfig.java | 0 | 1 | 0
com/ctrip/framework/apollo/internals/AbstractConfigFile.java | 0 | 4 | 0
com/ctrip/framework/apollo/internals/AbstractConfigRepository.java | 0 | 2 | 0
com/ctrip/framework/apollo/internals/ConfigServiceLocator.java | 0 | 5 | 0
com/ctrip/framework/apollo/internals/DefaultConfig.java | 0 | 4 | 0
com/ctrip/framework/apollo/internals/DefaultConfigManager.java | 0 | 3 | 0
com/ctrip/framework/apollo/internals/LocalFileConfigRepository.java | 0 | 10 | 0
com/ctrip/framework/apollo/internals/PropertiesConfigFile.java | 0 | 1 | 0
com/ctrip/framework/apollo/internals/RemoteConfigRepository.java | 0 | 21 | 0
com/ctrip/framework/apollo/internals/SimpleConfig.java | 0 | 3 | 0
com/ctrip/framework/apollo/model/ConfigChangeEvent.java | 0 | 2 | 0
com/ctrip/framework/apollo/spi/ConfigFactory.java | 0 | 1 | 0
com/ctrip/framework/apollo/spi/DefaultConfigFactory.java | 0 | 1 | 0
com/ctrip/framework/apollo/spi/DefaultConfigFactoryManager.java | 0 | 2 | 0
com/ctrip/framework/apollo/spi/DefaultConfigRegistry.java | 0 | 2 | 0
com/ctrip/framework/apollo/util/ConfigUtil.java | 0 | 8 | 0
com/ctrip/framework/apollo/util/ExceptionUtil.java | 0 | 1 | 0
com/ctrip/framework/apollo/util/http/HttpRequest.java | 0 | 3 | 0
com/ctrip/framework/apollo/util/http/HttpResponse.java | 0 | 2 | 0
com/ctrip/framework/apollo/util/http/HttpUtil.java | 0 | 1 | 0

## Rules

Category | Rule | Violations | Severity
--- | --- | --- | ---
blocks | EmptyCatchBlock exceptionVariableName: `"expected"` | 2 | Warning
coding | MissingSwitchDefault | 1 | Warning
| VariableDeclarationUsageDistance | 2 | Warning
imports | CustomImportOrder sortImportsInGroupAlphabetically: `"true"` specialImportsRegExp: `"com.google"` customImportOrderRules: `"STATIC###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"` | 4 | Warning
indentation | CommentsIndentation | 1 | Warning
| Indentation throwsIndent: `"4"` arrayInitIndent: `"2"` caseIndent: `"2"` basicOffset: `"2"` braceAdjustment: `"0"` lineWrappingIndentation: `"4"` | 26 | Warning
javadoc | JavadocMethod scope: `"public"` allowMissingThrowsTags: `"true"` allowThrowsTagsForSubclasses: `"true"` allowMissingReturnTag: `"true"` allowMissingParamTags: `"true"` minLineCount: `"2"` allowedAnnotations: `"Override, Test"` | 2 | Warning
| NonEmptyAtclauseDescription | 2 | Warning
| SummaryJavadoc forbiddenSummaryFragments: `"^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"` | 4 | Warning
modifier | ModifierOrder | 1 | Warning
naming | AbbreviationAsWordInName ignoreFinal: `"false"` allowedAbbreviationLength: `"1"` | 7 | Warning
| CatchParameterName format: `"^[a-z][a-z0-9][a-zA-Z0-9]*$"` | 3 | Warning
| MemberName format: `"^[a-z][a-z0-9][a-zA-Z0-9]*$"` | 55 | Warning
| ParameterName format: `"^[a-z][a-z0-9][a-zA-Z0-9]*$"` | 1 | Warning
sizes | LineLength max: `"100"` ignorePattern: `"^package.*|^import.*|a href|href|http://|https://|ftp://"` | 10 | Warning

## Details

### com/ctrip/framework/apollo/Config.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | javadoc | NonEmptyAtclauseDescription | At-clause should have a non-empty description. | 105

### com/ctrip/framework/apollo/ConfigFile.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | javadoc | SummaryJavadoc | First sentence of Javadoc is incomplete (period is missing) or not present. | 9
Warning | javadoc | SummaryJavadoc | First sentence of Javadoc is incomplete (period is missing) or not present. | 21
Warning | javadoc | SummaryJavadoc | First sentence of Javadoc is incomplete (period is missing) or not present. | 27

### com/ctrip/framework/apollo/ConfigService.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | naming | MemberName | Member name 'm_container' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 22
Warning | sizes | LineLength | Line is longer than 100 characters (found 103). | 53
Warning | sizes | LineLength | Line is longer than 100 characters (found 104). | 63
Warning | naming | ParameterName | Parameter name 'm_container' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 107

### com/ctrip/framework/apollo/ds/ApolloDataSourceProvider.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | imports | CustomImportOrder | Wrong lexicographical order for 'com.ctrip.framework.apollo.ConfigFile' import. Should be before 'org.unidal.lookup.annotation.Named'. | 10
Warning | imports | CustomImportOrder | Wrong lexicographical order for 'com.ctrip.framework.apollo.ConfigService' import. Should be before 'org.unidal.lookup.annotation.Named'. | 11
Warning | imports | CustomImportOrder | Wrong lexicographical order for 'com.ctrip.framework.apollo.core.enums.ConfigFileFormat' import. Should be before 'org.unidal.lookup.annotation.Named'. | 12
Warning | imports | CustomImportOrder | Wrong lexicographical order for 'com.ctrip.framework.foundation.Foundation' import. Should be before 'org.unidal.lookup.annotation.Named'. | 13
Warning | javadoc | NonEmptyAtclauseDescription | Javadoc comment at column 32 has parse error. Missed HTML close tag 'code'. Sometimes it means that close tag missed for one of previous tags. | 32
Warning | indentation | Indentation | 'member def modifier' have incorrect indentation level 3, expected level should be 2. | 38
Warning | naming | MemberName | Member name 'm_logger' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 38
Warning | indentation | Indentation | 'member def modifier' have incorrect indentation level 3, expected level should be 2. | 40
Warning | naming | MemberName | Member name 'm_def' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 40
Warning | indentation | Indentation | 'method def modifier' have incorrect indentation level 3, expected level should be 2. | 42
Warning | indentation | Indentation | 'if' have incorrect indentation level 6, expected level should be 4. | 44
Warning | indentation | Indentation | 'if' child have incorrect indentation level 9, expected level should be 6. | 45
Warning | indentation | Indentation | 'if' child have incorrect indentation level 9, expected level should be 6. | 46
Warning | indentation | Indentation | 'if' child have incorrect indentation level 9, expected level should be 6. | 47
Warning | indentation | Indentation | 'if' have incorrect indentation level 9, expected level should be 6. | 49
Warning | indentation | Indentation | 'if' child have incorrect indentation level 12, expected level should be 8. | 50
Warning | indentation | Indentation | 'if' child have incorrect indentation level 12, expected level should be 8. | 52
Warning | sizes | LineLength | Line is longer than 100 characters (found 114). | 52
Warning | indentation | Indentation | 'try' have incorrect indentation level 12, expected level should be 8. | 54
Warning | indentation | Indentation | 'try' child have incorrect indentation level 15, expected level should be 10. | 55
Warning | indentation | Indentation | 'try rcurly' have incorrect indentation level 12, expected level should be 8. | 56
Warning | naming | CatchParameterName | Catch parameter name 'e' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 56
Warning | indentation | Indentation | 'catch' child have incorrect indentation level 15, expected level should be 10. | 57
Warning | sizes | LineLength | Line is longer than 100 characters (found 151). | 57
Warning | indentation | Indentation | 'catch rcurly' have incorrect indentation level 12, expected level should be 8. | 58
Warning | indentation | Indentation | 'if rcurly' have incorrect indentation level 9, expected level should be 6. | 59
Warning | indentation | Indentation | 'else' child have incorrect indentation level 12, expected level should be 8. | 60
Warning | sizes | LineLength | Line is longer than 100 characters (found 118). | 60
Warning | indentation | Indentation | 'else' child have incorrect indentation level 12, expected level should be 8. | 61
Warning | indentation | Indentation | 'else rcurly' have incorrect indentation level 9, expected level should be 6. | 62
Warning | indentation | Indentation | 'if rcurly' have incorrect indentation level 6, expected level should be 4. | 63
Warning | indentation | Indentation | 'method def' child have incorrect indentation level 6, expected level should be 4. | 65
Warning | indentation | Indentation | 'method def rcurly' have incorrect indentation level 3, expected level should be 2. | 66
Warning | indentation | Indentation | 'method def modifier' have incorrect indentation level 3, expected level should be 2. | 68
Warning | indentation | Indentation | 'method def' child have incorrect indentation level 6, expected level should be 4. | 70
Warning | indentation | Indentation | 'method def rcurly' have incorrect indentation level 3, expected level should be 2. | 71

### com/ctrip/framework/apollo/internals/AbstractConfig.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | naming | MemberName | Member name 'm_listeners' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 32

### com/ctrip/framework/apollo/internals/AbstractConfigFile.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | naming | MemberName | Member name 'm_configRepository' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 18
Warning | naming | MemberName | Member name 'm_namespace' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 19
Warning | naming | MemberName | Member name 'm_configProperties' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 20
Warning | javadoc | JavadocMethod | Missing a Javadoc comment. | 22

### com/ctrip/framework/apollo/internals/AbstractConfigRepository.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | naming | MemberName | Member name 'm_listeners' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 19
Warning | sizes | LineLength | Line is longer than 100 characters (found 107). | 28

### com/ctrip/framework/apollo/internals/ConfigServiceLocator.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | naming | MemberName | Member name 'm_httpUtil' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 41
Warning | naming | MemberName | Member name 'm_configUtil' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 43
Warning | naming | MemberName | Member name 'm_configServices' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 44
Warning | naming | MemberName | Member name 'm_responseType' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 45
Warning | naming | MemberName | Member name 'm_executorService' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 46

### com/ctrip/framework/apollo/internals/DefaultConfig.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | naming | MemberName | Member name 'm_namespace' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 29
Warning | naming | MemberName | Member name 'm_resourceProperties' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 30
Warning | naming | MemberName | Member name 'm_configProperties' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 31
Warning | naming | MemberName | Member name 'm_configRepository' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 32

### com/ctrip/framework/apollo/internals/DefaultConfigManager.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | naming | MemberName | Member name 'm_factoryManager' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 22
Warning | naming | MemberName | Member name 'm_configs' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 24
Warning | naming | MemberName | Member name 'm_configFiles' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 25

### com/ctrip/framework/apollo/internals/LocalFileConfigRepository.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | naming | MemberName | Member name 'm_container' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 39
Warning | naming | MemberName | Member name 'm_namespace' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 40
Warning | naming | MemberName | Member name 'm_baseDir' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 41
Warning | naming | MemberName | Member name 'm_configUtil' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 42
Warning | naming | MemberName | Member name 'm_fileProperties' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 43
Warning | naming | MemberName | Member name 'm_upstream' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 44
Warning | indentation | CommentsIndentation | Comment has incorrect indentation level 4, expected is 3, indentation should be the same level as line 121. | 120
Warning | indentation | Indentation | 'method def' child have incorrect indentation level 3, expected level should be 4. | 121
Warning | sizes | LineLength | Line is longer than 100 characters (found 103). | 254
Warning | sizes | LineLength | Line is longer than 100 characters (found 110). | 258

### com/ctrip/framework/apollo/internals/PropertiesConfigFile.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | naming | MemberName | Member name 'm_contentCache' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 20

### com/ctrip/framework/apollo/internals/RemoteConfigRepository.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | naming | MemberName | Member name 'm_container' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 54
Warning | naming | MemberName | Member name 'm_serviceLocator' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 55
Warning | naming | MemberName | Member name 'm_httpUtil' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 56
Warning | naming | MemberName | Member name 'm_configUtil' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 57
Warning | naming | MemberName | Member name 'm_configCache' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 58
Warning | naming | MemberName | Member name 'm_namespace' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 59
Warning | modifier | ModifierOrder | 'static' modifier out of order with the JLS suggestions. | 60
Warning | naming | MemberName | Member name 'm_longPollingService' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 61
Warning | naming | MemberName | Member name 'm_longPollingStopped' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 62
Warning | naming | MemberName | Member name 'm_longPollFailSchedulePolicyInSecond' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 63
Warning | naming | MemberName | Member name 'm_longPollServiceDto' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 64
Warning | naming | MemberName | Member name 'm_longPollResult' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 65
Warning | naming | MemberName | Member name 'm_longPollRateLimiter' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 66
Warning | naming | MemberName | Member name 'm_loadConfigRateLimiter' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 67
Warning | blocks | EmptyCatchBlock | Empty catch block. | 170
Warning | naming | CatchParameterName | Catch parameter name 'e' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 170
Warning | coding | VariableDeclarationUsageDistance | Distance between variable 'path' declaration and its first usage is 4, but allowed 3. Consider to make that variable as final if you still need to store its value in advance (before method calls that might do side effect on original value). | 243
Warning | coding | VariableDeclarationUsageDistance | Distance between variable 'pathParams' declaration and its first usage is 4, but allowed 3. Consider to make that variable as final if you still need to store its value in advance (before method calls that might do side effect on original value). | 244
Warning | blocks | EmptyCatchBlock | Empty catch block. | 300
Warning | naming | CatchParameterName | Catch parameter name 'e' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 300
Warning | sizes | LineLength | Line is longer than 100 characters (found 111). | 348

### com/ctrip/framework/apollo/internals/SimpleConfig.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | naming | MemberName | Member name 'm_namespace' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 23
Warning | naming | MemberName | Member name 'm_configRepository' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 24
Warning | naming | MemberName | Member name 'm_configProperties' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 25

### com/ctrip/framework/apollo/model/ConfigChangeEvent.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | naming | MemberName | Member name 'm_namespace' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 11
Warning | naming | MemberName | Member name 'm_changes' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 12

### com/ctrip/framework/apollo/spi/ConfigFactory.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | javadoc | SummaryJavadoc | First sentence of Javadoc is incomplete (period is missing) or not present. | 19

### com/ctrip/framework/apollo/spi/DefaultConfigFactory.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | coding | MissingSwitchDefault | switch without "default" clause. | 34

### com/ctrip/framework/apollo/spi/DefaultConfigFactoryManager.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | naming | MemberName | Member name 'm_registry' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 18
Warning | naming | MemberName | Member name 'm_factories' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 20

### com/ctrip/framework/apollo/spi/DefaultConfigRegistry.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | naming | MemberName | Member name 'm_instances' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 16
Warning | naming | MemberName | Member name 'm_logger' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 18

### com/ctrip/framework/apollo/util/ConfigUtil.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | naming | AbbreviationAsWordInName | Abbreviation in name 'loadConfigQPS' must contain no more than '1' capital letters. | 30
Warning | naming | AbbreviationAsWordInName | Abbreviation in name 'longPollQPS' must contain no more than '1' capital letters. | 31
Warning | javadoc | JavadocMethod | Missing a Javadoc comment. | 33
Warning | naming | AbbreviationAsWordInName | Abbreviation in name 'initQPS' must contain no more than '1' capital letters. | 155
Warning | naming | AbbreviationAsWordInName | Abbreviation in name 'customizedLoadConfigQPS' must contain no more than '1' capital letters. | 156
Warning | naming | AbbreviationAsWordInName | Abbreviation in name 'customizedLongPollQPS' must contain no more than '1' capital letters. | 165
Warning | naming | AbbreviationAsWordInName | Abbreviation in name 'getLoadConfigQPS' must contain no more than '1' capital letters. | 175
Warning | naming | AbbreviationAsWordInName | Abbreviation in name 'getLongPollQPS' must contain no more than '1' capital letters. | 179

### com/ctrip/framework/apollo/util/ExceptionUtil.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | sizes | LineLength | Line is longer than 100 characters (found 102). | 13

### com/ctrip/framework/apollo/util/http/HttpRequest.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | naming | MemberName | Member name 'm_url' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 7
Warning | naming | MemberName | Member name 'm_connectTimeout' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 8
Warning | naming | MemberName | Member name 'm_readTimeout' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 9

### com/ctrip/framework/apollo/util/http/HttpResponse.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | naming | MemberName | Member name 'm_statusCode' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 7
Warning | naming | MemberName | Member name 'm_body' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 8

### com/ctrip/framework/apollo/util/http/HttpUtil.java

Severity | Category | Rule | Message | Line
--- | --- | --- | --- | ---
Warning | naming | MemberName | Member name 'm_configUtil' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. | 28