PMD Results

The following document contains the results of PMD 5.3.5.

Files

Apollo AdminService - com/ctrip/framework/apollo/adminservice/controller/AppNamespaceController.java

Violation Line
Avoid unused imports such as 'org.springframework.web.bind.annotation.PathVariable' 4
Avoid unused imports such as 'java.util.List' 18

Apollo AdminService - com/ctrip/framework/apollo/adminservice/controller/NamespaceLockController.java

Violation Line
Avoid unused imports such as 'com.ctrip.framework.apollo.core.exception.NotFoundException' 11

Apollo Assembly - com/ctrip/framework/apollo/assembly/ApolloApplication.java

Violation Line
Avoid unused imports such as 'com.ctrip.framework.apollo.portal.PortalApplication' 15

Apollo Biz - com/ctrip/framework/apollo/biz/service/AppNamespaceService.java

Violation Line
Avoid unused private fields such as 'serverConfigService'. 35

Apollo Biz - com/ctrip/framework/apollo/biz/service/ClusterService.java

Violation Line
Avoid unused private fields such as 'appNamespaceService'. 30

Apollo Biz - com/ctrip/framework/apollo/biz/utils/ConfigChangeContentBuilder.java

Violation Line
Avoid unused imports such as 'com.ctrip.framework.apollo.common.utils.BeanUtils' 7
Avoid unused imports such as 'com.ctrip.framework.apollo.core.dto.ItemChangeSets' 8
Avoid unused imports such as 'com.ctrip.framework.apollo.core.dto.ItemDTO' 9

Apollo Client - com/ctrip/framework/apollo/Config.java

Violation Line
Avoid modifiers which are implied by the context 14
Avoid modifiers which are implied by the context 26
Avoid modifiers which are implied by the context 38
Avoid modifiers which are implied by the context 50
Avoid modifiers which are implied by the context 62
Avoid modifiers which are implied by the context 74
Avoid modifiers which are implied by the context 86
Avoid modifiers which are implied by the context 96
Avoid modifiers which are implied by the context 107
Avoid modifiers which are implied by the context 114

Apollo Client - com/ctrip/framework/apollo/ConfigChangeListener.java

Violation Line
Avoid modifiers which are implied by the context 13

Apollo Client - com/ctrip/framework/apollo/internals/ConfigManager.java

Violation Line
Avoid modifiers which are implied by the context 16
Avoid modifiers which are implied by the context 24

Apollo Client - com/ctrip/framework/apollo/internals/ConfigRepository.java

Violation Line
Avoid modifiers which are implied by the context 13
Avoid modifiers which are implied by the context 19
Avoid modifiers which are implied by the context 25
Avoid modifiers which are implied by the context 31

Apollo Client - com/ctrip/framework/apollo/internals/ConfigServiceLocator.java

Violation Line
Avoid empty catch blocks 85–87

Apollo Client - com/ctrip/framework/apollo/internals/DefaultConfig.java

Violation Line
Avoid empty catch blocks 181–183

Apollo Client - com/ctrip/framework/apollo/internals/LocalFileConfigRepository.java

Violation Line
Avoid empty catch blocks 79–81
Avoid empty catch blocks 196–198
Avoid empty catch blocks 234–236

Apollo Client - com/ctrip/framework/apollo/internals/PropertiesConfigFile.java

Violation Line
Avoid unused private fields such as 'logger'. 19

Apollo Client - com/ctrip/framework/apollo/internals/RepositoryChangeListener.java

Violation Line
Avoid modifiers which are implied by the context 14

Apollo Client - com/ctrip/framework/apollo/model/ConfigChange.java

Violation Line
Avoid unused imports such as 'com.google.common.base.Objects' 4

Apollo Client - com/ctrip/framework/apollo/spi/ConfigFactory.java

Violation Line
Avoid modifiers which are implied by the context 17
Avoid modifiers which are implied by the context 24

Apollo Client - com/ctrip/framework/apollo/spi/ConfigFactoryManager.java

Violation Line
Avoid modifiers which are implied by the context 13

Apollo Client - com/ctrip/framework/apollo/spi/ConfigRegistry.java

Violation Line
Avoid modifiers which are implied by the context 15
Avoid modifiers which are implied by the context 23

Apollo Client - com/ctrip/framework/apollo/spi/DefaultConfigFactory.java

Violation Line
Avoid unused private fields such as 'logger'. 22

Apollo Client - com/ctrip/framework/apollo/spi/DefaultConfigFactoryManager.java

Violation Line
Avoid empty catch blocks 41–43

