aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api-impl
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2019-07-09 15:30:56 -0500
committerSonarTech <sonartech@sonarsource.com>2019-07-12 20:21:15 +0200
commit6ce2c8689b7a574ac6cc6906210de4f45247e7aa (patch)
tree757c88adda75e1b4e8bd9577471af7f3e36cb362 /sonar-plugin-api-impl
parentd7d92c0f177566e68e5354f8e589f2aaa1ee8302 (diff)
downloadsonarqube-6ce2c8689b7a574ac6cc6906210de4f45247e7aa.tar.gz
sonarqube-6ce2c8689b7a574ac6cc6906210de4f45247e7aa.zip
Extract implementation from plugin API and create new module sonar-plugin-api-impl
Diffstat (limited to 'sonar-plugin-api-impl')
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/AbstractProjectOrModule.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/AbstractProjectOrModule.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultFileSystem.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultFileSystem.java)8
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultIndexedFile.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultIndexedFile.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputComponent.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputComponent.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputDir.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputDir.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputFile.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputModule.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputModule.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputProject.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputProject.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultTextPointer.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultTextPointer.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultTextRange.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultTextRange.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/FileMetadata.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/FileMetadata.java)12
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/Metadata.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/Metadata.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/PathPattern.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/PathPattern.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/SensorStrategy.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/SensorStrategy.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/TestInputFileBuilder.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/TestInputFileBuilder.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/CharHandler.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/CharHandler.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/FileHashComputer.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/FileHashComputer.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/IntArrayList.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/IntArrayList.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/LineCounter.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/LineCounter.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/LineHashComputer.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/LineHashComputer.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/LineOffsetCounter.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/LineOffsetCounter.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/package-info.java24
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/package-info.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/package-info.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/AbsolutePathPredicate.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/AbsolutePathPredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/AbstractFilePredicate.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/AbstractFilePredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/AndPredicate.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/AndPredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/DefaultFilePredicates.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/DefaultFilePredicates.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/FalsePredicate.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/FalsePredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/FileExtensionPredicate.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/FileExtensionPredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/FilenamePredicate.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/FilenamePredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/LanguagePredicate.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/LanguagePredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/NotPredicate.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/NotPredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/OperatorPredicate.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OperatorPredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/OptimizedFilePredicate.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OptimizedFilePredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/OptimizedFilePredicateAdapter.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OptimizedFilePredicateAdapter.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/OrPredicate.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OrPredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/PathPatternPredicate.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/PathPatternPredicate.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/RelativePathPredicate.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/RelativePathPredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/StatusPredicate.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/StatusPredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/TruePredicate.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/TruePredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/TypePredicate.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/TypePredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/URIPredicate.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/URIPredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/package-info.java24
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/postjob/internal/DefaultPostJobDescriptor.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultPostJobDescriptor.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/postjob/internal/package-info.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/package-info.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/ActiveRulesBuilder.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/ActiveRulesBuilder.java)3
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/DefaultActiveRule.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/DefaultActiveRule.java)3
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/DefaultActiveRules.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/DefaultActiveRules.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/DefaultRule.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/DefaultRule.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/DefaultRuleParam.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/DefaultRuleParam.java)3
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/DefaultRules.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/DefaultRules.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/NewActiveRule.java134
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/NewRule.java92
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/NewRuleParam.java36
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/RulesBuilder.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/RulesBuilder.java)3
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/package-info.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/package-info.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/code/internal/DefaultSignificantCode.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultSignificantCode.java)3
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/code/internal/package-info.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/package-info.java)7
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/coverage/internal/DefaultCoverage.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultCoverage.java)5
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/coverage/internal/package-info.java21
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/cpd/internal/DefaultCpdTokens.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultCpdTokens.java)6
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/cpd/internal/package-info.java21
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/error/internal/DefaultAnalysisError.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultAnalysisError.java)3
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/error/internal/package-info.java24
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlighting.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultHighlighting.java)5
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/SyntaxHighlightingRule.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/SyntaxHighlightingRule.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/package-info.java24
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/DefaultSensorDescriptor.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultSensorDescriptor.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/DefaultStorable.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultStorable.java)3
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/InMemorySensorStorage.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/InMemorySensorStorage.java)8
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/SensorContextTester.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/SensorContextTester.java)34
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/package-info.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/package-info.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/AbstractDefaultIssue.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/AbstractDefaultIssue.java)10
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssue.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultExternalIssue.java)5
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssue.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/DefaultIssue.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssueLocation.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/DefaultIssueLocation.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultNoSonarFilter.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/DefaultNoSonarFilter.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/package-info.java24
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/measure/internal/DefaultMeasure.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultMeasure.java)3
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/measure/internal/package-info.java24
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRule.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultAdHocRule.java)3
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/rule/internal/package-info.java21
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/symbol/internal/DefaultSymbolTable.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultSymbolTable.java)5
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/symbol/internal/package-info.java21
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/config/internal/ConfigurationBridge.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/ConfigurationBridge.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/config/internal/MapSettings.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/MapSettings.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/config/internal/MultivalueProperty.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/MultivalueProperty.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/config/internal/package-info.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/package-info.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultNewRepository.java4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/RulesDefinitionContext.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/RuleDefinitionContext.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/internal/MetadataLoader.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/MetadataLoader.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/internal/PluginContextImpl.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/PluginContextImpl.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/internal/SonarRuntimeImpl.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/SonarRuntimeImpl.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/internal/package-info.java (renamed from sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/package-info.java)2
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/charhandler/IntArrayListTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/charhandler/IntArrayListTest.java)2
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/DefaultFileSystemTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultFileSystemTest.java)5
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/DefaultInputDirTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputDirTest.java)3
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/DefaultInputFileTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputFileTest.java)7
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/DefaultInputModuleTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputModuleTest.java)3
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/DefaultInputProjectTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputProjectTest.java)4
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/FileMetadataTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/FileMetadataTest.java)6
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/MetadataTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/MetadataTest.java)6
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/PathPatternTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/PathPatternTest.java)16
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/TestInputFileBuilderTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/TestInputFileBuilderTest.java)5
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/predicates/AndPredicateTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/AndPredicateTest.java)6
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/predicates/DefaultFilePredicatesTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/DefaultFilePredicatesTest.java)4
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/predicates/FileExtensionPredicateTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/FileExtensionPredicateTest.java)4
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/predicates/FilenamePredicateTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/FilenamePredicateTest.java)2
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/predicates/OrPredicateTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/OrPredicateTest.java)4
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/predicates/RelativePathPredicateTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/RelativePathPredicateTest.java)2
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/rule/internal/DefaultRulesTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/rule/DefaultRulesTest.java)4
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/rule/internal/NewActiveRuleTest.java88
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/rule/internal/RulesBuilderTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/rule/RulesBuilderTest.java)4
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/code/internal/DefaultSignificantCodeTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultSignificantCodeTest.java)5
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/cpd/internal/DefaultCpdTokensTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultCpdTokensTest.java)7
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/error/internal/DefaultAnalysisErrorTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultAnalysisErrorTest.java)24
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlightingTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultHighlightingTest.java)26
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/internal/DefaultSensorDescriptorTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultSensorDescriptorTest.java)4
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/internal/InMemorySensorStorageTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/InMemorySensorStorageTest.java)3
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/internal/SensorContextTesterTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/SensorContextTesterTest.java)18
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssueTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultExternalIssueTest.java)11
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssueLocationTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultIssueLocationTest.java)6
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssueTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultIssueTest.java)16
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/measure/internal/DefaultMeasureTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultMeasureTest.java)34
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRuleTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultAdHocRuleTest.java)3
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/symbol/internal/DefaultSymbolTableTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultSymbolTableTest.java)4
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/config/internal/MapSettingsTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/config/MapSettingsTest.java)104
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/config/internal/MultivaluePropertyTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/config/MultivaluePropertyTest.java)6
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/internal/MetadataLoaderTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/context/MetadataLoaderTest.java)11
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/internal/SonarRuntimeImplTest.java (renamed from sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/context/SonarRuntimeImplTest.java)7
-rw-r--r--sonar-plugin-api-impl/src/test/resources/org/sonar/api/batch/fs/internal/fs/glyphicons-halflings-regular.woff (renamed from sonar-plugin-api-impl/src/test/resources/org/sonar/api/impl/fs/glyphicons-halflings-regular.woff)bin16448 -> 16448 bytes
131 files changed, 917 insertions, 315 deletions
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/AbstractProjectOrModule.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/AbstractProjectOrModule.java
index 2834b345a93..2f45fb0f488 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/AbstractProjectOrModule.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/AbstractProjectOrModule.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal;
import java.io.File;
import java.io.IOException;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultFileSystem.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultFileSystem.java
index db015d9277d..94dfc99f1b1 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultFileSystem.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultFileSystem.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal;
import java.io.File;
import java.io.IOException;
@@ -37,9 +37,9 @@ import org.sonar.api.batch.fs.FilePredicates;
import org.sonar.api.batch.fs.FileSystem;
import org.sonar.api.batch.fs.InputDir;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.api.impl.fs.predicates.DefaultFilePredicates;
-import org.sonar.api.impl.fs.predicates.FileExtensionPredicate;
-import org.sonar.api.impl.fs.predicates.OptimizedFilePredicateAdapter;
+import org.sonar.api.batch.fs.internal.predicates.DefaultFilePredicates;
+import org.sonar.api.batch.fs.internal.predicates.FileExtensionPredicate;
+import org.sonar.api.batch.fs.internal.predicates.OptimizedFilePredicateAdapter;
import org.sonar.api.scan.filesystem.PathResolver;
import org.sonar.api.utils.PathUtils;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultIndexedFile.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultIndexedFile.java
index 5dae95717c4..229280fca5b 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultIndexedFile.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultIndexedFile.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal;
import java.io.File;
import java.io.IOException;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputComponent.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputComponent.java
index 14acba4e1fe..19a5cce029b 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputComponent.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputComponent.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal;
import java.util.HashSet;
import java.util.Set;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputDir.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputDir.java
index 53f1800c720..14a39ee1b32 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputDir.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputDir.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal;
import java.io.File;
import java.net.URI;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputFile.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java
index 61561b0541a..4a48bf9a896 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputFile.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputModule.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputModule.java
index 476a719da81..73fa8dd7629 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputModule.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputModule.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal;
import java.io.File;
import java.nio.file.Path;
@@ -30,7 +30,7 @@ import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.batch.fs.InputModule;
import org.sonar.api.scan.filesystem.PathResolver;
-import static org.sonar.api.impl.config.MultivalueProperty.parseAsCsv;
+import static org.sonar.api.config.internal.MultivalueProperty.parseAsCsv;
@Immutable
public class DefaultInputModule extends AbstractProjectOrModule implements InputModule {
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputProject.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputProject.java
index 0ed150065ed..b6f07c852f2 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputProject.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputProject.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal;
import javax.annotation.concurrent.Immutable;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultTextPointer.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultTextPointer.java
index 541ee958bba..c10efd01de7 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultTextPointer.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultTextPointer.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal;
import org.sonar.api.batch.fs.TextPointer;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultTextRange.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultTextRange.java
index 0bf0e5151ab..efef79cf367 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultTextRange.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultTextRange.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal;
import org.sonar.api.batch.fs.TextPointer;
import org.sonar.api.batch.fs.TextRange;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/FileMetadata.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/FileMetadata.java
index 8078db10b67..bda14d89d4b 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/FileMetadata.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/FileMetadata.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal;
import java.io.BufferedReader;
import java.io.IOException;
@@ -29,11 +29,11 @@ import java.nio.charset.StandardCharsets;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.api.impl.fs.charhandler.CharHandler;
-import org.sonar.api.impl.fs.charhandler.FileHashComputer;
-import org.sonar.api.impl.fs.charhandler.LineCounter;
-import org.sonar.api.impl.fs.charhandler.LineHashComputer;
-import org.sonar.api.impl.fs.charhandler.LineOffsetCounter;
+import org.sonar.api.batch.fs.internal.charhandler.CharHandler;
+import org.sonar.api.batch.fs.internal.charhandler.FileHashComputer;
+import org.sonar.api.batch.fs.internal.charhandler.LineCounter;
+import org.sonar.api.batch.fs.internal.charhandler.LineHashComputer;
+import org.sonar.api.batch.fs.internal.charhandler.LineOffsetCounter;
/**
* Computes hash of files. Ends of Lines are ignored, so files with
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/Metadata.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/Metadata.java
index e17704135ce..50c0d753bcd 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/Metadata.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/Metadata.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal;
import java.util.Arrays;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/PathPattern.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/PathPattern.java
index 30a813d5a60..41287d42011 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/PathPattern.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/PathPattern.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal;
import java.nio.file.Path;
import javax.annotation.concurrent.ThreadSafe;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/SensorStrategy.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/SensorStrategy.java
index d956d061f91..adde73809f6 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/SensorStrategy.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/SensorStrategy.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal;
import org.sonar.api.batch.fs.InputFile;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/TestInputFileBuilder.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/TestInputFileBuilder.java
index e731e7ff7ab..00f9319c2d4 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/TestInputFileBuilder.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/TestInputFileBuilder.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal;
import java.io.File;
import java.io.IOException;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/CharHandler.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/CharHandler.java
index 06218a6a9f2..8932b7d8994 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/CharHandler.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/CharHandler.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.charhandler;
+package org.sonar.api.batch.fs.internal.charhandler;
public abstract class CharHandler {
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/FileHashComputer.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/FileHashComputer.java
index eaa5672eef6..9fe15ff8821 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/FileHashComputer.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/FileHashComputer.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.charhandler;
+package org.sonar.api.batch.fs.internal.charhandler;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/IntArrayList.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/IntArrayList.java
index b298b0524c5..0795098bd7c 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/IntArrayList.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/IntArrayList.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.charhandler;
+package org.sonar.api.batch.fs.internal.charhandler;
import java.util.Arrays;
import java.util.Collection;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/LineCounter.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/LineCounter.java
index ba5093b29e8..588d716566e 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/LineCounter.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/LineCounter.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.charhandler;
+package org.sonar.api.batch.fs.internal.charhandler;
import java.nio.charset.Charset;
import org.sonar.api.CoreProperties;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/LineHashComputer.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/LineHashComputer.java
index 8384258161c..fa8c4f12e1a 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/LineHashComputer.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/LineHashComputer.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.charhandler;
+package org.sonar.api.batch.fs.internal.charhandler;
import java.io.File;
import java.nio.ByteBuffer;
@@ -28,7 +28,7 @@ import java.nio.charset.CodingErrorAction;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import org.apache.commons.codec.digest.DigestUtils;
-import org.sonar.api.impl.fs.FileMetadata;
+import org.sonar.api.batch.fs.internal.FileMetadata;
public class LineHashComputer extends CharHandler {
private final MessageDigest lineMd5Digest = DigestUtils.getMd5Digest();
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/LineOffsetCounter.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/LineOffsetCounter.java
index 1b0ad31fed1..22292bef569 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/LineOffsetCounter.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/LineOffsetCounter.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.charhandler;
+package org.sonar.api.batch.fs.internal.charhandler;
public class LineOffsetCounter extends CharHandler {
private long currentOriginalLineStartOffset = 0;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/package-info.java
new file mode 100644
index 00000000000..953ee253c6a
--- /dev/null
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/charhandler/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2019 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+@ParametersAreNonnullByDefault
+package org.sonar.api.batch.fs.internal.charhandler;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/package-info.java
index 8d4146ce55a..4af8d775684 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/package-info.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/package-info.java
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@ParametersAreNonnullByDefault
-package org.sonar.api.impl.issue;
+package org.sonar.api.batch.fs.internal;
import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/AbsolutePathPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/AbsolutePathPredicate.java
index c83cc6463a1..56414c5c951 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/AbsolutePathPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/AbsolutePathPredicate.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import java.io.File;
import java.nio.file.Path;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/AbstractFilePredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/AbstractFilePredicate.java
index 1a964b49b6b..a073ab6eaa5 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/AbstractFilePredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/AbstractFilePredicate.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import java.util.stream.StreamSupport;
import org.sonar.api.batch.fs.FileSystem.Index;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/AndPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/AndPredicate.java
index d2ea1f35f59..ab0c12930f0 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/AndPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/AndPredicate.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import java.util.ArrayList;
import java.util.Collection;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/DefaultFilePredicates.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/DefaultFilePredicates.java
index fe005c608e7..1e45c434442 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/DefaultFilePredicates.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/DefaultFilePredicates.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import java.io.File;
import java.net.URI;
@@ -30,7 +30,7 @@ import org.sonar.api.batch.fs.FilePredicate;
import org.sonar.api.batch.fs.FilePredicates;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.InputFile.Status;
-import org.sonar.api.impl.fs.PathPattern;
+import org.sonar.api.batch.fs.internal.PathPattern;
/**
* Factory of {@link FilePredicate}
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/FalsePredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/FalsePredicate.java
index d6c1d78a696..1f2207dc80a 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/FalsePredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/FalsePredicate.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import java.util.Collections;
import org.sonar.api.batch.fs.FilePredicate;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/FileExtensionPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/FileExtensionPredicate.java
index 7775c567832..8e3e55ab602 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/FileExtensionPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/FileExtensionPredicate.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import java.util.Locale;
import org.sonar.api.batch.fs.FileSystem;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/FilenamePredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/FilenamePredicate.java
index 94fac58852f..68a3e4f08d0 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/FilenamePredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/FilenamePredicate.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import org.sonar.api.batch.fs.FileSystem;
import org.sonar.api.batch.fs.InputFile;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/LanguagePredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/LanguagePredicate.java
index e553625789a..e78ef8dd385 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/LanguagePredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/LanguagePredicate.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import org.sonar.api.batch.fs.InputFile;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/NotPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/NotPredicate.java
index 4841c558826..33b3c67fc28 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/NotPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/NotPredicate.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import java.util.Arrays;
import java.util.List;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OperatorPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/OperatorPredicate.java
index bf8e566e144..06e3042f85b 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OperatorPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/OperatorPredicate.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import java.util.List;
import org.sonar.api.batch.fs.FilePredicate;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OptimizedFilePredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/OptimizedFilePredicate.java
index aaba4c890d6..de1ea6ac40b 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OptimizedFilePredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/OptimizedFilePredicate.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import org.sonar.api.batch.fs.FilePredicate;
import org.sonar.api.batch.fs.FileSystem;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OptimizedFilePredicateAdapter.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/OptimizedFilePredicateAdapter.java
index 5de4fee72b5..e2f9336787e 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OptimizedFilePredicateAdapter.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/OptimizedFilePredicateAdapter.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import org.sonar.api.batch.fs.FilePredicate;
import org.sonar.api.batch.fs.InputFile;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OrPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/OrPredicate.java
index 3f93903c4da..92a3ec0ee9e 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OrPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/OrPredicate.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import java.util.ArrayList;
import java.util.Collection;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/PathPatternPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/PathPatternPredicate.java
index 1e276751134..70efa651cb1 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/PathPatternPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/PathPatternPredicate.java
@@ -17,11 +17,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import java.nio.file.Paths;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.api.impl.fs.PathPattern;
+import org.sonar.api.batch.fs.internal.PathPattern;
/**
* @since 4.2
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/RelativePathPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/RelativePathPredicate.java
index a1cb9f42090..c03a20916f8 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/RelativePathPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/RelativePathPredicate.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import java.util.Collections;
import javax.annotation.Nullable;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/StatusPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/StatusPredicate.java
index bcac4e04c49..e9a6b87a7f6 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/StatusPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/StatusPredicate.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import javax.annotation.Nullable;
import org.sonar.api.batch.fs.InputFile;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/TruePredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/TruePredicate.java
index 04d56ee387e..1dfcdfca320 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/TruePredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/TruePredicate.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import org.sonar.api.batch.fs.FilePredicate;
import org.sonar.api.batch.fs.FileSystem.Index;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/TypePredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/TypePredicate.java
index f9d57058352..081fee5350a 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/TypePredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/TypePredicate.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import org.sonar.api.batch.fs.InputFile;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/URIPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/URIPredicate.java
index 60fea977b5d..8dd2a301563 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/URIPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/URIPredicate.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import java.net.URI;
import java.nio.file.Path;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/package-info.java
new file mode 100644
index 00000000000..d847fbed7c1
--- /dev/null
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/predicates/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2019 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+@ParametersAreNonnullByDefault
+package org.sonar.api.batch.fs.internal.predicates;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultPostJobDescriptor.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/postjob/internal/DefaultPostJobDescriptor.java
index 152c5719e0a..c3c23969ac6 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultPostJobDescriptor.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/postjob/internal/DefaultPostJobDescriptor.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.postjob.internal;
import java.util.Arrays;
import java.util.Collection;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/postjob/internal/package-info.java
index 9c9bce61dbc..8e69c511b6d 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/package-info.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/postjob/internal/package-info.java
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@ParametersAreNonnullByDefault
-package org.sonar.api.impl.fs.charhandler;
+package org.sonar.api.batch.postjob.internal;
import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/ActiveRulesBuilder.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/ActiveRulesBuilder.java
index 318a4738291..a77980f36e7 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/ActiveRulesBuilder.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/ActiveRulesBuilder.java
@@ -17,12 +17,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.rule;
+package org.sonar.api.batch.rule.internal;
import java.util.LinkedHashMap;
import java.util.Map;
import org.sonar.api.batch.rule.ActiveRules;
-import org.sonar.api.batch.rule.NewActiveRule;
import org.sonar.api.rule.RuleKey;
/**
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/DefaultActiveRule.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/DefaultActiveRule.java
index a46bf1a2e82..f1c9061ab21 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/DefaultActiveRule.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/DefaultActiveRule.java
@@ -17,12 +17,13 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.batch.rule;
+package org.sonar.api.batch.rule.internal;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.concurrent.Immutable;
+import org.sonar.api.batch.rule.ActiveRule;
import org.sonar.api.rule.RuleKey;
@Immutable
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/DefaultActiveRules.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/DefaultActiveRules.java
index 9add14cc484..845137acf60 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/DefaultActiveRules.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/DefaultActiveRules.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.rule;
+package org.sonar.api.batch.rule.internal;
import java.util.ArrayList;
import java.util.Collection;
@@ -29,8 +29,6 @@ import java.util.stream.Collectors;
import javax.annotation.concurrent.Immutable;
import org.sonar.api.batch.rule.ActiveRule;
import org.sonar.api.batch.rule.ActiveRules;
-import org.sonar.api.batch.rule.DefaultActiveRule;
-import org.sonar.api.batch.rule.NewActiveRule;
import org.sonar.api.rule.RuleKey;
@Immutable
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/DefaultRule.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/DefaultRule.java
index b8938529024..5708c62ec76 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/DefaultRule.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/DefaultRule.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.batch.rule;
+package org.sonar.api.batch.rule.internal;
import java.util.Collection;
import java.util.Collections;
@@ -25,6 +25,8 @@ import java.util.HashMap;
import java.util.Map;
import javax.annotation.CheckForNull;
import javax.annotation.concurrent.Immutable;
+import org.sonar.api.batch.rule.Rule;
+import org.sonar.api.batch.rule.RuleParam;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rule.RuleStatus;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/DefaultRuleParam.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/DefaultRuleParam.java
index eb714dcfeda..793e94903ad 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/DefaultRuleParam.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/DefaultRuleParam.java
@@ -17,10 +17,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.batch.rule;
+package org.sonar.api.batch.rule.internal;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
+import org.sonar.api.batch.rule.RuleParam;
@Immutable
class DefaultRuleParam implements RuleParam {
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/DefaultRules.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/DefaultRules.java
index c7c7b5ead44..def001211e7 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/DefaultRules.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/DefaultRules.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.rule;
+package org.sonar.api.batch.rule.internal;
import java.util.ArrayList;
import java.util.Collection;
@@ -27,8 +27,6 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.concurrent.Immutable;
-import org.sonar.api.batch.rule.DefaultRule;
-import org.sonar.api.batch.rule.NewRule;
import org.sonar.api.batch.rule.Rule;
import org.sonar.api.batch.rule.Rules;
import org.sonar.api.rule.RuleKey;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/NewActiveRule.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/NewActiveRule.java
new file mode 100644
index 00000000000..10b5c943158
--- /dev/null
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/NewActiveRule.java
@@ -0,0 +1,134 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2019 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.api.batch.rule.internal;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
+import org.apache.commons.lang.StringUtils;
+import org.sonar.api.rule.RuleKey;
+import org.sonar.api.rule.Severity;
+
+/**
+ * @since 4.2
+ */
+@Immutable
+public class NewActiveRule {
+ final RuleKey ruleKey;
+ final String name;
+ final String severity;
+ final Map<String, String> params;
+ final long createdAt;
+ final long updatedAt;
+ final String internalKey;
+ final String language;
+ final String templateRuleKey;
+ final String qProfileKey;
+
+ NewActiveRule(Builder builder) {
+ this.ruleKey = builder.ruleKey;
+ this.name = builder.name;
+ this.severity = builder.severity;
+ this.params = builder.params;
+ this.createdAt = builder.createdAt;
+ this.updatedAt = builder.updatedAt;
+ this.internalKey = builder.internalKey;
+ this.language = builder.language;
+ this.templateRuleKey = builder.templateRuleKey;
+ this.qProfileKey = builder.qProfileKey;
+ }
+
+ public RuleKey ruleKey() {
+ return this.ruleKey;
+ }
+
+ public static class Builder {
+ private RuleKey ruleKey;
+ private String name;
+ private String severity = Severity.defaultSeverity();
+ private Map<String, String> params = new HashMap<>();
+ private long createdAt;
+ private long updatedAt;
+ private String internalKey;
+ private String language;
+ private String templateRuleKey;
+ private String qProfileKey;
+
+ public Builder setRuleKey(RuleKey ruleKey) {
+ this.ruleKey = ruleKey;
+ return this;
+ }
+
+ public Builder setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public Builder setSeverity(@Nullable String severity) {
+ this.severity = StringUtils.defaultIfBlank(severity, Severity.defaultSeverity());
+ return this;
+ }
+
+ public Builder setParam(String key, @Nullable String value) {
+ // possible improvement : check that the param key exists in rule definition
+ if (value == null) {
+ params.remove(key);
+ } else {
+ params.put(key, value);
+ }
+ return this;
+ }
+
+ public Builder setCreatedAt(long createdAt) {
+ this.createdAt = createdAt;
+ return this;
+ }
+
+ public Builder setUpdatedAt(long updatedAt) {
+ this.updatedAt = updatedAt;
+ return this;
+ }
+
+ public Builder setInternalKey(@Nullable String internalKey) {
+ this.internalKey = internalKey;
+ return this;
+ }
+
+ public Builder setLanguage(@Nullable String language) {
+ this.language = language;
+ return this;
+ }
+
+ public Builder setTemplateRuleKey(@Nullable String templateRuleKey) {
+ this.templateRuleKey = templateRuleKey;
+ return this;
+ }
+
+ public Builder setQProfileKey(String qProfileKey) {
+ this.qProfileKey = qProfileKey;
+ return this;
+ }
+
+ public NewActiveRule build() {
+ return new NewActiveRule(this);
+ }
+ }
+}
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/NewRule.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/NewRule.java
new file mode 100644
index 00000000000..9805198d3db
--- /dev/null
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/NewRule.java
@@ -0,0 +1,92 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2019 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.api.batch.rule.internal;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Nullable;
+import org.apache.commons.lang.ObjectUtils;
+import org.apache.commons.lang.StringUtils;
+import org.sonar.api.rule.RuleKey;
+import org.sonar.api.rule.RuleStatus;
+import org.sonar.api.rule.Severity;
+
+public class NewRule {
+
+ private static final String DEFAULT_SEVERITY = Severity.defaultSeverity();
+
+ final RuleKey key;
+ Integer id;
+ String name;
+ String description;
+ String severity = DEFAULT_SEVERITY;
+ String type;
+ String internalKey;
+ RuleStatus status = RuleStatus.defaultStatus();
+ Map<String, NewRuleParam> params = new HashMap<>();
+
+ public NewRule(RuleKey key) {
+ this.key = key;
+ }
+
+ public NewRule setId(@Nullable Integer id) {
+ this.id = id;
+ return this;
+ }
+
+ public NewRule setDescription(@Nullable String description) {
+ this.description = description;
+ return this;
+ }
+
+ public NewRule setName(@Nullable String s) {
+ this.name = s;
+ return this;
+ }
+
+ public NewRule setSeverity(@Nullable String severity) {
+ this.severity = StringUtils.defaultIfBlank(severity, DEFAULT_SEVERITY);
+ return this;
+ }
+
+ public NewRule setType(@Nullable String type) {
+ this.type = type;
+ return this;
+ }
+
+ public NewRule setStatus(@Nullable RuleStatus s) {
+ this.status = (RuleStatus) ObjectUtils.defaultIfNull(s, RuleStatus.defaultStatus());
+ return this;
+ }
+
+ public NewRule setInternalKey(@Nullable String s) {
+ this.internalKey = s;
+ return this;
+ }
+
+ public NewRuleParam addParam(String paramKey) {
+ if (params.containsKey(paramKey)) {
+ throw new IllegalStateException(String.format("Parameter '%s' already exists on rule '%s'", paramKey, key));
+ }
+ NewRuleParam param = new NewRuleParam(paramKey);
+ params.put(paramKey, param);
+ return param;
+ }
+}
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/NewRuleParam.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/NewRuleParam.java
new file mode 100644
index 00000000000..a274b56042a
--- /dev/null
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/NewRuleParam.java
@@ -0,0 +1,36 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2019 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.api.batch.rule.internal;
+
+import javax.annotation.Nullable;
+
+public class NewRuleParam {
+ final String key;
+ String description;
+
+ NewRuleParam(String key) {
+ this.key = key;
+ }
+
+ public NewRuleParam setDescription(@Nullable String s) {
+ description = s;
+ return this;
+ }
+}
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/RulesBuilder.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/RulesBuilder.java
index 36c84bef34a..88bf720d536 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/RulesBuilder.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/RulesBuilder.java
@@ -17,11 +17,10 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.rule;
+package org.sonar.api.batch.rule.internal;
import java.util.HashMap;
import java.util.Map;
-import org.sonar.api.batch.rule.NewRule;
import org.sonar.api.batch.rule.Rules;
import org.sonar.api.rule.RuleKey;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/package-info.java
index aa33a1e9028..8b52adecda6 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/package-info.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/internal/package-info.java
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@ParametersAreNonnullByDefault
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.rule.internal;
import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultSignificantCode.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/code/internal/DefaultSignificantCode.java
index 6a373ac061c..40ea16bd42b 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultSignificantCode.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/code/internal/DefaultSignificantCode.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.code.internal;
import java.util.SortedMap;
import java.util.TreeMap;
@@ -25,6 +25,7 @@ import javax.annotation.Nullable;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.TextRange;
import org.sonar.api.batch.sensor.code.NewSignificantCode;
+import org.sonar.api.batch.sensor.internal.DefaultStorable;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.utils.Preconditions;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/code/internal/package-info.java
index b304d3197d8..95f388572a9 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/package-info.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/code/internal/package-info.java
@@ -17,8 +17,5 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-@ParametersAreNonnullByDefault
-package org.sonar.api.impl.sensor;
-
-import javax.annotation.ParametersAreNonnullByDefault;
-
+@javax.annotation.ParametersAreNonnullByDefault
+package org.sonar.api.batch.sensor.code.internal;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultCoverage.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/coverage/internal/DefaultCoverage.java
index c4149ec2f63..94fc1887361 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultCoverage.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/coverage/internal/DefaultCoverage.java
@@ -17,17 +17,18 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.coverage.internal;
import java.util.Collections;
import java.util.SortedMap;
import java.util.TreeMap;
import javax.annotation.Nullable;
import org.sonar.api.batch.fs.InputFile;
+import org.sonar.api.batch.fs.internal.DefaultInputFile;
import org.sonar.api.batch.sensor.coverage.CoverageType;
import org.sonar.api.batch.sensor.coverage.NewCoverage;
+import org.sonar.api.batch.sensor.internal.DefaultStorable;
import org.sonar.api.batch.sensor.internal.SensorStorage;
-import org.sonar.api.impl.fs.DefaultInputFile;
import static java.util.Objects.requireNonNull;
import static org.sonar.api.utils.Preconditions.checkState;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/coverage/internal/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/coverage/internal/package-info.java
new file mode 100644
index 00000000000..a0b5e87657d
--- /dev/null
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/coverage/internal/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2019 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+@javax.annotation.ParametersAreNonnullByDefault
+package org.sonar.api.batch.sensor.coverage.internal;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultCpdTokens.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/cpd/internal/DefaultCpdTokens.java
index 9b789d22d14..a2c592c37b5 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultCpdTokens.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/cpd/internal/DefaultCpdTokens.java
@@ -17,16 +17,16 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.cpd.internal;
import java.util.ArrayList;
import java.util.List;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.TextRange;
+import org.sonar.api.batch.fs.internal.DefaultInputFile;
import org.sonar.api.batch.sensor.cpd.NewCpdTokens;
-import org.sonar.api.batch.sensor.cpd.internal.TokensLine;
+import org.sonar.api.batch.sensor.internal.DefaultStorable;
import org.sonar.api.batch.sensor.internal.SensorStorage;
-import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/cpd/internal/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/cpd/internal/package-info.java
new file mode 100644
index 00000000000..f89010f0b60
--- /dev/null
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/cpd/internal/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2019 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+@javax.annotation.ParametersAreNonnullByDefault
+package org.sonar.api.batch.sensor.cpd.internal;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultAnalysisError.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/error/internal/DefaultAnalysisError.java
index 5508461ce68..3a9073a5095 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultAnalysisError.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/error/internal/DefaultAnalysisError.java
@@ -17,12 +17,13 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.error.internal;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.TextPointer;
import org.sonar.api.batch.sensor.error.AnalysisError;
import org.sonar.api.batch.sensor.error.NewAnalysisError;
+import org.sonar.api.batch.sensor.internal.DefaultStorable;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import static java.util.Objects.requireNonNull;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/error/internal/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/error/internal/package-info.java
new file mode 100644
index 00000000000..07b2de5142d
--- /dev/null
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/error/internal/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2019 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+@ParametersAreNonnullByDefault
+package org.sonar.api.batch.sensor.error.internal;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultHighlighting.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlighting.java
index c7e133dfea7..9bf679aa9a3 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultHighlighting.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlighting.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.highlighting.internal;
import java.util.ArrayList;
import java.util.Collections;
@@ -28,7 +28,8 @@ import org.sonar.api.batch.fs.TextRange;
import org.sonar.api.batch.sensor.highlighting.NewHighlighting;
import org.sonar.api.batch.sensor.highlighting.TypeOfText;
import org.sonar.api.batch.sensor.internal.SensorStorage;
-import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.batch.fs.internal.DefaultInputFile;
+import org.sonar.api.batch.sensor.internal.DefaultStorable;
import static java.util.Objects.requireNonNull;
import static org.sonar.api.utils.Preconditions.checkState;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/SyntaxHighlightingRule.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/SyntaxHighlightingRule.java
index 35d4fbea48a..22934dc19d2 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/SyntaxHighlightingRule.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/SyntaxHighlightingRule.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.highlighting.internal;
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/package-info.java
new file mode 100644
index 00000000000..ca3da22a9bd
--- /dev/null
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2019 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+@ParametersAreNonnullByDefault
+package org.sonar.api.batch.sensor.highlighting.internal;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultSensorDescriptor.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/DefaultSensorDescriptor.java
index 5b60ac287e2..ef29870e1c5 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultSensorDescriptor.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/DefaultSensorDescriptor.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.internal;
import java.util.Arrays;
import java.util.Collection;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultStorable.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/DefaultStorable.java
index c4f6ca39f4a..822ffbc2a40 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultStorable.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/DefaultStorable.java
@@ -17,12 +17,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.internal;
import javax.annotation.Nullable;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
-import org.sonar.api.batch.sensor.internal.SensorStorage;
import static java.util.Objects.requireNonNull;
import static org.sonar.api.utils.Preconditions.checkState;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/InMemorySensorStorage.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/InMemorySensorStorage.java
index 26f74db0341..1d894ae9ba4 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/InMemorySensorStorage.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/InMemorySensorStorage.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.internal;
import java.util.ArrayList;
import java.util.Collection;
@@ -26,16 +26,20 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.sonar.api.batch.sensor.code.NewSignificantCode;
+import org.sonar.api.batch.sensor.code.internal.DefaultSignificantCode;
import org.sonar.api.batch.sensor.coverage.NewCoverage;
+import org.sonar.api.batch.sensor.coverage.internal.DefaultCoverage;
import org.sonar.api.batch.sensor.cpd.NewCpdTokens;
+import org.sonar.api.batch.sensor.cpd.internal.DefaultCpdTokens;
import org.sonar.api.batch.sensor.error.AnalysisError;
import org.sonar.api.batch.sensor.highlighting.NewHighlighting;
-import org.sonar.api.batch.sensor.internal.SensorStorage;
+import org.sonar.api.batch.sensor.highlighting.internal.DefaultHighlighting;
import org.sonar.api.batch.sensor.issue.ExternalIssue;
import org.sonar.api.batch.sensor.issue.Issue;
import org.sonar.api.batch.sensor.measure.Measure;
import org.sonar.api.batch.sensor.rule.AdHocRule;
import org.sonar.api.batch.sensor.symbol.NewSymbolTable;
+import org.sonar.api.batch.sensor.symbol.internal.DefaultSymbolTable;
import static org.sonar.api.utils.Preconditions.checkArgument;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/SensorContextTester.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/SensorContextTester.java
index 6877a771175..2b062e39326 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/SensorContextTester.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/SensorContextTester.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.internal;
import java.io.File;
import java.io.Serializable;
@@ -39,39 +39,49 @@ import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.InputModule;
import org.sonar.api.batch.fs.TextRange;
+import org.sonar.api.batch.fs.internal.DefaultFileSystem;
+import org.sonar.api.batch.fs.internal.DefaultInputFile;
+import org.sonar.api.batch.fs.internal.DefaultInputModule;
+import org.sonar.api.batch.fs.internal.DefaultInputProject;
+import org.sonar.api.batch.fs.internal.DefaultTextPointer;
import org.sonar.api.batch.rule.ActiveRules;
+import org.sonar.api.batch.rule.internal.ActiveRulesBuilder;
import org.sonar.api.batch.sensor.Sensor;
import org.sonar.api.batch.sensor.SensorContext;
import org.sonar.api.batch.sensor.code.NewSignificantCode;
+import org.sonar.api.batch.sensor.code.internal.DefaultSignificantCode;
import org.sonar.api.batch.sensor.coverage.NewCoverage;
+import org.sonar.api.batch.sensor.coverage.internal.DefaultCoverage;
import org.sonar.api.batch.sensor.cpd.NewCpdTokens;
+import org.sonar.api.batch.sensor.cpd.internal.DefaultCpdTokens;
import org.sonar.api.batch.sensor.cpd.internal.TokensLine;
import org.sonar.api.batch.sensor.error.AnalysisError;
import org.sonar.api.batch.sensor.error.NewAnalysisError;
+import org.sonar.api.batch.sensor.error.internal.DefaultAnalysisError;
import org.sonar.api.batch.sensor.highlighting.NewHighlighting;
import org.sonar.api.batch.sensor.highlighting.TypeOfText;
+import org.sonar.api.batch.sensor.highlighting.internal.DefaultHighlighting;
+import org.sonar.api.batch.sensor.highlighting.internal.SyntaxHighlightingRule;
import org.sonar.api.batch.sensor.issue.ExternalIssue;
import org.sonar.api.batch.sensor.issue.Issue;
import org.sonar.api.batch.sensor.issue.NewExternalIssue;
import org.sonar.api.batch.sensor.issue.NewIssue;
+import org.sonar.api.batch.sensor.issue.internal.DefaultExternalIssue;
+import org.sonar.api.batch.sensor.issue.internal.DefaultIssue;
import org.sonar.api.batch.sensor.measure.Measure;
import org.sonar.api.batch.sensor.measure.NewMeasure;
+import org.sonar.api.batch.sensor.measure.internal.DefaultMeasure;
import org.sonar.api.batch.sensor.rule.AdHocRule;
import org.sonar.api.batch.sensor.rule.NewAdHocRule;
+import org.sonar.api.batch.sensor.rule.internal.DefaultAdHocRule;
import org.sonar.api.batch.sensor.symbol.NewSymbolTable;
+import org.sonar.api.batch.sensor.symbol.internal.DefaultSymbolTable;
import org.sonar.api.config.Configuration;
import org.sonar.api.config.Settings;
-import org.sonar.api.impl.config.ConfigurationBridge;
-import org.sonar.api.impl.config.MapSettings;
-import org.sonar.api.impl.fs.DefaultFileSystem;
-import org.sonar.api.impl.fs.DefaultInputFile;
-import org.sonar.api.impl.fs.DefaultInputModule;
-import org.sonar.api.impl.fs.DefaultInputProject;
-import org.sonar.api.impl.fs.DefaultTextPointer;
-import org.sonar.api.impl.issue.DefaultIssue;
-import org.sonar.api.impl.rule.ActiveRulesBuilder;
-import org.sonar.api.impl.context.MetadataLoader;
-import org.sonar.api.impl.context.SonarRuntimeImpl;
+import org.sonar.api.config.internal.ConfigurationBridge;
+import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.internal.MetadataLoader;
+import org.sonar.api.internal.SonarRuntimeImpl;
import org.sonar.api.measures.Metric;
import org.sonar.api.scanner.fs.InputProject;
import org.sonar.api.utils.System2;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/package-info.java
index 632005ca779..ff282eb2229 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/package-info.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/internal/package-info.java
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@ParametersAreNonnullByDefault
-package org.sonar.api.impl.context;
+package org.sonar.api.batch.sensor.internal;
import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/AbstractDefaultIssue.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/AbstractDefaultIssue.java
index 8705bf2fda0..700b520f448 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/AbstractDefaultIssue.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/AbstractDefaultIssue.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.issue;
+package org.sonar.api.batch.sensor.issue.internal;
import java.nio.file.Path;
import java.util.ArrayList;
@@ -31,10 +31,10 @@ import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.batch.sensor.issue.Issue.Flow;
import org.sonar.api.batch.sensor.issue.IssueLocation;
import org.sonar.api.batch.sensor.issue.NewIssueLocation;
-import org.sonar.api.impl.fs.DefaultInputDir;
-import org.sonar.api.impl.fs.DefaultInputModule;
-import org.sonar.api.impl.fs.DefaultInputProject;
-import org.sonar.api.impl.sensor.DefaultStorable;
+import org.sonar.api.batch.fs.internal.DefaultInputDir;
+import org.sonar.api.batch.fs.internal.DefaultInputModule;
+import org.sonar.api.batch.fs.internal.DefaultInputProject;
+import org.sonar.api.batch.sensor.internal.DefaultStorable;
import org.sonar.api.utils.PathUtils;
import static java.util.Collections.unmodifiableList;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultExternalIssue.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssue.java
index ae17adbaca6..7b7a3a87794 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultExternalIssue.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssue.java
@@ -17,15 +17,14 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.issue.internal;
import javax.annotation.Nullable;
import org.sonar.api.batch.rule.Severity;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.batch.sensor.issue.ExternalIssue;
import org.sonar.api.batch.sensor.issue.NewExternalIssue;
-import org.sonar.api.impl.fs.DefaultInputProject;
-import org.sonar.api.impl.issue.AbstractDefaultIssue;
+import org.sonar.api.batch.fs.internal.DefaultInputProject;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rules.RuleType;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/DefaultIssue.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssue.java
index aebe8f90a61..142c3e096b3 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/DefaultIssue.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssue.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.issue;
+package org.sonar.api.batch.sensor.issue.internal;
import javax.annotation.Nullable;
import org.sonar.api.batch.rule.Severity;
@@ -25,7 +25,7 @@ import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.batch.sensor.issue.Issue;
import org.sonar.api.batch.sensor.issue.IssueLocation;
import org.sonar.api.batch.sensor.issue.NewIssue;
-import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.batch.fs.internal.DefaultInputProject;
import org.sonar.api.rule.RuleKey;
import static java.lang.String.format;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/DefaultIssueLocation.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssueLocation.java
index 6b2329c81c2..970b38b779b 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/DefaultIssueLocation.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssueLocation.java
@@ -17,14 +17,14 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.issue;
+package org.sonar.api.batch.sensor.issue.internal;
import javax.annotation.Nullable;
import org.sonar.api.batch.fs.InputComponent;
import org.sonar.api.batch.fs.TextRange;
import org.sonar.api.batch.sensor.issue.IssueLocation;
import org.sonar.api.batch.sensor.issue.NewIssueLocation;
-import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.batch.fs.internal.DefaultInputFile;
import static java.util.Objects.requireNonNull;
import static org.apache.commons.lang.StringUtils.abbreviate;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/DefaultNoSonarFilter.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultNoSonarFilter.java
index 3bef1e9e5ef..bace869aaa0 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/DefaultNoSonarFilter.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultNoSonarFilter.java
@@ -17,12 +17,12 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.issue;
+package org.sonar.api.batch.sensor.issue.internal;
import java.util.Set;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.issue.NoSonarFilter;
-import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.batch.fs.internal.DefaultInputFile;
public class DefaultNoSonarFilter extends NoSonarFilter {
public NoSonarFilter noSonarInFile(InputFile inputFile, Set<Integer> noSonarLines) {
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/package-info.java
new file mode 100644
index 00000000000..3abee25b386
--- /dev/null
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2019 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+@ParametersAreNonnullByDefault
+package org.sonar.api.batch.sensor.issue.internal;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultMeasure.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/measure/internal/DefaultMeasure.java
index d2919aba182..b359e2d20cd 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultMeasure.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/measure/internal/DefaultMeasure.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.measure.internal;
import java.io.Serializable;
import javax.annotation.Nullable;
@@ -25,6 +25,7 @@ import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.sonar.api.batch.fs.InputComponent;
import org.sonar.api.batch.measure.Metric;
+import org.sonar.api.batch.sensor.internal.DefaultStorable;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.batch.sensor.measure.Measure;
import org.sonar.api.batch.sensor.measure.NewMeasure;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/measure/internal/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/measure/internal/package-info.java
new file mode 100644
index 00000000000..5f4790b9316
--- /dev/null
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/measure/internal/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2019 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+@ParametersAreNonnullByDefault
+package org.sonar.api.batch.sensor.measure.internal;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultAdHocRule.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRule.java
index 1513fa2f695..7ccf8aef768 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultAdHocRule.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRule.java
@@ -17,11 +17,12 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.rule.internal;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
import org.sonar.api.batch.rule.Severity;
+import org.sonar.api.batch.sensor.internal.DefaultStorable;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.batch.sensor.rule.AdHocRule;
import org.sonar.api.batch.sensor.rule.NewAdHocRule;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/rule/internal/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/rule/internal/package-info.java
new file mode 100644
index 00000000000..26995ef0fc0
--- /dev/null
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/rule/internal/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2019 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+@javax.annotation.ParametersAreNonnullByDefault
+package org.sonar.api.batch.sensor.rule.internal;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultSymbolTable.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/symbol/internal/DefaultSymbolTable.java
index 73ec86450a5..087681a5aa8 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultSymbolTable.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/symbol/internal/DefaultSymbolTable.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.symbol.internal;
import java.util.Collection;
import java.util.LinkedHashMap;
@@ -26,10 +26,11 @@ import java.util.Set;
import java.util.TreeSet;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.TextRange;
+import org.sonar.api.batch.fs.internal.DefaultInputFile;
+import org.sonar.api.batch.sensor.internal.DefaultStorable;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.batch.sensor.symbol.NewSymbol;
import org.sonar.api.batch.sensor.symbol.NewSymbolTable;
-import org.sonar.api.impl.fs.DefaultInputFile;
import static java.util.Objects.requireNonNull;
import static org.sonar.api.utils.Preconditions.checkArgument;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/symbol/internal/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/symbol/internal/package-info.java
new file mode 100644
index 00000000000..e8dcd39cf6c
--- /dev/null
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/symbol/internal/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2019 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+@javax.annotation.ParametersAreNonnullByDefault
+package org.sonar.api.batch.sensor.symbol.internal;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/ConfigurationBridge.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/config/internal/ConfigurationBridge.java
index fea9800f3a8..5455cf03191 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/ConfigurationBridge.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/config/internal/ConfigurationBridge.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.config;
+package org.sonar.api.config.internal;
import java.util.Optional;
import org.sonar.api.config.Settings;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/MapSettings.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/config/internal/MapSettings.java
index 61ac6013c3f..5d07d607923 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/MapSettings.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/config/internal/MapSettings.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.config;
+package org.sonar.api.config.internal;
import java.util.HashMap;
import java.util.Map;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/MultivalueProperty.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/config/internal/MultivalueProperty.java
index 3d7d9f009c7..dab98c55781 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/MultivalueProperty.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/config/internal/MultivalueProperty.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.config;
+package org.sonar.api.config.internal;
import java.io.IOException;
import java.io.StringReader;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/config/internal/package-info.java
index bcccfddddd4..f6774798046 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/package-info.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/config/internal/package-info.java
@@ -18,6 +18,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@ParametersAreNonnullByDefault
-package org.sonar.api.impl.config;
+package org.sonar.api.config.internal;
import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultNewRepository.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultNewRepository.java
index 9fe35843b8c..823828dc9d0 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultNewRepository.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultNewRepository.java
@@ -30,14 +30,14 @@ import org.sonar.api.server.rule.RulesDefinition;
import static org.sonar.api.utils.Preconditions.checkArgument;
public class DefaultNewRepository implements RulesDefinition.NewRepository {
- private final RuleDefinitionContext context;
+ private final RulesDefinitionContext context;
private final String key;
private final boolean isExternal;
private final String language;
private String name;
private final Map<String, RulesDefinition.NewRule> newRules = new HashMap<>();
- DefaultNewRepository(RuleDefinitionContext context, String key, String language, boolean isExternal) {
+ DefaultNewRepository(RulesDefinitionContext context, String key, String language, boolean isExternal) {
this.context = context;
this.key = key;
this.name = key;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/RuleDefinitionContext.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/RulesDefinitionContext.java
index 7d47fc25258..849f5981962 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/RuleDefinitionContext.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/RulesDefinitionContext.java
@@ -32,7 +32,7 @@ import static java.util.Collections.emptyList;
import static java.util.Collections.unmodifiableList;
import static org.sonar.api.utils.Preconditions.checkState;
-public class RuleDefinitionContext extends RulesDefinition.Context {
+public class RulesDefinitionContext extends RulesDefinition.Context {
private final Map<String, RulesDefinition.Repository> repositoriesByKey = new HashMap<>();
private String currentPluginKey;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/MetadataLoader.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/internal/MetadataLoader.java
index 575fc472592..d50c429c31f 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/MetadataLoader.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/internal/MetadataLoader.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.context;
+package org.sonar.api.internal;
import java.io.IOException;
import java.net.URL;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/PluginContextImpl.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/internal/PluginContextImpl.java
index 211e5cedbc2..3fccb4c59cc 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/PluginContextImpl.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/internal/PluginContextImpl.java
@@ -17,12 +17,12 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.context;
+package org.sonar.api.internal;
import org.sonar.api.Plugin;
import org.sonar.api.SonarRuntime;
import org.sonar.api.config.Configuration;
-import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.config.internal.MapSettings;
/**
* Implementation of {@link Plugin.Context} that plugins could use in their unit tests.
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/SonarRuntimeImpl.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/internal/SonarRuntimeImpl.java
index 4e4074efdbb..3f69f36bb4e 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/SonarRuntimeImpl.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/internal/SonarRuntimeImpl.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.context;
+package org.sonar.api.internal;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/internal/package-info.java
index 10a797893e5..17dc1220665 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/package-info.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/internal/package-info.java
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@ParametersAreNonnullByDefault
-package org.sonar.api.impl.fs;
+package org.sonar.api.internal;
import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/charhandler/IntArrayListTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/charhandler/IntArrayListTest.java
index 50c37d8a565..c0b505a1e66 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/charhandler/IntArrayListTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/charhandler/IntArrayListTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.charhandler;
+package org.sonar.api.batch.fs.internal.charhandler;
import org.junit.Test;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultFileSystemTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/DefaultFileSystemTest.java
index 552387c70e6..8038cbad3ba 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultFileSystemTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/DefaultFileSystemTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal.fs;
import java.io.File;
import java.nio.charset.Charset;
@@ -26,7 +26,8 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
-import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.batch.fs.internal.DefaultFileSystem;
+import org.sonar.api.batch.fs.internal.TestInputFileBuilder;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputDirTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/DefaultInputDirTest.java
index 263032b33f2..531f611bf0e 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputDirTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/DefaultInputDirTest.java
@@ -17,12 +17,13 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal.fs;
import java.io.File;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
+import org.sonar.api.batch.fs.internal.DefaultInputDir;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputFileTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/DefaultInputFileTest.java
index 7e22203de37..63f6b5fb540 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputFileTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/DefaultInputFileTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal.fs;
import java.io.BufferedReader;
import java.io.BufferedWriter;
@@ -40,6 +40,11 @@ import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.TextRange;
+import org.sonar.api.batch.fs.internal.DefaultIndexedFile;
+import org.sonar.api.batch.fs.internal.DefaultInputFile;
+import org.sonar.api.batch.fs.internal.FileMetadata;
+import org.sonar.api.batch.fs.internal.Metadata;
+import org.sonar.api.batch.fs.internal.SensorStrategy;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputModuleTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/DefaultInputModuleTest.java
index ac1a2c40417..34668620e57 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputModuleTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/DefaultInputModuleTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal.fs;
import java.io.File;
import java.io.IOException;
@@ -28,6 +28,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
+import org.sonar.api.batch.fs.internal.DefaultInputModule;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputProjectTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/DefaultInputProjectTest.java
index bd3f4939af0..71a4b9cb739 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputProjectTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/DefaultInputProjectTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal.fs;
import java.io.File;
import java.io.IOException;
@@ -27,6 +27,8 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
+import org.sonar.api.batch.fs.internal.AbstractProjectOrModule;
+import org.sonar.api.batch.fs.internal.DefaultInputProject;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/FileMetadataTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/FileMetadataTest.java
index 0f3f1d5965e..b5f7728faf2 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/FileMetadataTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/FileMetadataTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal.fs;
import java.io.File;
import java.io.FileInputStream;
@@ -30,6 +30,10 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
+import org.sonar.api.batch.fs.internal.DefaultInputFile;
+import org.sonar.api.batch.fs.internal.FileMetadata;
+import org.sonar.api.batch.fs.internal.Metadata;
+import org.sonar.api.batch.fs.internal.TestInputFileBuilder;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/MetadataTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/MetadataTest.java
index 49ecf8984d6..246aeec0543 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/MetadataTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/MetadataTest.java
@@ -17,17 +17,17 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal.fs;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
-import org.sonar.api.impl.fs.Metadata;
+import org.sonar.api.batch.fs.internal.Metadata;
public class MetadataTest {
@Test
public void testRoundtrip() {
- org.sonar.api.impl.fs.Metadata metadata = new Metadata(10, 20, "hash", new int[] {1, 3}, new int[] {2, 4}, 5);
+ Metadata metadata = new Metadata(10, 20, "hash", new int[] {1, 3}, new int[] {2, 4}, 5);
assertThat(metadata.isEmpty()).isFalse();
assertThat(metadata.lines()).isEqualTo(10);
assertThat(metadata.nonBlankLines()).isEqualTo(20);
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/PathPatternTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/PathPatternTest.java
index c214469f081..312e908a700 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/PathPatternTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/PathPatternTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal.fs;
import java.io.IOException;
import java.nio.file.Path;
@@ -27,8 +27,8 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.fs.IndexedFile;
-import org.sonar.api.impl.fs.DefaultIndexedFile;
-import org.sonar.api.impl.fs.PathPattern;
+import org.sonar.api.batch.fs.internal.DefaultIndexedFile;
+import org.sonar.api.batch.fs.internal.PathPattern;
import static org.assertj.core.api.Assertions.assertThat;
@@ -44,7 +44,7 @@ public class PathPatternTest {
@Test
public void match_relative_path() {
- org.sonar.api.impl.fs.PathPattern pattern = org.sonar.api.impl.fs.PathPattern.create("**/*Foo.java");
+ PathPattern pattern = PathPattern.create("**/*Foo.java");
assertThat(pattern.toString()).isEqualTo("**/*Foo.java");
IndexedFile indexedFile = new DefaultIndexedFile("ABCDE", baseDir, "src/main/java/org/MyFoo.java", null);
@@ -60,7 +60,7 @@ public class PathPatternTest {
@Test
public void match_relative_path_and_insensitive_file_extension() throws Exception {
- org.sonar.api.impl.fs.PathPattern pattern = org.sonar.api.impl.fs.PathPattern.create("**/*Foo.java");
+ PathPattern pattern = PathPattern.create("**/*Foo.java");
IndexedFile indexedFile = new DefaultIndexedFile("ABCDE", baseDir, "src/main/java/org/MyFoo.JAVA", null);
assertThat(pattern.match(indexedFile.path(), Paths.get(indexedFile.relativePath()), false)).isTrue();
@@ -71,7 +71,7 @@ public class PathPatternTest {
@Test
public void match_absolute_path() throws Exception {
- org.sonar.api.impl.fs.PathPattern pattern = org.sonar.api.impl.fs.PathPattern.create("file:**/src/main/**Foo.java");
+ PathPattern pattern = PathPattern.create("file:**/src/main/**Foo.java");
assertThat(pattern.toString()).isEqualTo("file:**/src/main/**Foo.java");
IndexedFile indexedFile = new DefaultIndexedFile("ABCDE", baseDir, "src/main/java/org/MyFoo.java", null);
@@ -87,7 +87,7 @@ public class PathPatternTest {
@Test
public void match_absolute_path_and_insensitive_file_extension() throws Exception {
- org.sonar.api.impl.fs.PathPattern pattern = org.sonar.api.impl.fs.PathPattern.create("file:**/src/main/**Foo.java");
+ PathPattern pattern = PathPattern.create("file:**/src/main/**Foo.java");
assertThat(pattern.toString()).isEqualTo("file:**/src/main/**Foo.java");
IndexedFile indexedFile = new DefaultIndexedFile("ABCDE", baseDir, "src/main/java/org/MyFoo.JAVA", null);
@@ -99,7 +99,7 @@ public class PathPatternTest {
@Test
public void create_array_of_patterns() {
- org.sonar.api.impl.fs.PathPattern[] patterns = PathPattern.create(new String[] {
+ PathPattern[] patterns = PathPattern.create(new String[] {
"**/src/main/**Foo.java",
"file:**/src/main/**Bar.java"
});
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/TestInputFileBuilderTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/TestInputFileBuilderTest.java
index 4fb37a2fd77..bd6c6da1d81 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/TestInputFileBuilderTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/fs/TestInputFileBuilderTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs;
+package org.sonar.api.batch.fs.internal.fs;
import java.io.File;
import java.io.IOException;
@@ -28,6 +28,9 @@ import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.fs.InputFile.Status;
import org.sonar.api.batch.fs.InputFile.Type;
+import org.sonar.api.batch.fs.internal.AbstractProjectOrModule;
+import org.sonar.api.batch.fs.internal.DefaultInputFile;
+import org.sonar.api.batch.fs.internal.TestInputFileBuilder;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/AndPredicateTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/predicates/AndPredicateTest.java
index e02d5e433f4..b58d1cd4a26 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/AndPredicateTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/predicates/AndPredicateTest.java
@@ -17,15 +17,15 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import java.util.Arrays;
import org.junit.Test;
import org.sonar.api.batch.fs.FilePredicate;
import org.sonar.api.batch.fs.FileSystem;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.api.impl.fs.PathPattern;
-import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.batch.fs.internal.PathPattern;
+import org.sonar.api.batch.fs.internal.TestInputFileBuilder;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/DefaultFilePredicatesTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/predicates/DefaultFilePredicatesTest.java
index 6d9cd4eafed..e47bd8abf1f 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/DefaultFilePredicatesTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/predicates/DefaultFilePredicatesTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import java.io.File;
import java.io.IOException;
@@ -33,7 +33,7 @@ import org.sonar.api.batch.fs.FilePredicate;
import org.sonar.api.batch.fs.FilePredicates;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.InputFile.Status;
-import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.batch.fs.internal.TestInputFileBuilder;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/FileExtensionPredicateTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/predicates/FileExtensionPredicateTest.java
index 0f60f6bc36d..a8edf896800 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/FileExtensionPredicateTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/predicates/FileExtensionPredicateTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import java.io.IOException;
import org.junit.Test;
@@ -26,7 +26,7 @@ import org.sonar.api.batch.fs.InputFile;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-import static org.sonar.api.impl.fs.predicates.FileExtensionPredicate.getExtension;
+import static org.sonar.api.batch.fs.internal.predicates.FileExtensionPredicate.getExtension;
public class FileExtensionPredicateTest {
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/FilenamePredicateTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/predicates/FilenamePredicateTest.java
index 052ff51c015..2ec9b1b44b6 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/FilenamePredicateTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/predicates/FilenamePredicateTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import java.io.IOException;
import java.util.Collections;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/OrPredicateTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/predicates/OrPredicateTest.java
index 489d6366543..4a22fdd906a 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/OrPredicateTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/predicates/OrPredicateTest.java
@@ -17,13 +17,13 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import org.junit.Test;
import org.sonar.api.batch.fs.FilePredicate;
import java.util.Arrays;
-import org.sonar.api.impl.fs.PathPattern;
+import org.sonar.api.batch.fs.internal.PathPattern;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/RelativePathPredicateTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/predicates/RelativePathPredicateTest.java
index e7e2efd9571..9dda6bf6c81 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/RelativePathPredicateTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/fs/internal/predicates/RelativePathPredicateTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.fs.predicates;
+package org.sonar.api.batch.fs.internal.predicates;
import org.junit.Test;
import org.sonar.api.batch.fs.InputFile;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/rule/DefaultRulesTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/rule/internal/DefaultRulesTest.java
index c55551687b9..4c3fddeb4b7 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/rule/DefaultRulesTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/rule/internal/DefaultRulesTest.java
@@ -17,13 +17,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.rule;
+package org.sonar.api.batch.rule.internal;
import java.util.LinkedList;
import java.util.List;
import org.junit.Test;
-import org.sonar.api.batch.rule.NewRule;
-import org.sonar.api.impl.rule.DefaultRules;
import org.sonar.api.rule.RuleKey;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/rule/internal/NewActiveRuleTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/rule/internal/NewActiveRuleTest.java
new file mode 100644
index 00000000000..1485265ed17
--- /dev/null
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/rule/internal/NewActiveRuleTest.java
@@ -0,0 +1,88 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2019 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.api.batch.rule.internal;
+
+import com.google.common.collect.ImmutableMap;
+import org.junit.Before;
+import org.junit.Test;
+import org.sonar.api.batch.rule.internal.NewActiveRule;
+import org.sonar.api.rule.RuleKey;
+import org.sonar.api.rule.Severity;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class NewActiveRuleTest {
+
+ private NewActiveRule.Builder builder;
+
+ @Before
+ public void setBuilder() {
+ builder = new NewActiveRule.Builder();
+ }
+
+ @Test
+ public void builder_should_set_every_param() {
+ NewActiveRule rule = builder
+ .setRuleKey(RuleKey.of("foo", "bar"))
+ .setName("name")
+ .setSeverity(org.sonar.api.rule.Severity.CRITICAL)
+ .setParam("key", "value")
+ .setCreatedAt(1_000L)
+ .setUpdatedAt(1_000L)
+ .setInternalKey("internal_key")
+ .setLanguage("language")
+ .setTemplateRuleKey("templateRuleKey")
+ .setQProfileKey("qProfileKey")
+ .build();
+
+ assertThat(rule.ruleKey).isEqualTo(RuleKey.of("foo", "bar"));
+ assertThat(rule.name).isEqualTo("name");
+ assertThat(rule.severity).isEqualTo(org.sonar.api.rule.Severity.CRITICAL);
+ assertThat(rule.params).isEqualTo(ImmutableMap.of("key", "value"));
+ assertThat(rule.createdAt).isEqualTo(1_000L);
+ assertThat(rule.updatedAt).isEqualTo(1_000L);
+ assertThat(rule.internalKey).isEqualTo("internal_key");
+ assertThat(rule.language).isEqualTo("language");
+ assertThat(rule.templateRuleKey).isEqualTo("templateRuleKey");
+ assertThat(rule.qProfileKey).isEqualTo("qProfileKey");
+ }
+
+ @Test
+ public void severity_should_have_default_value() {
+ NewActiveRule rule = builder.build();
+ assertThat(rule.severity).isEqualTo(Severity.defaultSeverity());
+ }
+
+ @Test
+ public void params_should_be_empty_map_if_no_params() {
+ NewActiveRule rule = builder.build();
+ assertThat(rule.params).isEqualTo(ImmutableMap.of());
+ }
+
+ @Test
+ public void set_param_remove_param_if_value_is_null() {
+ NewActiveRule rule = builder
+ .setParam("foo", "bar")
+ .setParam("removed", "value")
+ .setParam("removed", null)
+ .build();
+ assertThat(rule.params).isEqualTo(ImmutableMap.of("foo", "bar"));
+ }
+}
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/rule/RulesBuilderTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/rule/internal/RulesBuilderTest.java
index 1330f906502..8cb59a82047 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/rule/RulesBuilderTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/rule/internal/RulesBuilderTest.java
@@ -17,14 +17,12 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.rule;
+package org.sonar.api.batch.rule.internal;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.batch.rule.NewRule;
import org.sonar.api.batch.rule.Rule;
import org.sonar.api.batch.rule.Rules;
-import org.sonar.api.impl.rule.RulesBuilder;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rule.RuleStatus;
import org.sonar.api.rule.Severity;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultSignificantCodeTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/code/internal/DefaultSignificantCodeTest.java
index f6d7f45281e..ca84d64c341 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultSignificantCodeTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/code/internal/DefaultSignificantCodeTest.java
@@ -17,14 +17,15 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.code.internal;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.batch.fs.InputFile;
+import org.sonar.api.batch.sensor.code.internal.DefaultSignificantCode;
import org.sonar.api.batch.sensor.internal.SensorStorage;
-import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.batch.fs.internal.TestInputFileBuilder;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultCpdTokensTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/cpd/internal/DefaultCpdTokensTest.java
index fd2c60de2d1..861c10ab147 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultCpdTokensTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/cpd/internal/DefaultCpdTokensTest.java
@@ -17,13 +17,14 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.cpd.internal;
import org.junit.Test;
import org.sonar.api.batch.fs.InputFile;
+import org.sonar.api.batch.sensor.cpd.internal.DefaultCpdTokens;
import org.sonar.api.batch.sensor.internal.SensorStorage;
-import org.sonar.api.impl.fs.DefaultInputFile;
-import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.batch.fs.internal.DefaultInputFile;
+import org.sonar.api.batch.fs.internal.TestInputFileBuilder;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultAnalysisErrorTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/error/internal/DefaultAnalysisErrorTest.java
index 9f6be9d2d9f..2b13f62fb90 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultAnalysisErrorTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/error/internal/DefaultAnalysisErrorTest.java
@@ -17,24 +17,22 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.error.internal;
+import org.assertj.core.api.Assertions;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.mockito.Mockito;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.TextPointer;
+import org.sonar.api.batch.fs.internal.DefaultTextPointer;
+import org.sonar.api.batch.fs.internal.TestInputFileBuilder;
import org.sonar.api.batch.sensor.error.NewAnalysisError;
import org.sonar.api.batch.sensor.internal.SensorStorage;
-import org.sonar.api.impl.fs.DefaultTextPointer;
-import org.sonar.api.impl.fs.TestInputFileBuilder;
-import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
public class DefaultAnalysisErrorTest {
private InputFile inputFile;
@@ -48,7 +46,7 @@ public class DefaultAnalysisErrorTest {
public void setUp() {
inputFile = new TestInputFileBuilder("module1", "src/File.java").build();
textPointer = new DefaultTextPointer(5, 2);
- storage = mock(SensorStorage.class);
+ storage = Mockito.mock(SensorStorage.class);
}
@Test
@@ -58,9 +56,9 @@ public class DefaultAnalysisErrorTest {
.at(textPointer)
.message("msg");
- assertThat(analysisError.location()).isEqualTo(textPointer);
- assertThat(analysisError.message()).isEqualTo("msg");
- assertThat(analysisError.inputFile()).isEqualTo(inputFile);
+ Assertions.assertThat(analysisError.location()).isEqualTo(textPointer);
+ Assertions.assertThat(analysisError.message()).isEqualTo("msg");
+ Assertions.assertThat(analysisError.inputFile()).isEqualTo(inputFile);
}
@Test
@@ -68,8 +66,8 @@ public class DefaultAnalysisErrorTest {
DefaultAnalysisError analysisError = new DefaultAnalysisError(storage);
analysisError.onFile(inputFile).save();
- verify(storage).store(analysisError);
- verifyNoMoreInteractions(storage);
+ Mockito.verify(storage).store(analysisError);
+ Mockito.verifyNoMoreInteractions(storage);
}
@Test
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultHighlightingTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlightingTest.java
index 99beb98927d..d4dba0959c0 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultHighlightingTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlightingTest.java
@@ -17,22 +17,22 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.highlighting.internal;
import java.util.Collection;
+import org.assertj.core.api.Assertions;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.mockito.Mockito;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.TextRange;
+import org.sonar.api.batch.fs.internal.DefaultTextPointer;
+import org.sonar.api.batch.fs.internal.DefaultTextRange;
+import org.sonar.api.batch.fs.internal.TestInputFileBuilder;
import org.sonar.api.batch.sensor.internal.SensorStorage;
-import org.sonar.api.impl.fs.DefaultTextPointer;
-import org.sonar.api.impl.fs.DefaultTextRange;
-import org.sonar.api.impl.fs.TestInputFileBuilder;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.mock;
import static org.sonar.api.batch.sensor.highlighting.TypeOfText.COMMENT;
import static org.sonar.api.batch.sensor.highlighting.TypeOfText.CPP_DOC;
import static org.sonar.api.batch.sensor.highlighting.TypeOfText.KEYWORD;
@@ -54,7 +54,7 @@ public class DefaultHighlightingTest {
@Before
public void setUpSampleRules() {
- DefaultHighlighting highlightingDataBuilder = new DefaultHighlighting(mock(SensorStorage.class))
+ DefaultHighlighting highlightingDataBuilder = new DefaultHighlighting(Mockito.mock(SensorStorage.class))
.onFile(INPUT_FILE)
.highlight(0, 10, COMMENT)
.highlight(1, 10, 1, 12, KEYWORD)
@@ -70,7 +70,7 @@ public class DefaultHighlightingTest {
@Test
public void should_register_highlighting_rule() {
- assertThat(highlightingRules).hasSize(6);
+ Assertions.assertThat(highlightingRules).hasSize(6);
}
private static TextRange rangeOf(int startLine, int startOffset, int endLine, int endOffset) {
@@ -79,19 +79,19 @@ public class DefaultHighlightingTest {
@Test
public void should_order_by_start_then_end_offset() {
- assertThat(highlightingRules).extracting("range", TextRange.class).containsExactly(
+ Assertions.assertThat(highlightingRules).extracting("range", TextRange.class).containsExactly(
rangeOf(1, 0, 1, 10),
rangeOf(1, 10, 1, 12),
rangeOf(1, 12, 1, 20),
rangeOf(1, 24, 2, 15),
rangeOf(1, 24, 1, 38),
rangeOf(1, 42, 2, 0));
- assertThat(highlightingRules).extracting("textType").containsExactly(COMMENT, KEYWORD, COMMENT, CPP_DOC, KEYWORD, KEYWORD);
+ Assertions.assertThat(highlightingRules).extracting("textType").containsExactly(COMMENT, KEYWORD, COMMENT, CPP_DOC, KEYWORD, KEYWORD);
}
@Test
public void should_support_overlapping() {
- new DefaultHighlighting(mock(SensorStorage.class))
+ new DefaultHighlighting(Mockito.mock(SensorStorage.class))
.onFile(INPUT_FILE)
.highlight(0, 15, KEYWORD)
.highlight(8, 12, CPP_DOC)
@@ -104,7 +104,7 @@ public class DefaultHighlightingTest {
throwable
.expectMessage("Unable to highlight file");
- new DefaultHighlighting(mock(SensorStorage.class))
+ new DefaultHighlighting(Mockito.mock(SensorStorage.class))
.onFile(INPUT_FILE)
.highlight(10, 10, KEYWORD)
.save();
@@ -116,7 +116,7 @@ public class DefaultHighlightingTest {
throwable
.expectMessage("Cannot register highlighting rule for characters at Range[from [line=1, lineOffset=8] to [line=1, lineOffset=15]] as it overlaps at least one existing rule");
- new DefaultHighlighting(mock(SensorStorage.class))
+ new DefaultHighlighting(Mockito.mock(SensorStorage.class))
.onFile(INPUT_FILE)
.highlight(0, 10, KEYWORD)
.highlight(8, 15, KEYWORD)
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultSensorDescriptorTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/internal/DefaultSensorDescriptorTest.java
index b09b5ed9eab..25a1088e049 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultSensorDescriptorTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/internal/DefaultSensorDescriptorTest.java
@@ -17,11 +17,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.internal;
import org.junit.Test;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.config.internal.MapSettings;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/InMemorySensorStorageTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/internal/InMemorySensorStorageTest.java
index 25b44f5cfbb..fe3ce4153cd 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/InMemorySensorStorageTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/internal/InMemorySensorStorageTest.java
@@ -17,12 +17,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.internal;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.impl.sensor.InMemorySensorStorage;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.data.MapEntry.entry;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/SensorContextTesterTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/internal/SensorContextTesterTest.java
index 9684c7cdcb2..f9de1dc32de 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/SensorContextTesterTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/internal/SensorContextTesterTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.internal;
import java.io.File;
import java.io.IOException;
@@ -29,8 +29,8 @@ import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.rule.ActiveRules;
-import org.sonar.api.impl.rule.ActiveRulesBuilder;
-import org.sonar.api.batch.rule.NewActiveRule;
+import org.sonar.api.batch.rule.internal.ActiveRulesBuilder;
+import org.sonar.api.batch.rule.internal.NewActiveRule;
import org.sonar.api.batch.rule.Severity;
import org.sonar.api.batch.sensor.error.AnalysisError;
import org.sonar.api.batch.sensor.error.NewAnalysisError;
@@ -39,12 +39,12 @@ import org.sonar.api.batch.sensor.issue.NewExternalIssue;
import org.sonar.api.batch.sensor.issue.NewIssue;
import org.sonar.api.batch.sensor.symbol.NewSymbolTable;
import org.sonar.api.config.Settings;
-import org.sonar.api.impl.config.MapSettings;
-import org.sonar.api.impl.fs.DefaultFileSystem;
-import org.sonar.api.impl.fs.DefaultInputFile;
-import org.sonar.api.impl.fs.DefaultInputModule;
-import org.sonar.api.impl.fs.DefaultTextPointer;
-import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.batch.fs.internal.DefaultFileSystem;
+import org.sonar.api.batch.fs.internal.DefaultInputFile;
+import org.sonar.api.batch.fs.internal.DefaultInputModule;
+import org.sonar.api.batch.fs.internal.DefaultTextPointer;
+import org.sonar.api.batch.fs.internal.TestInputFileBuilder;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rules.RuleType;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultExternalIssueTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssueTest.java
index 06ff4064f88..bb0658278ab 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultExternalIssueTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssueTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.issue.internal;
import java.io.IOException;
import org.junit.Before;
@@ -29,12 +29,13 @@ import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.batch.fs.InputComponent;
import org.sonar.api.batch.rule.Severity;
import org.sonar.api.batch.sensor.internal.SensorStorage;
+import org.sonar.api.batch.sensor.issue.internal.DefaultExternalIssue;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rules.RuleType;
-import org.sonar.api.impl.fs.DefaultInputFile;
-import org.sonar.api.impl.fs.DefaultInputProject;
-import org.sonar.api.impl.fs.TestInputFileBuilder;
-import org.sonar.api.impl.issue.DefaultIssueLocation;
+import org.sonar.api.batch.fs.internal.DefaultInputFile;
+import org.sonar.api.batch.fs.internal.DefaultInputProject;
+import org.sonar.api.batch.fs.internal.TestInputFileBuilder;
+import org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultIssueLocationTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssueLocationTest.java
index 540a0bbc0c9..2a399c2a577 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultIssueLocationTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssueLocationTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.issue.internal;
import org.apache.commons.lang.StringUtils;
import org.hamcrest.Description;
@@ -27,8 +27,8 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.api.impl.fs.TestInputFileBuilder;
-import org.sonar.api.impl.issue.DefaultIssueLocation;
+import org.sonar.api.batch.fs.internal.TestInputFileBuilder;
+import org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.rules.ExpectedException.none;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultIssueTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssueTest.java
index f88a099f391..b666f4c8c65 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultIssueTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssueTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.issue.internal;
import java.io.File;
import java.io.IOException;
@@ -29,13 +29,13 @@ import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.batch.rule.Severity;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.rule.RuleKey;
-import org.sonar.api.impl.fs.DefaultInputDir;
-import org.sonar.api.impl.fs.DefaultInputFile;
-import org.sonar.api.impl.fs.DefaultInputModule;
-import org.sonar.api.impl.fs.DefaultInputProject;
-import org.sonar.api.impl.fs.TestInputFileBuilder;
-import org.sonar.api.impl.issue.DefaultIssue;
-import org.sonar.api.impl.issue.DefaultIssueLocation;
+import org.sonar.api.batch.fs.internal.DefaultInputDir;
+import org.sonar.api.batch.fs.internal.DefaultInputFile;
+import org.sonar.api.batch.fs.internal.DefaultInputModule;
+import org.sonar.api.batch.fs.internal.DefaultInputProject;
+import org.sonar.api.batch.fs.internal.TestInputFileBuilder;
+import org.sonar.api.batch.sensor.issue.internal.DefaultIssue;
+import org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultMeasureTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/measure/internal/DefaultMeasureTest.java
index 0c7ece260ce..d640242e48c 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultMeasureTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/measure/internal/DefaultMeasureTest.java
@@ -17,23 +17,21 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.measure.internal;
import java.io.IOException;
+import org.assertj.core.api.Assertions;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
+import org.mockito.Mockito;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
+import org.sonar.api.batch.fs.internal.AbstractProjectOrModule;
+import org.sonar.api.batch.fs.internal.DefaultInputProject;
+import org.sonar.api.batch.fs.internal.TestInputFileBuilder;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.measures.CoreMetrics;
-import org.sonar.api.impl.fs.AbstractProjectOrModule;
-import org.sonar.api.impl.fs.DefaultInputProject;
-import org.sonar.api.impl.fs.TestInputFileBuilder;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
public class DefaultMeasureTest {
@@ -45,37 +43,37 @@ public class DefaultMeasureTest {
@Test
public void build_file_measure() {
- SensorStorage storage = mock(SensorStorage.class);
+ SensorStorage storage = Mockito.mock(SensorStorage.class);
DefaultMeasure<Integer> newMeasure = new DefaultMeasure<Integer>(storage)
.forMetric(CoreMetrics.LINES)
.on(new TestInputFileBuilder("foo", "src/Foo.php").build())
.withValue(3);
- assertThat(newMeasure.inputComponent()).isEqualTo(new TestInputFileBuilder("foo", "src/Foo.php").build());
- assertThat(newMeasure.metric()).isEqualTo(CoreMetrics.LINES);
- assertThat(newMeasure.value()).isEqualTo(3);
+ Assertions.assertThat(newMeasure.inputComponent()).isEqualTo(new TestInputFileBuilder("foo", "src/Foo.php").build());
+ Assertions.assertThat(newMeasure.metric()).isEqualTo(CoreMetrics.LINES);
+ Assertions.assertThat(newMeasure.value()).isEqualTo(3);
newMeasure.save();
- verify(storage).store(newMeasure);
+ Mockito.verify(storage).store(newMeasure);
}
@Test
public void build_project_measure() throws IOException {
- SensorStorage storage = mock(SensorStorage.class);
+ SensorStorage storage = Mockito.mock(SensorStorage.class);
AbstractProjectOrModule module = new DefaultInputProject(ProjectDefinition.create().setKey("foo").setBaseDir(temp.newFolder()).setWorkDir(temp.newFolder()));
DefaultMeasure<Integer> newMeasure = new DefaultMeasure<Integer>(storage)
.forMetric(CoreMetrics.LINES)
.on(module)
.withValue(3);
- assertThat(newMeasure.inputComponent()).isEqualTo(module);
- assertThat(newMeasure.metric()).isEqualTo(CoreMetrics.LINES);
- assertThat(newMeasure.value()).isEqualTo(3);
+ Assertions.assertThat(newMeasure.inputComponent()).isEqualTo(module);
+ Assertions.assertThat(newMeasure.metric()).isEqualTo(CoreMetrics.LINES);
+ Assertions.assertThat(newMeasure.value()).isEqualTo(3);
newMeasure.save();
- verify(storage).store(newMeasure);
+ Mockito.verify(storage).store(newMeasure);
}
@Test
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultAdHocRuleTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRuleTest.java
index fd766c2739b..b30593dff13 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultAdHocRuleTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRuleTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.rule.internal;
import org.junit.Rule;
import org.junit.Test;
@@ -25,6 +25,7 @@ import org.junit.rules.ExpectedException;
import org.sonar.api.batch.rule.Severity;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.batch.sensor.rule.NewAdHocRule;
+import org.sonar.api.batch.sensor.rule.internal.DefaultAdHocRule;
import org.sonar.api.rules.RuleType;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultSymbolTableTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/symbol/internal/DefaultSymbolTableTest.java
index affd87bbef4..52ae8d8aa41 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultSymbolTableTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/symbol/internal/DefaultSymbolTableTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.sensor;
+package org.sonar.api.batch.sensor.symbol.internal;
import java.util.Map;
import java.util.Set;
@@ -28,7 +28,7 @@ import org.junit.rules.ExpectedException;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.TextRange;
import org.sonar.api.batch.sensor.internal.SensorStorage;
-import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.batch.fs.internal.TestInputFileBuilder;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/config/MapSettingsTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/config/internal/MapSettingsTest.java
index 922d767dfac..a793aa7db49 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/config/MapSettingsTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/config/internal/MapSettingsTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.config;
+package org.sonar.api.config.internal;
import com.tngtech.java.junit.dataprovider.DataProvider;
import com.tngtech.java.junit.dataprovider.DataProviderRunner;
@@ -28,6 +28,7 @@ import java.util.List;
import java.util.Random;
import java.util.function.BiConsumer;
import java.util.stream.IntStream;
+import org.assertj.core.api.Assertions;
import org.assertj.core.data.Offset;
import org.junit.Before;
import org.junit.Rule;
@@ -40,7 +41,6 @@ import org.sonar.api.PropertyType;
import org.sonar.api.config.PropertyDefinition;
import org.sonar.api.config.PropertyDefinitions;
import org.sonar.api.config.Settings;
-import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.DateUtils;
import static java.util.Collections.singletonList;
@@ -82,7 +82,7 @@ public class MapSettingsTest {
@Test
public void set_throws_NPE_if_key_is_null() {
- org.sonar.api.impl.config.MapSettings underTest = new org.sonar.api.impl.config.MapSettings();
+ MapSettings underTest = new MapSettings();
expectKeyNullNPE();
@@ -91,7 +91,7 @@ public class MapSettingsTest {
@Test
public void set_throws_NPE_if_value_is_null() {
- org.sonar.api.impl.config.MapSettings underTest = new org.sonar.api.impl.config.MapSettings();
+ MapSettings underTest = new MapSettings();
expectedException.expect(NullPointerException.class);
expectedException.expectMessage("value can't be null");
@@ -101,7 +101,7 @@ public class MapSettingsTest {
@Test
public void set_accepts_empty_value_and_trims_it() {
- org.sonar.api.impl.config.MapSettings underTest = new org.sonar.api.impl.config.MapSettings();
+ MapSettings underTest = new MapSettings();
Random random = new Random();
String key = randomAlphanumeric(3);
@@ -112,14 +112,14 @@ public class MapSettingsTest {
@Test
public void default_values_should_be_loaded_from_definitions() {
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
assertThat(settings.getDefaultValue("hello")).isEqualTo("world");
}
@Test
@UseDataProvider("setPropertyCalls")
public void all_setProperty_methods_throws_NPE_if_key_is_null(BiConsumer<Settings, String> setPropertyCaller) {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
expectKeyNullNPE();
@@ -130,7 +130,7 @@ public class MapSettingsTest {
public void set_property_string_throws_NPE_if_key_is_null() {
String key = randomAlphanumeric(3);
- Settings underTest = new org.sonar.api.impl.config.MapSettings(new PropertyDefinitions(singletonList(PropertyDefinition.builder(key).multiValues(true).build())));
+ Settings underTest = new MapSettings(new PropertyDefinitions(singletonList(PropertyDefinition.builder(key).multiValues(true).build())));
expectKeyNullNPE();
@@ -145,7 +145,7 @@ public class MapSettingsTest {
@Test
@UseDataProvider("setPropertyCalls")
public void all_set_property_methods_trims_key(BiConsumer<Settings, String> setPropertyCaller) {
- Settings underTest = new org.sonar.api.impl.config.MapSettings();
+ Settings underTest = new MapSettings();
Random random = new Random();
String blankBefore = blank(random);
@@ -161,7 +161,7 @@ public class MapSettingsTest {
public void set_property_string_array_trims_key() {
String key = randomAlphanumeric(3);
- Settings underTest = new org.sonar.api.impl.config.MapSettings(new PropertyDefinitions(singletonList(PropertyDefinition.builder(key).multiValues(true).build())));
+ Settings underTest = new MapSettings(new PropertyDefinitions(singletonList(PropertyDefinition.builder(key).multiValues(true).build())));
Random random = new Random();
String blankBefore = blank(random);
@@ -194,7 +194,7 @@ public class MapSettingsTest {
@Test
public void setProperty_methods_trims_value() {
- Settings underTest = new org.sonar.api.impl.config.MapSettings();
+ Settings underTest = new MapSettings();
Random random = new Random();
String blankBefore = blank(random);
@@ -209,7 +209,7 @@ public class MapSettingsTest {
@Test
public void set_property_int() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.setProperty("foo", 123);
assertThat(settings.getInt("foo")).isEqualTo(123);
assertThat(settings.getString("foo")).isEqualTo("123");
@@ -218,7 +218,7 @@ public class MapSettingsTest {
@Test
public void default_number_values_are_zero() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
assertThat(settings.getInt("foo")).isEqualTo(0);
assertThat(settings.getLong("foo")).isEqualTo(0L);
}
@@ -227,34 +227,34 @@ public class MapSettingsTest {
public void getInt_value_must_be_valid() {
thrown.expect(NumberFormatException.class);
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.setProperty("foo", "not a number");
settings.getInt("foo");
}
@Test
public void all_values_should_be_trimmed_set_property() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.setProperty("foo", " FOO ");
assertThat(settings.getString("foo")).isEqualTo("FOO");
}
@Test
public void test_get_default_value() {
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
assertThat(settings.getDefaultValue("unknown")).isNull();
}
@Test
public void test_get_string() {
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
settings.setProperty("hello", "Russia");
assertThat(settings.getString("hello")).isEqualTo("Russia");
}
@Test
public void setProperty_date() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
Date date = DateUtils.parseDateTime("2010-05-18T15:50:45+0100");
settings.setProperty("aDate", date);
settings.setProperty("aDateTime", date, true);
@@ -265,7 +265,7 @@ public class MapSettingsTest {
@Test
public void test_get_date() {
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
assertThat(settings.getDate("unknown")).isNull();
assertThat(settings.getDate("date").getDate()).isEqualTo(18);
assertThat(settings.getDate("date").getMonth()).isEqualTo(4);
@@ -273,13 +273,13 @@ public class MapSettingsTest {
@Test
public void test_get_date_not_found() {
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
assertThat(settings.getDate("unknown")).isNull();
}
@Test
public void test_get_datetime() {
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
assertThat(settings.getDateTime("unknown")).isNull();
assertThat(settings.getDateTime("datetime").getDate()).isEqualTo(18);
assertThat(settings.getDateTime("datetime").getMonth()).isEqualTo(4);
@@ -288,7 +288,7 @@ public class MapSettingsTest {
@Test
public void test_get_double() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.setProperty("from_double", 3.14159);
settings.setProperty("from_string", "3.14159");
assertThat(settings.getDouble("from_double")).isEqualTo(3.14159, Offset.offset(0.00001));
@@ -298,7 +298,7 @@ public class MapSettingsTest {
@Test
public void test_get_float() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.setProperty("from_float", 3.14159f);
settings.setProperty("from_string", "3.14159");
assertThat(settings.getDouble("from_float")).isEqualTo(3.14159f, Offset.offset(0.00001));
@@ -308,7 +308,7 @@ public class MapSettingsTest {
@Test
public void test_get_bad_float() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.setProperty("foo", "bar");
thrown.expect(IllegalStateException.class);
@@ -318,7 +318,7 @@ public class MapSettingsTest {
@Test
public void test_get_bad_double() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.setProperty("foo", "bar");
thrown.expect(IllegalStateException.class);
@@ -328,28 +328,28 @@ public class MapSettingsTest {
@Test
public void testSetNullFloat() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.setProperty("foo", (Float) null);
assertThat(settings.getFloat("foo")).isNull();
}
@Test
public void testSetNullDouble() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.setProperty("foo", (Double) null);
assertThat(settings.getDouble("foo")).isNull();
}
@Test
public void getStringArray() {
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
String[] array = settings.getStringArray("array");
assertThat(array).isEqualTo(new String[] {"one", "two", "three"});
}
@Test
public void setStringArray() {
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
settings.setProperty("multi_values", new String[] {"A", "B"});
String[] array = settings.getStringArray("multi_values");
assertThat(array).isEqualTo(new String[] {"A", "B"});
@@ -357,7 +357,7 @@ public class MapSettingsTest {
@Test
public void setStringArrayTrimValues() {
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
settings.setProperty("multi_values", new String[] {" A ", " B "});
String[] array = settings.getStringArray("multi_values");
assertThat(array).isEqualTo(new String[] {"A", "B"});
@@ -365,7 +365,7 @@ public class MapSettingsTest {
@Test
public void setStringArrayEscapeCommas() {
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
settings.setProperty("multi_values", new String[] {"A,B", "C,D"});
String[] array = settings.getStringArray("multi_values");
assertThat(array).isEqualTo(new String[] {"A,B", "C,D"});
@@ -373,7 +373,7 @@ public class MapSettingsTest {
@Test
public void setStringArrayWithEmptyValues() {
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
settings.setProperty("multi_values", new String[] {"A,B", "", "C,D"});
String[] array = settings.getStringArray("multi_values");
assertThat(array).isEqualTo(new String[] {"A,B", "", "C,D"});
@@ -381,7 +381,7 @@ public class MapSettingsTest {
@Test
public void setStringArrayWithNullValues() {
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
settings.setProperty("multi_values", new String[] {"A,B", null, "C,D"});
String[] array = settings.getStringArray("multi_values");
assertThat(array).isEqualTo(new String[] {"A,B", "", "C,D"});
@@ -389,20 +389,20 @@ public class MapSettingsTest {
@Test(expected = IllegalStateException.class)
public void shouldFailToSetArrayValueOnSingleValueProperty() {
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
settings.setProperty("array", new String[] {"A", "B", "C"});
}
@Test
public void getStringArray_no_value() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
String[] array = settings.getStringArray("array");
assertThat(array).isEmpty();
}
@Test
public void shouldTrimArray() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.setProperty("foo", " one, two, three ");
String[] array = settings.getStringArray("foo");
assertThat(array).isEqualTo(new String[] {"one", "two", "three"});
@@ -410,7 +410,7 @@ public class MapSettingsTest {
@Test
public void shouldKeepEmptyValuesWhenSplitting() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.setProperty("foo", " one, , two");
String[] array = settings.getStringArray("foo");
assertThat(array).isEqualTo(new String[] {"one", "", "two"});
@@ -418,13 +418,13 @@ public class MapSettingsTest {
@Test
public void testDefaultValueOfGetString() {
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
assertThat(settings.getString("hello")).isEqualTo("world");
}
@Test
public void set_property_boolean() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.setProperty("foo", true);
settings.setProperty("bar", false);
assertThat(settings.getBoolean("foo")).isTrue();
@@ -435,7 +435,7 @@ public class MapSettingsTest {
@Test
public void ignore_case_of_boolean_values() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.setProperty("foo", "true");
settings.setProperty("bar", "TRUE");
// labels in UI
@@ -448,7 +448,7 @@ public class MapSettingsTest {
@Test
public void get_boolean() {
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
assertThat(settings.getBoolean("boolean")).isTrue();
assertThat(settings.getBoolean("falseboolean")).isFalse();
assertThat(settings.getBoolean("unknown")).isFalse();
@@ -457,7 +457,7 @@ public class MapSettingsTest {
@Test
public void shouldCreateByIntrospectingComponent() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.getDefinitions().addComponent(MyComponent.class);
// property definition has been loaded, ie for default value
@@ -471,19 +471,19 @@ public class MapSettingsTest {
@Test
public void getStringLines_no_value() {
- assertThat(new org.sonar.api.impl.config.MapSettings().getStringLines("foo")).hasSize(0);
+ Assertions.assertThat(new MapSettings().getStringLines("foo")).hasSize(0);
}
@Test
public void getStringLines_single_line() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.setProperty("foo", "the line");
assertThat(settings.getStringLines("foo")).isEqualTo(new String[] {"the line"});
}
@Test
public void getStringLines_linux() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.setProperty("foo", "one\ntwo");
assertThat(settings.getStringLines("foo")).isEqualTo(new String[] {"one", "two"});
@@ -493,7 +493,7 @@ public class MapSettingsTest {
@Test
public void getStringLines_windows() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.setProperty("foo", "one\r\ntwo");
assertThat(settings.getStringLines("foo")).isEqualTo(new String[] {"one", "two"});
@@ -503,14 +503,14 @@ public class MapSettingsTest {
@Test
public void getStringLines_mix() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.setProperty("foo", "one\r\ntwo\nthree");
assertThat(settings.getStringLines("foo")).isEqualTo(new String[] {"one", "two", "three"});
}
@Test
public void getKeysStartingWith() {
- Settings settings = new org.sonar.api.impl.config.MapSettings();
+ Settings settings = new MapSettings();
settings.setProperty("sonar.jdbc.url", "foo");
settings.setProperty("sonar.jdbc.username", "bar");
settings.setProperty("sonar.security", "admin");
@@ -522,7 +522,7 @@ public class MapSettingsTest {
@Test
public void should_fallback_deprecated_key_to_default_value_of_new_key() {
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
assertThat(settings.getString("newKeyWithDefaultValue")).isEqualTo("default_value");
assertThat(settings.getString("oldKeyWithDefaultValue")).isEqualTo("default_value");
@@ -530,7 +530,7 @@ public class MapSettingsTest {
@Test
public void should_fallback_deprecated_key_to_new_key() {
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
settings.setProperty("newKey", "value of newKey");
assertThat(settings.getString("newKey")).isEqualTo("value of newKey");
@@ -540,7 +540,7 @@ public class MapSettingsTest {
@Test
public void should_load_value_of_deprecated_key() {
// it's used for example when deprecated settings are set through command-line
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
settings.setProperty("oldKey", "value of oldKey");
assertThat(settings.getString("newKey")).isEqualTo("value of oldKey");
@@ -549,7 +549,7 @@ public class MapSettingsTest {
@Test
public void should_load_values_of_deprecated_key() {
- Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
+ Settings settings = new MapSettings(definitions);
settings.setProperty("oldKey", "a,b");
assertThat(settings.getStringArray("newKey")).containsOnly("a", "b");
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/config/MultivaluePropertyTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/config/internal/MultivaluePropertyTest.java
index 63e3c442cfd..bd50d94827e 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/config/MultivaluePropertyTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/config/internal/MultivaluePropertyTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.config;
+package org.sonar.api.config.internal;
import com.tngtech.java.junit.dataprovider.DataProvider;
import com.tngtech.java.junit.dataprovider.DataProviderRunner;
@@ -31,8 +31,8 @@ import org.junit.runner.RunWith;
import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.sonar.api.impl.config.MultivalueProperty.parseAsCsv;
-import static org.sonar.api.impl.config.MultivalueProperty.trimFieldsAndRemoveEmptyFields;
+import static org.sonar.api.config.internal.MultivalueProperty.parseAsCsv;
+import static org.sonar.api.config.internal.MultivalueProperty.trimFieldsAndRemoveEmptyFields;
@RunWith(DataProviderRunner.class)
public class MultivaluePropertyTest {
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/context/MetadataLoaderTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/internal/MetadataLoaderTest.java
index e6106a3dfe3..d62ebdcf762 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/context/MetadataLoaderTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/internal/MetadataLoaderTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.context;
+package org.sonar.api.internal;
import java.io.File;
import java.net.MalformedURLException;
@@ -25,7 +25,6 @@ import org.sonar.api.SonarEdition;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.impl.context.MetadataLoader;
import org.sonar.api.utils.System2;
import org.sonar.api.utils.Version;
@@ -42,21 +41,21 @@ public class MetadataLoaderTest {
@Test
public void load_version_from_file_in_classpath() {
- Version version = org.sonar.api.impl.context.MetadataLoader.loadVersion(System2.INSTANCE);
+ Version version = MetadataLoader.loadVersion(System2.INSTANCE);
assertThat(version).isNotNull();
assertThat(version.major()).isGreaterThanOrEqualTo(5);
}
@Test
public void load_edition_from_file_in_classpath() {
- SonarEdition edition = org.sonar.api.impl.context.MetadataLoader.loadEdition(System2.INSTANCE);
+ SonarEdition edition = MetadataLoader.loadEdition(System2.INSTANCE);
assertThat(edition).isNotNull();
}
@Test
public void load_edition_defaults_to_community_if_file_not_found() throws MalformedURLException {
when(system.getResource(anyString())).thenReturn(new File("target/unknown").toURI().toURL());
- SonarEdition edition = org.sonar.api.impl.context.MetadataLoader.loadEdition(System2.INSTANCE);
+ SonarEdition edition = MetadataLoader.loadEdition(System2.INSTANCE);
assertThat(edition).isEqualTo(SonarEdition.COMMUNITY);
}
@@ -65,7 +64,7 @@ public class MetadataLoaderTest {
expectedException.expect(IllegalStateException.class);
expectedException.expectMessage("Invalid edition found in '/sonar-edition.txt': 'TRASH'");
- org.sonar.api.impl.context.MetadataLoader.parseEdition("trash");
+ MetadataLoader.parseEdition("trash");
}
@Test
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/context/SonarRuntimeImplTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/internal/SonarRuntimeImplTest.java
index 617dbafeda2..8e439af9339 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/context/SonarRuntimeImplTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/internal/SonarRuntimeImplTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.api.impl.context;
+package org.sonar.api.internal;
import org.sonar.api.SonarEdition;
import org.assertj.core.api.Assertions;
@@ -27,7 +27,6 @@ import org.junit.rules.ExpectedException;
import org.sonar.api.SonarProduct;
import org.sonar.api.SonarQubeSide;
import org.sonar.api.SonarRuntime;
-import org.sonar.api.impl.context.SonarRuntimeImpl;
import org.sonar.api.utils.Version;
import static org.assertj.core.api.Assertions.assertThat;
@@ -41,7 +40,7 @@ public class SonarRuntimeImplTest {
@Test
public void sonarQube_environment() {
- SonarRuntime apiVersion = org.sonar.api.impl.context.SonarRuntimeImpl.forSonarQube(A_VERSION, SonarQubeSide.SCANNER, SonarEdition.COMMUNITY);
+ SonarRuntime apiVersion = SonarRuntimeImpl.forSonarQube(A_VERSION, SonarQubeSide.SCANNER, SonarEdition.COMMUNITY);
assertThat(apiVersion.getApiVersion()).isEqualTo(A_VERSION);
assertThat(apiVersion.getProduct()).isEqualTo(SonarProduct.SONARQUBE);
assertThat(apiVersion.getSonarQubeSide()).isEqualTo(SonarQubeSide.SCANNER);
@@ -49,7 +48,7 @@ public class SonarRuntimeImplTest {
@Test
public void sonarLint_environment() {
- SonarRuntime apiVersion = org.sonar.api.impl.context.SonarRuntimeImpl.forSonarLint(A_VERSION);
+ SonarRuntime apiVersion = SonarRuntimeImpl.forSonarLint(A_VERSION);
assertThat(apiVersion.getApiVersion()).isEqualTo(A_VERSION);
assertThat(apiVersion.getProduct()).isEqualTo(SonarProduct.SONARLINT);
try {
diff --git a/sonar-plugin-api-impl/src/test/resources/org/sonar/api/impl/fs/glyphicons-halflings-regular.woff b/sonar-plugin-api-impl/src/test/resources/org/sonar/api/batch/fs/internal/fs/glyphicons-halflings-regular.woff
index 2cc3e4852a5..2cc3e4852a5 100644
--- a/sonar-plugin-api-impl/src/test/resources/org/sonar/api/impl/fs/glyphicons-halflings-regular.woff
+++ b/sonar-plugin-api-impl/src/test/resources/org/sonar/api/batch/fs/internal/fs/glyphicons-halflings-regular.woff
Binary files differ