Apollo Client - com/ctrip/framework/apollo/util/http/HttpUtil.java

Violation Line
Avoid empty catch blocks 125–127

Apollo Common - com/ctrip/framework/apollo/common/controller/GlobalDefaultExceptionHandler.java

Violation Line
Too many static imports may lead to messy code 1–119

Apollo Common - com/ctrip/framework/apollo/common/http/MultiResponseEntity.java

Violation Line
Avoid unused private fields such as 'code'. 13

Apollo Common - com/ctrip/framework/apollo/common/utils/BeanUtils.java

Violation Line
Avoid empty catch blocks 189–191
Avoid empty catch blocks 205–207

Apollo ConfigService - com/ctrip/framework/apollo/configservice/controller/ConfigFileController.java

Violation Line
Avoid unused imports such as 'com.ctrip.framework.apollo.core.dto.ApolloConfigNotification' 22
Avoid unused imports such as 'com.dianping.cat.Cat' 24
Avoid unused imports such as 'org.hibernate.cache.spi.CacheKey' 26
Avoid unused imports such as 'org.springframework.web.context.request.async.DeferredResult' 38
Avoid unused imports such as 'java.io.StringWriter' 41
Avoid unused imports such as 'java.util.Collection' 43

Apollo Core - com/ctrip/framework/apollo/core/utils/ApolloThreadFactory.java

Violation Line
Avoid using java.lang.ThreadGroup; it is not thread safe 22
Avoid modifiers which are implied by the context 64–66

Apollo Core - com/ctrip/framework/apollo/core/utils/MachineUtil.java

Violation Line
Useless parentheses. 52

Apollo Core - com/ctrip/framework/apollo/core/utils/StringUtils.java

Violation Line
Avoid modifiers which are implied by the context 327–329

Apollo Demo - ApolloConfigDemo.java

Violation Line
Avoid unused imports such as 'com.ctrip.framework.apollo.ConfigFile' 3
Avoid unused imports such as 'com.ctrip.framework.apollo.core.enums.ConfigFileFormat' 5

Apollo Demo - ApolloConfigFileDemo.java

Violation Line
Avoid unused imports such as 'java.io.StringReader' 11
Avoid unused imports such as 'java.util.Properties' 12
Avoid unused private fields such as 'logger'. 18

Apollo Portal - com/ctrip/framework/apollo/portal/PortalSettings.java

Violation Line
Avoid unused imports such as 'org.springframework.beans.factory.annotation.Value' 13
Avoid unused private methods such as 'postConstruct()'. 56

Apollo Portal - com/ctrip/framework/apollo/portal/api/API.java

Violation Line
Avoid unused private methods such as 'postConstruct()'. 22

Apollo Portal - com/ctrip/framework/apollo/portal/auth/CtripSsoHeartbeatHandler.java

Violation Line
Avoid empty catch blocks 16–17

Apollo Portal - com/ctrip/framework/apollo/portal/auth/CtripUserService.java

Violation Line
Avoid unused imports such as 'org.springframework.http.converter.json.GsonHttpMessageConverter' 17

Apollo Portal - com/ctrip/framework/apollo/portal/auth/DefaultSsoHeartbeatHandler.java

Violation Line
Avoid empty catch blocks 16–17

Apollo Portal - com/ctrip/framework/apollo/portal/auth/DefaultUserService.java

Violation Line
Avoid unused imports such as 'java.util.Collections' 9

Apollo Portal - com/ctrip/framework/apollo/portal/controller/ReleaseController.java

Violation Line
Avoid unused imports such as 'org.springframework.web.bind.annotation.RequestMethod' 15

Apollo Portal - com/ctrip/framework/apollo/portal/entity/vo/NamespaceVO.java

Violation Line
Avoid unused imports such as 'com.ctrip.framework.apollo.core.enums.ConfigFileFormat' 4

Apollo Portal - com/ctrip/framework/apollo/portal/repository/UserRoleRepository.java

Violation Line
Avoid unused imports such as 'java.util.Set' 9

Apollo Portal - com/ctrip/framework/apollo/portal/service/AppService.java

Violation Line
Useless parentheses. 52

Apollo Portal - com/ctrip/framework/apollo/portal/service/ConfigService.java

Violation Line
Avoid unused private fields such as 'releaseAPI'. 45

Apollo Portal - com/ctrip/framework/apollo/portal/service/ServiceLocator.java

Violation Line
Avoid unused private methods such as 'postConstruct()'. 50

Apollo Portal - com/ctrip/framework/apollo/portal/service/txtresolver/PropertyResolver.java

Violation Line
Useless parentheses. 179