]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6812 Improve format of generated UUIDs for better usage of Lucene
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 27 Aug 2015 13:36:03 +0000 (15:36 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 28 Aug 2015 20:46:56 +0000 (22:46 +0200)
42 files changed:
it/it-tests/src/test/java/batch/suite/IssueJsonReportTest.java
it/it-tests/src/test/resources/batch/IssueJsonReportTest/no-server-analysis.json
it/it-tests/src/test/resources/batch/IssueJsonReportTest/report-on-root-module.json
it/it-tests/src/test/resources/batch/IssueJsonReportTest/report-on-single-module-branch.json
it/it-tests/src/test/resources/batch/IssueJsonReportTest/report-on-single-module.json
it/it-tests/src/test/resources/batch/IssueJsonReportTest/report-on-sub-module.json
server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/IssueIndexBenchmarkTest.java
server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/PersistFileSourcesStepTest.java
server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceDbBenchmarkTest.java
server/sonar-server/src/main/java/org/sonar/server/activity/ActivityService.java
server/sonar-server/src/main/java/org/sonar/server/component/ComponentService.java
server/sonar-server/src/main/java/org/sonar/server/computation/ReportQueue.java
server/sonar-server/src/main/java/org/sonar/server/computation/issue/IssueLifecycle.java
server/sonar-server/src/main/java/org/sonar/server/computation/step/FillComponentsStep.java
server/sonar-server/src/main/java/org/sonar/server/computation/step/PersistTestsStep.java
server/sonar-server/src/main/java/org/sonar/server/permission/PermissionTemplateService.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/PermissionTemplateDtoBuilder.java
server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java
server/sonar-server/src/test/java/org/sonar/server/computation/step/PersistMeasuresStepTest.java
server/sonar-server/src/test/java/org/sonar/server/db/BaseDaoTest.java
server/sonar-server/src/test/java/org/sonar/server/issue/IssueTesting.java
server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ChangelogActionTest.java
server/sonar-server/src/test/java/org/sonar/server/test/db/TestTesting.java
sonar-batch/src/main/java/org/sonar/batch/bootstrap/GlobalContainer.java
sonar-core/src/main/java/org/sonar/core/issue/DefaultActionPlan.java
sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueBuilder.java
sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueComment.java
sonar-core/src/main/java/org/sonar/core/platform/ComponentKeys.java
sonar-core/src/main/java/org/sonar/core/util/MacAddressProvider.java [new file with mode: 0644]
sonar-core/src/main/java/org/sonar/core/util/UuidFactory.java [new file with mode: 0644]
sonar-core/src/main/java/org/sonar/core/util/UuidFactoryImpl.java [new file with mode: 0644]
sonar-core/src/main/java/org/sonar/core/util/Uuids.java [new file with mode: 0644]
sonar-core/src/test/java/org/sonar/core/util/MacAddressProviderTest.java [new file with mode: 0644]
sonar-core/src/test/java/org/sonar/core/util/UuidFactoryImplTest.java [new file with mode: 0644]
sonar-core/src/test/java/org/sonar/core/util/UuidsTest.java [new file with mode: 0644]
sonar-db/src/main/java/org/sonar/core/issue/ActionPlanStats.java
sonar-db/src/main/java/org/sonar/db/issue/IssueDto.java
sonar-db/src/main/java/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationStep.java
sonar-db/src/test/java/org/sonar/db/component/ComponentTesting.java
sonar-db/src/test/java/org/sonar/db/permission/PermissionTemplateTesting.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/Uuids.java [deleted file]
sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/UuidsTest.java [deleted file]

index 7bc7b1c87aad25585f1c802a6dfe75bb1e7ef183..a6b8c6605af768ab3d76189a047be7db81c4fb21 100644 (file)
@@ -192,7 +192,7 @@ public class IssueJsonReportTest {
 
   private static String sanitize(String s) {
     // sanitize issue uuid keys
-    s = s.replaceAll("\\w\\w\\w\\w\\w\\w\\w\\w\\-\\w\\w\\w\\w\\-\\w\\w\\w\\w\\-\\w\\w\\w\\w\\-\\w\\w\\w\\w\\w\\w\\w\\w\\w\\w\\w\\w", "abcde");
+    s = s.replaceAll("\"[a-zA-Z_0-9\\-]{20}\"", "<ISSUE_KEY>");
 
     // sanitize sonar version. Note that "-SILVER-SNAPSHOT" is used by Goldeneye jobs
     s = s.replaceAll("\\d\\.\\d(.\\d)?(\\-.*)?\\-SNAPSHOT", "<SONAR_VERSION>");
index 353b352f203928ef164b5ce74914fbde64786445..3b632a14ba0f998f0ce2085526b893358b4e9c85 100644 (file)
@@ -2,7 +2,7 @@
     "version": "<SONAR_VERSION>",
     "issues": [
         {
-            "key": "05652201-6f89-4f07-ba03-1df08eae0d55",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 6,
             "message": "This issue is generated on each line",
@@ -13,7 +13,7 @@
             "creationDate": "2013-05-02T00:00:00+0200"
         },
         {
-            "key": "0746cf8f-0b67-4da8-82fc-36a6717c1f81",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 5,
             "message": "This issue is generated on each line",
@@ -24,7 +24,7 @@
             "creationDate": "2013-05-02T00:00:00+0200"
         },
         {
-            "key": "0e9c20e2-567b-4c7a-b1e7-b9e5648dbfc5",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 13,
             "message": "This issue is generated on each line",
@@ -35,7 +35,7 @@
             "creationDate": "2013-05-02T00:00:00+0200"
         },
         {
-            "key": "107fb325-ddda-43c6-9fde-1e7250571ef8",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 1,
             "message": "This issue is generated on each line",
@@ -46,7 +46,7 @@
             "creationDate": "2013-05-02T00:00:00+0200"
         },
         {
-            "key": "226c71cf-0a86-43af-8281-6df0308eac92",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 3,
             "message": "This issue is generated on each line",
@@ -57,7 +57,7 @@
             "creationDate": "2013-05-02T00:00:00+0200"
         },
         {
-            "key": "55c9705c-6509-48c6-9773-0437ab60be42",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 4,
             "message": "This issue is generated on each line",
@@ -68,7 +68,7 @@
             "creationDate": "2013-05-02T00:00:00+0200"
         },
         {
-            "key": "5d653e95-16e2-4ee7-aac5-91ab8c3aebd6",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 12,
             "message": "This issue is generated on each line",
@@ -79,7 +79,7 @@
             "creationDate": "2013-05-02T00:00:00+0200"
         },
         {
-            "key": "86056a4b-1813-4a10-937f-082e3f810152",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 10,
             "message": "This issue is generated on each line",
@@ -90,7 +90,7 @@
             "creationDate": "2013-05-02T00:00:00+0200"
         },
         {
-            "key": "906f38ad-ada7-4088-80fe-3fc3b8532ad6",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 2,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-02T00:00:00+0200"
         },
         {
-            "key": "9328fb3c-6fab-489f-a8ad-eb8277dd7bf7",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 9,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-02T00:00:00+0200"
         },
         {
-            "key": "9980ca57-dfc4-431c-9a45-7ee9d397078a",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 11,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-02T00:00:00+0200"
         },
         {
-            "key": "ccf5a264-bbe0-4459-97dc-acc0e323c4bb",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 7,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-02T00:00:00+0200"
         },
         {
-            "key": "ead82961-2724-4d85-b2af-f810206b0ab1",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 8,
             "message": "This issue is generated on each line",
     ],
     "users": [ ]
 
-}
\ No newline at end of file
+}
index 41a22d1a963ad165a1a32346ffdd9701fcbfc855..53d0bc52c20976a82a7a3f384bcf1c1b84162a36 100644 (file)
@@ -1 +1,758 @@
-{"version":"5.2-SNAPSHOT","issues":[{"key":"02863c43-1063-4f1c-9a5f-90f96a3b73a2","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo","line":4,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"1f7826f2-c615-462b-90ef-a597482a1954","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo","line":11,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"3a55c080-5358-4f38-9764-15f253092db9","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo","line":2,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"4960db5a-0a63-4555-9e54-1555ae59bef6","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo","line":5,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"497c4cb1-51d1-4114-b27d-648160179617","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo","line":1,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"4fac27de-afa9-4eca-beba-c3ca6c562a03","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo","line":15,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"5f772c56-75d0-4c53-b016-d998df46b02c","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo","line":16,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"83767a3b-9819-4450-a512-9313c1b11522","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo","line":13,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"93dc780d-6a6c-4bb1-a6c1-729eb3fe3d1c","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo","line":9,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"a236746f-12d1-4a17-becb-af6fb0b34d76","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo","line":12,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"a4953d8c-3f25-4bb8-8d62-64e9fc73c74c","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo","line":3,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"bd610f56-7977-437e-a6ac-199db4da738b","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo","line":8,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"d997cfbe-d6c7-42a5-bc09-a02374d017f1","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo","line":14,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"e4fa51d5-5c10-4b91-bc46-eaf22e10d8b3","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo","line":6,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"e58db2c5-7055-4d86-b866-74bca942d09e","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo","line":10,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"fb4aaeeb-50e0-4b92-966a-f90c06982070","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo","line":7,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"08efacb9-ea82-49aa-b909-3e2535be57bb","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":2,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"0d1425a6-ea1a-4599-b6e4-cb3351a27225","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":12,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"0e9aab93-300b-492c-a28f-e0d3d3e02319","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":8,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"10f34bbd-1d60-4003-83b0-84f6ff723f68","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":17,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"123a65dc-a3d7-4697-8dbc-6c9f8fef7988","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":19,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"177e847b-240d-447e-aa72-490ffe57e748","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":4,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"2d013a53-04c1-4651-8b2a-b0e3cd24bd1a","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":3,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"57f25741-fea5-431b-aed9-d74737ec5f57","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":21,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"5f7a4542-bfc2-4a33-9ce4-2411a145a395","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":6,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"6017ed94-6eae-4ee8-8009-19915b84d831","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":9,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"65490cd1-969b-4ef3-91f8-ad48133f4645","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":18,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"7dd791fc-30b3-43a4-8368-98b7ec3c2c44","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":5,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"88e45274-26e1-43d2-b88c-a4f0de40b340","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":20,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"adc1eb27-4165-43be-96a0-ad8ad4aa5cc6","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":15,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"af3b1b21-afdb-46db-b320-7eb0186c76b4","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":7,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"b9bc99f9-df91-402c-b01c-c79804fdfafa","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":16,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"c3eef6a7-fa0f-4281-b0c4-c3cc62c28ee6","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":13,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"c40a9a79-7c42-4a78-9c0a-941493760d80","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":10,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"d4dfe839-5516-43d3-8708-630b9922c92d","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":1,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"e7c78357-32b7-4a97-9ea6-bd324911c94d","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":14,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"e8ddc175-52f7-4e9b-a73f-6b57b0925bdf","component":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","line":11,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"1b6829f9-d3a7-4224-8dd9-cf7e3db827c5","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo","line":9,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"9540459b-fd9f-48af-9311-a88f62deb244","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo","line":10,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"9a5ed7e3-dd85-484e-999e-0435b2f75253","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo","line":2,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"9bfa3e15-8268-4361-9b59-456746841716","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo","line":1,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"a77e07a5-c572-4953-8f68-7190ada0a72a","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo","line":8,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"bb9ea74c-31da-4f45-9a30-770758d6fb91","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo","line":5,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"bed123b2-6ce1-4f48-bcd6-8449bed843e6","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo","line":7,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"c65358e1-71de-4a41-b666-56f98f5b142b","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo","line":3,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"c8545226-991f-402a-a9ab-ed7366965cbd","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo","line":4,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"d46f8a3b-9dfe-4f46-b073-5247ee2dc7fb","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo","line":6,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"d51307c8-f22e-4a35-9eac-9159472034bd","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo","line":12,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"de0f6728-99cb-4642-9538-dce255680ed5","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo","line":11,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"19b42c33-784d-411d-8ba1-f6da0b81a8ec","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo","line":12,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"1f5bacb3-d3e5-4e0e-aa22-07bc906ff171","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo","line":5,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"240fc9e6-4f86-4cba-87b6-0bc658f0bb2a","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo","line":4,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"38a5a22c-28a5-47a9-b803-45533d1981b5","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo","line":1,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"3a8d14db-c977-4945-8723-e568725ca60b","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo","line":8,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"55b33cc6-ee3d-46e3-b5fc-68efe42c7a2e","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo","line":3,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"abaa37b3-7af3-4fd0-bd5a-494406f5fff9","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo","line":10,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"abb9c19c-6780-40b9-aed0-04538b30940f","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo","line":6,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"b7e9fcdd-3035-4947-9b47-053261edd1ef","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo","line":7,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"c378be23-d7d3-4244-bab3-b5bfa5967af1","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo","line":11,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"cf2a2623-675a-4220-ae1c-50296c8c3b2a","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo","line":2,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"},{"key":"fbdfdbc9-31ec-4821-af23-e7e77ffe4f2d","component":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo","line":9,"message":"This issue is generated on each line","severity":"MAJOR","rule":"xoo:OneIssuePerLine","status":"OPEN","isNew":false,"creationDate":"2013-05-01T00:00:00+0200"}],"components":[{"key":"com.sonarsource.it.samples:multi-modules-sample"},{"key":"com.sonarsource.it.samples:multi-modules-sample:module_a","path":"module_a"},{"key":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1","path":"module_a1"},{"key":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2","path":"module_a2"},{"key":"com.sonarsource.it.samples:multi-modules-sample:module_b","path":"module_b"},{"key":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1","path":"module_b1"},{"key":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2","path":"module_b2"},{"key":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo","path":"src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo","moduleKey":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1","status":"SAME"},{"key":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","path":"src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo","moduleKey":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2","status":"SAME"},{"key":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo","path":"src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo","moduleKey":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1","status":"SAME"},{"key":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo","path":"src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo","moduleKey":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2","status":"SAME"},{"key":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1","path":"src/main/xoo/com/sonar/it/samples/modules/a1","moduleKey":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1"},{"key":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2","path":"src/main/xoo/com/sonar/it/samples/modules/a2","moduleKey":"com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2"},{"key":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1","path":"src/main/xoo/com/sonar/it/samples/modules/b1","moduleKey":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1"},{"key":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2","path":"src/main/xoo/com/sonar/it/samples/modules/b2","moduleKey":"com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2"}],"rules":[{"key":"xoo:OneIssuePerLine","rule":"OneIssuePerLine","repository":"xoo","name":"One Issue Per Line"}],"users":[]}
\ No newline at end of file
+{
+  "version": "5.2-SNAPSHOT",
+  "issues": [
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
+      "line": 4,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
+      "line": 11,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
+      "line": 2,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
+      "line": 5,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
+      "line": 1,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
+      "line": 15,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
+      "line": 16,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
+      "line": 13,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
+      "line": 9,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
+      "line": 12,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
+      "line": 3,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
+      "line": 8,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
+      "line": 14,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
+      "line": 6,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
+      "line": 10,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
+      "line": 7,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 2,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 12,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 8,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 17,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 19,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 4,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 3,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 21,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 6,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 9,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 18,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 5,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 20,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 15,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 7,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 16,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 13,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 10,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 1,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 14,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "line": 11,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo",
+      "line": 9,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo",
+      "line": 10,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo",
+      "line": 2,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo",
+      "line": 1,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo",
+      "line": 8,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo",
+      "line": 5,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo",
+      "line": 7,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo",
+      "line": 3,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo",
+      "line": 4,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo",
+      "line": 6,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo",
+      "line": 12,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo",
+      "line": 11,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo",
+      "line": 12,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo",
+      "line": 5,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo",
+      "line": 4,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo",
+      "line": 1,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo",
+      "line": 8,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo",
+      "line": 3,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo",
+      "line": 10,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo",
+      "line": 6,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo",
+      "line": 7,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo",
+      "line": 11,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo",
+      "line": 2,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    },
+    {
+      "key": "<ISSUE_KEY>",
+      "component": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo",
+      "line": 9,
+      "message": "This issue is generated on each line",
+      "severity": "MAJOR",
+      "rule": "xoo:OneIssuePerLine",
+      "status": "OPEN",
+      "isNew": false,
+      "creationDate": "2013-05-01T00:00:00+0200"
+    }
+  ],
+  "components": [
+    {
+      "key": "com.sonarsource.it.samples:multi-modules-sample"
+    },
+    {
+      "key": "com.sonarsource.it.samples:multi-modules-sample:module_a",
+      "path": "module_a"
+    },
+    {
+      "key": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1",
+      "path": "module_a1"
+    },
+    {
+      "key": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2",
+      "path": "module_a2"
+    },
+    {
+      "key": "com.sonarsource.it.samples:multi-modules-sample:module_b",
+      "path": "module_b"
+    },
+    {
+      "key": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1",
+      "path": "module_b1"
+    },
+    {
+      "key": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2",
+      "path": "module_b2"
+    },
+    {
+      "key": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
+      "path": "src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
+      "moduleKey": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1",
+      "status": "SAME"
+    },
+    {
+      "key": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "path": "src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo",
+      "moduleKey": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2",
+      "status": "SAME"
+    },
+    {
+      "key": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo",
+      "path": "src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo",
+      "moduleKey": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1",
+      "status": "SAME"
+    },
+    {
+      "key": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo",
+      "path": "src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo",
+      "moduleKey": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2",
+      "status": "SAME"
+    },
+    {
+      "key": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1",
+      "path": "src/main/xoo/com/sonar/it/samples/modules/a1",
+      "moduleKey": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1"
+    },
+    {
+      "key": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2:src/main/xoo/com/sonar/it/samples/modules/a2",
+      "path": "src/main/xoo/com/sonar/it/samples/modules/a2",
+      "moduleKey": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a2"
+    },
+    {
+      "key": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1:src/main/xoo/com/sonar/it/samples/modules/b1",
+      "path": "src/main/xoo/com/sonar/it/samples/modules/b1",
+      "moduleKey": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b1"
+    },
+    {
+      "key": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2:src/main/xoo/com/sonar/it/samples/modules/b2",
+      "path": "src/main/xoo/com/sonar/it/samples/modules/b2",
+      "moduleKey": "com.sonarsource.it.samples:multi-modules-sample:module_b:module_b2"
+    }
+  ],
+  "rules": [
+    {
+      "key": "xoo:OneIssuePerLine",
+      "rule": "OneIssuePerLine",
+      "repository": "xoo",
+      "name": "One Issue Per Line"
+    }
+  ],
+  "users": []
+}
index a440c8c00baa826985d648812a429c4763a96c5e..a7673ec603fcdf7ec7b7b46147178ca9cf74d7b4 100644 (file)
@@ -2,7 +2,7 @@
     "version": "<SONAR_VERSION>",
     "issues": [
         {
-            "key": "042f73b0-61e5-43df-b3c3-9d5f1e43dffd",
+            "key": "<ISSUE_KEY>",
             "component": "sample:mybranch:src/main/xoo/sample/Sample.xoo",
             "line": 2,
             "message": "This issue is generated on each line",
@@ -13,7 +13,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "0f1f71b3-4949-406b-abe8-3f61ee5df8e2",
+            "key": "<ISSUE_KEY>",
             "component": "sample:mybranch:src/main/xoo/sample/Sample.xoo",
             "line": 10,
             "message": "This issue is generated on each line",
@@ -24,7 +24,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "45518777-ed03-4282-915f-60cc09ff6c5d",
+            "key": "<ISSUE_KEY>",
             "component": "sample:mybranch:src/main/xoo/sample/Sample.xoo",
             "line": 13,
             "message": "This issue is generated on each line",
@@ -35,7 +35,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "501ee82e-898c-4b88-9975-68655607da8f",
+            "key": "<ISSUE_KEY>",
             "component": "sample:mybranch:src/main/xoo/sample/Sample.xoo",
             "line": 15,
             "message": "This issue is generated on each line",
@@ -46,7 +46,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "55799ca7-85f0-4003-a657-361532b9ad9e",
+            "key": "<ISSUE_KEY>",
             "component": "sample:mybranch:src/main/xoo/sample/Sample.xoo",
             "line": 4,
             "message": "This issue is generated on each line",
@@ -57,7 +57,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "57ba7f32-ac32-4d18-b3cc-61042e59b9aa",
+            "key": "<ISSUE_KEY>",
             "component": "sample:mybranch:src/main/xoo/sample/Sample.xoo",
             "line": 3,
             "message": "This issue is generated on each line",
@@ -68,7 +68,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "5885445b-5f76-45da-8ae4-5b31f145cc68",
+            "key": "<ISSUE_KEY>",
             "component": "sample:mybranch:src/main/xoo/sample/Sample.xoo",
             "line": 12,
             "message": "This issue is generated on each line",
@@ -79,7 +79,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "71be8e1c-3d3b-4704-b86f-efb3de0cc17f",
+            "key": "<ISSUE_KEY>",
             "component": "sample:mybranch:src/main/xoo/sample/Sample.xoo",
             "line": 11,
             "message": "This issue is generated on each line",
@@ -90,7 +90,7 @@
             "creationDate": "2013-05-02T00:00:00+0200"
         },
         {
-            "key": "81669e04-75ae-4eb6-8a13-90b7ea0adcf0",
+            "key": "<ISSUE_KEY>",
             "component": "sample:mybranch:src/main/xoo/sample/Sample.xoo",
             "line": 5,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "939c914b-a899-429e-a98a-73cc5ff7d1f7",
+            "key": "<ISSUE_KEY>",
             "component": "sample:mybranch:src/main/xoo/sample/Sample.xoo",
             "line": 7,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-02T00:00:00+0200"
         },
         {
-            "key": "b3c66ea0-9d80-4159-868f-05d6fcbbc551",
+            "key": "<ISSUE_KEY>",
             "component": "sample:mybranch:src/main/xoo/sample/Sample.xoo",
             "line": 9,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "c9a17e92-b355-4c19-9b11-24c006a55a4d",
+            "key": "<ISSUE_KEY>",
             "component": "sample:mybranch:src/main/xoo/sample/Sample.xoo",
             "line": 6,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "dddba55e-44fa-47b8-bcfc-b88f40659e56",
+            "key": "<ISSUE_KEY>",
             "component": "sample:mybranch:src/main/xoo/sample/Sample.xoo",
             "line": 8,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "e390f328-f59a-4a9a-9421-f5d0e13a3f4e",
+            "key": "<ISSUE_KEY>",
             "component": "sample:mybranch:src/main/xoo/sample/Sample.xoo",
             "line": 1,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "fdff9685-de6d-4862-adbd-0d6059da5180",
+            "key": "<ISSUE_KEY>",
             "component": "sample:mybranch:src/main/xoo/sample/Sample.xoo",
             "line": 14,
             "message": "This issue is generated on each line",
     ],
     "users": [ ]
 
-}
\ No newline at end of file
+}
index 99898937f69a29b32c727f04a825f1fe7402bfd1..4b42c103ace8ed068e634b6d44f6cdc1a27c1845 100644 (file)
@@ -2,7 +2,7 @@
     "version": "<SONAR_VERSION>",
     "issues": [
         {
-            "key": "05652201-6f89-4f07-ba03-1df08eae0d55",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 6,
             "message": "This issue is generated on each line",
@@ -13,7 +13,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "0746cf8f-0b67-4da8-82fc-36a6717c1f81",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 5,
             "message": "This issue is generated on each line",
@@ -24,7 +24,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "0e9c20e2-567b-4c7a-b1e7-b9e5648dbfc5",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 13,
             "message": "This issue is generated on each line",
@@ -35,7 +35,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "107fb325-ddda-43c6-9fde-1e7250571ef8",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 1,
             "message": "This issue is generated on each line",
@@ -46,7 +46,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "226c71cf-0a86-43af-8281-6df0308eac92",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 3,
             "message": "This issue is generated on each line",
@@ -57,7 +57,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "55c9705c-6509-48c6-9773-0437ab60be42",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 4,
             "message": "This issue is generated on each line",
@@ -68,7 +68,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "5d653e95-16e2-4ee7-aac5-91ab8c3aebd6",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 12,
             "message": "This issue is generated on each line",
@@ -79,7 +79,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "86056a4b-1813-4a10-937f-082e3f810152",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 10,
             "message": "This issue is generated on each line",
@@ -90,7 +90,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "906f38ad-ada7-4088-80fe-3fc3b8532ad6",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 2,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "9328fb3c-6fab-489f-a8ad-eb8277dd7bf7",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 9,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "9980ca57-dfc4-431c-9a45-7ee9d397078a",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 11,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-02T00:00:00+0200"
         },
         {
-            "key": "ccf5a264-bbe0-4459-97dc-acc0e323c4bb",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 7,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-02T00:00:00+0200"
         },
         {
-            "key": "ead82961-2724-4d85-b2af-f810206b0ab1",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 8,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "ef617afe-b453-46a2-b004-8f7418059ebc",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 14,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "f7d19927-2d2f-453c-aa45-1e315e5bfbe6",
+            "key": "<ISSUE_KEY>",
             "component": "sample:src/main/xoo/sample/Sample.xoo",
             "line": 15,
             "message": "This issue is generated on each line",
     ],
     "users": [ ]
 
-}
\ No newline at end of file
+}
index c86edf9dd321f6b91c9c2a0732e23d971bc5e703..cc979a77420890f8aeb7ef0cce484ef92809f330 100644 (file)
@@ -3,7 +3,7 @@
     "version": "<SONAR_VERSION>",
     "issues": [
         {
-            "key": "040a1d39-472b-4cfa-a75d-0547dd21b3c4",
+            "key": "<ISSUE_KEY>",
             "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
             "line": 4,
             "message": "This issue is generated on each line",
@@ -14,7 +14,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "0934e722-8456-465d-bb85-adbcd632d3df",
+            "key": "<ISSUE_KEY>",
             "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
             "line": 7,
             "message": "This issue is generated on each line",
@@ -25,7 +25,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "3992207a-f3a3-4c3c-a369-28a893e17c60",
+            "key": "<ISSUE_KEY>",
             "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
             "line": 6,
             "message": "This issue is generated on each line",
@@ -36,7 +36,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "4b38f729-17f3-4628-b5e1-f6795a6c49c7",
+            "key": "<ISSUE_KEY>",
             "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
             "line": 1,
             "message": "This issue is generated on each line",
@@ -47,7 +47,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "50541707-ab11-469d-9ace-b4753ffb84b8",
+            "key": "<ISSUE_KEY>",
             "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
             "line": 8,
             "message": "This issue is generated on each line",
@@ -58,7 +58,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "88ddda56-ae14-4121-9dbd-fefc5cc8c86b",
+            "key": "<ISSUE_KEY>",
             "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
             "line": 15,
             "message": "This issue is generated on each line",
@@ -69,7 +69,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "a246f099-c97f-4c7e-b1f4-cc3389f3dced",
+            "key": "<ISSUE_KEY>",
             "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
             "line": 14,
             "message": "This issue is generated on each line",
@@ -80,7 +80,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "aa2f4b1d-724d-4e2d-85cd-39a86006e2e9",
+            "key": "<ISSUE_KEY>",
             "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
             "line": 10,
             "message": "This issue is generated on each line",
@@ -91,7 +91,7 @@
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "ac908fcc-e533-4229-9a04-3a89d13537e4",
+            "key": "<ISSUE_KEY>",
             "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
             "line": 3,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "c4604a54-5df8-4db7-8670-df6e4932246b",
+            "key": "<ISSUE_KEY>",
             "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
             "line": 2,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "c99f57ec-98e4-464c-8fa5-adbb27a3a81c",
+            "key": "<ISSUE_KEY>",
             "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
             "line": 16,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "d491b9c4-9217-4285-aabd-44d079b1d46a",
+            "key": "<ISSUE_KEY>",
             "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
             "line": 9,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "d4ae59a5-1ece-4735-8142-ac884bdad17a",
+            "key": "<ISSUE_KEY>",
             "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
             "line": 5,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "d832eb5d-5ff1-4095-b9bc-c5b948e74d5f",
+            "key": "<ISSUE_KEY>",
             "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
             "line": 12,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "e4e76304-7920-4a2f-8deb-fe5a7f21d085",
+            "key": "<ISSUE_KEY>",
             "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
             "line": 13,
             "message": "This issue is generated on each line",
             "creationDate": "2013-05-01T00:00:00+0200"
         },
         {
-            "key": "fb923e8f-c336-49c0-8884-4529ff8af6e4",
+            "key": "<ISSUE_KEY>",
             "component": "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo",
             "line": 11,
             "message": "This issue is generated on each line",
     ],
     "users": [ ]
 
-}
\ No newline at end of file
+}
index e5fe44f9283eda68e3ee948b7e6cb63cacf614eb..faa4279b78b7d9cc374ad1ad82951626eda0c845 100644 (file)
@@ -39,7 +39,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.sonar.api.issue.Issue;
 import org.sonar.api.rule.Severity;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.server.es.EsClient;
 import org.sonar.server.es.SearchOptions;
 import org.sonar.server.es.SearchResult;
index 2906a4e4ac9dcaa66d99b1c4d9cbcf96fe227039..491c8b0643eb7000551df1e1a11617eaa27241fb 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.rules.TemporaryFolder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.batch.protocol.Constants;
 import org.sonar.batch.protocol.output.BatchReport;
 import org.sonar.batch.protocol.output.BatchReportWriter;
index d1fc9e4b36d8fc2011e98bce81d3b71051431af9..49193d73ac3b4d5dc2e40b61036f92a391425a2a 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.db.DbTester;
 import org.sonar.db.protobuf.DbFileSources;
 import org.sonar.db.source.FileSourceDao;
index b44edeb98f7fbde01322a0ccd2c124851c57a66a..a7b07bad0d4eac632c5b3f882841b6e2e8cb6e74 100644 (file)
@@ -20,7 +20,7 @@
 package org.sonar.server.activity;
 
 import org.sonar.api.utils.KeyValueFormat;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.db.activity.ActivityDto;
 import org.sonar.server.activity.index.ActivityIndexer;
 import org.sonar.db.DbClient;
index 1fda279305e0a194b8d0b635a8e5a24a742ed90c..aa11cb36b3600caee5ccd842826f5befb5eb50a9 100644 (file)
@@ -37,7 +37,7 @@ import org.sonar.api.i18n.I18n;
 import org.sonar.api.resources.Scopes;
 import org.sonar.api.server.ServerSide;
 import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.api.web.UserRole;
 import org.sonar.core.component.ComponentKeys;
 import org.sonar.core.permission.GlobalPermissions;
index aeef538281faee22b360fdebfc98cce2e512d54e..5a0607b5c5078e22ad1c847d54f6827431cacac3 100644 (file)
@@ -28,7 +28,7 @@ import javax.annotation.CheckForNull;
 import org.apache.commons.io.FileUtils;
 import org.sonar.api.config.Settings;
 import org.sonar.api.server.ServerSide;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.api.utils.log.Loggers;
 import org.sonar.db.DbClient;
 import org.sonar.db.DbSession;
index 6034e8e26e7b1a594a0ab391e7ccc095b7bbd884..30b4ccac84bf36d458c854fc3495d3fed6042349 100644 (file)
@@ -21,7 +21,7 @@ package org.sonar.server.computation.issue;
 
 import javax.annotation.Nullable;
 import org.sonar.api.issue.Issue;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.core.issue.DefaultIssue;
 import org.sonar.core.issue.IssueChangeContext;
 import org.sonar.core.issue.IssueUpdater;
index f569bccb0276f61827c460eda31d8dd5313a5989..7a8caf9ec991ec940b92c95fe5df1f4c02b863f7 100644 (file)
@@ -23,7 +23,7 @@ package org.sonar.server.computation.step;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.batch.protocol.output.BatchReport;
 import org.sonar.core.component.ComponentKeys;
 import org.sonar.db.DbClient;
index dd11c62829db50dd5e084c8b60775cbf484e6029..a0b8974485db419e2cbdebeea9a9064fcf38c44a 100644 (file)
@@ -36,7 +36,7 @@ import java.util.Set;
 import org.apache.ibatis.session.ResultContext;
 import org.apache.ibatis.session.ResultHandler;
 import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.api.utils.log.Logger;
 import org.sonar.api.utils.log.Loggers;
 import org.sonar.batch.protocol.output.BatchReport;
index d7e412765d9abca2d6cffda35420031f51ed516e..fb438d2d95295fe0af3883b3fab5e3ebc275ae60 100644 (file)
@@ -28,7 +28,7 @@ import javax.annotation.CheckForNull;
 import javax.annotation.Nullable;
 import org.sonar.api.server.ServerSide;
 import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.core.permission.GlobalPermissions;
 import org.sonar.db.DbClient;
 import org.sonar.db.DbSession;
index 157d1aa77daf66bc0495230b1bb1e28f02deffcd..55702eb799d513e4628e312b377af06a075d7686 100644 (file)
@@ -22,7 +22,7 @@ package org.sonar.server.permission.ws;
 
 import java.util.Date;
 import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.db.permission.PermissionTemplateDto;
 
 class PermissionTemplateDtoBuilder {
index 5532dc702df55c1d6fa6b5f1e089a6236bfc9bb4..d45bc634ad516a29253cd06e2d5dea1ee56def81 100644 (file)
@@ -25,6 +25,7 @@ import org.sonar.api.utils.System2;
 import org.sonar.api.utils.internal.TempFolderCleaner;
 import org.sonar.core.config.CorePropertyDefinitions;
 import org.sonar.core.config.Logback;
+import org.sonar.core.util.UuidFactoryImpl;
 import org.sonar.db.DaoModule;
 import org.sonar.db.DatabaseChecker;
 import org.sonar.db.DefaultDatabase;
@@ -74,6 +75,7 @@ public class PlatformLevel1 extends PlatformLevel {
       ServerSettings.class,
       ServerImpl.class,
       Logback.class,
+      UuidFactoryImpl.INSTANCE,
       EmbeddedDatabaseFactory.class,
       DefaultDatabase.class,
       DatabaseChecker.class,
index 2e4c9b1f95f86d11d46bc463e6942e0eda35dfeb..34fdf073d410cbb9f7ea86cd40eea541498a9b59 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.sonar.api.measures.Metric;
 import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.db.DbClient;
 import org.sonar.db.DbTester;
 import org.sonar.db.component.ComponentDto;
index f8b67dfdbdc224cbb569c542149254a0fbbfbdb6..4bb6850824d8cb88d9f901a3cc3a6eb44185e17e 100644 (file)
@@ -26,7 +26,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.db.DbSession;
 import org.sonar.db.DbTester;
 import org.sonar.db.MyBatis;
index c2eb0018e3c4fd0af54ea939c6fd226d899df6cb..5461eebfc14c4b6f7037a3ac5842dfb2bc4a6b71 100644 (file)
@@ -24,7 +24,7 @@ import org.sonar.api.issue.Issue;
 import org.sonar.api.resources.Scopes;
 import org.sonar.api.rule.Severity;
 import org.sonar.api.utils.DateUtils;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.db.component.ComponentDto;
 import org.sonar.db.issue.IssueDto;
 import org.sonar.db.rule.RuleDto;
index 0857b4db29920b59ac4683a39d317688a845acd8..bbedcbd63c24220afd2b9a9706fb17bacd2a5104 100644 (file)
@@ -33,7 +33,7 @@ import org.sonar.api.rule.Severity;
 import org.sonar.api.server.ws.WebService.Param;
 import org.sonar.api.utils.DateUtils;
 import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.db.DbSession;
 import org.sonar.db.DbTester;
 import org.sonar.db.qualityprofile.ActiveRuleKey;
index 330dea6715110f6c2e36fe91aaadb0c244084e78..2c6de7ef1a251a201b161e30c429f8845189f2ca 100644 (file)
@@ -28,7 +28,7 @@ import java.util.ArrayList;
 import java.util.List;
 import org.apache.commons.lang.RandomStringUtils;
 import org.apache.commons.lang.math.RandomUtils;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.db.DbSession;
 import org.sonar.db.protobuf.DbFileSources;
 import org.sonar.db.source.FileSourceDto;
index 7fdba09eeb430d9c94264150f8b514159bd43708..e87820dff4c414bbc6c6f3e198484a26642efaba 100644 (file)
@@ -53,6 +53,7 @@ import org.sonar.core.platform.PluginInfo;
 import org.sonar.core.platform.PluginLoader;
 import org.sonar.core.platform.PluginRepository;
 import org.sonar.core.util.DefaultHttpDownloader;
+import org.sonar.core.util.UuidFactoryImpl;
 
 public class GlobalContainer extends ComponentContainer {
 
@@ -106,7 +107,8 @@ public class GlobalContainer extends ComponentContainer {
       DefaultI18n.class,
       Durations.class,
       RuleI18nManager.class,
-      new GlobalRepositoriesProvider());
+      new GlobalRepositoriesProvider(),
+      UuidFactoryImpl.INSTANCE);
     addIfMissing(BatchPluginInstaller.class, PluginInstaller.class);
     addIfMissing(DefaultRulesLoader.class, RulesLoader.class);
     addIfMissing(DefaultGlobalRepositoriesLoader.class, GlobalRepositoriesLoader.class);
index 3e8fbdded69c0fbffe9381dcf54a90319125f16b..14c0ab6059741b3f231fb2cefc873bd9a53e4bd9 100644 (file)
@@ -24,7 +24,7 @@ import java.util.Date;
 import javax.annotation.CheckForNull;
 import javax.annotation.Nullable;
 import org.sonar.api.issue.ActionPlan;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 
 public class DefaultActionPlan implements ActionPlan {
 
index e65a71bab690988733c098cddb02662339f39e84..77c6237f3d75d63d1c11838ab66ac2351afd79d5 100644 (file)
@@ -28,7 +28,7 @@ import org.sonar.api.issue.Issuable;
 import org.sonar.api.issue.Issuable.IssueBuilder;
 import org.sonar.api.issue.Issue;
 import org.sonar.api.rule.RuleKey;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 
 public class DefaultIssueBuilder implements Issuable.IssueBuilder {
 
index c54e50546ee7ce34c58b3fe629f12afd46767840..f13137370b78f1449f4b1c802a9826cc49fc189b 100644 (file)
@@ -24,7 +24,7 @@ import java.util.Date;
 import javax.annotation.CheckForNull;
 import javax.annotation.Nullable;
 import org.sonar.api.issue.IssueComment;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 
 /**
  * PLUGINS MUST NOT BE USED THIS CLASS, EXCEPT FOR UNIT TESTING.
index 1e02781c64f0b440109cd8bcffd43adf8019c56b..94978b7ae4966625eb854943fb11e5e9e5d9138a 100644 (file)
@@ -22,7 +22,7 @@ package org.sonar.core.platform;
 import java.util.HashSet;
 import java.util.Set;
 import java.util.regex.Pattern;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.api.utils.log.Logger;
 import org.sonar.api.utils.log.Loggers;
 
diff --git a/sonar-core/src/main/java/org/sonar/core/util/MacAddressProvider.java b/sonar-core/src/main/java/org/sonar/core/util/MacAddressProvider.java
new file mode 100644 (file)
index 0000000..8b78b58
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube 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.
+ *
+ * SonarQube 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.core.util;
+
+import com.google.common.annotations.VisibleForTesting;
+import java.net.NetworkInterface;
+import java.net.SocketException;
+import java.security.SecureRandom;
+import java.util.Enumeration;
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+import org.sonar.api.utils.log.Logger;
+import org.sonar.api.utils.log.Loggers;
+
+/**
+ * Used by {@link UuidFactoryImpl}. Heavily inspired by https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/common/MacAddressProvider.java
+ */
+class MacAddressProvider {
+
+  private static final Logger LOGGER = Loggers.get(MacAddressProvider.class);
+  public static final int BYTE_SIZE = 6;
+
+  private MacAddressProvider() {
+    // only static stuff
+  }
+
+  public static byte[] getSecureMungedAddress() {
+    byte[] address = null;
+    try {
+      address = getMacAddress();
+    } catch (SocketException se) {
+      LOGGER.warn("Unable to get mac address, will use a dummy address", se);
+      // address will be set below
+    }
+
+    if (!isValidAddress(address)) {
+      LOGGER.warn("Unable to get a valid mac address, will use a dummy address");
+      address = constructDummyMulticastAddress();
+    }
+
+    byte[] mungedBytes = new byte[BYTE_SIZE];
+    new SecureRandom().nextBytes(mungedBytes);
+    for (int i = 0; i < BYTE_SIZE; ++i) {
+      mungedBytes[i] ^= address[i];
+    }
+
+    return mungedBytes;
+  }
+
+  private static boolean isValidAddress(@Nullable byte[] address) {
+    if (address == null || address.length != BYTE_SIZE) {
+      return false;
+    }
+    for (byte b : address) {
+      if (b != 0x00) {
+        // If any of the bytes are non zero assume a good address
+        return true;
+      }
+    }
+    return false;
+  }
+
+  @CheckForNull
+  private static byte[] getMacAddress() throws SocketException {
+    Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces();
+    if (en != null) {
+      while (en.hasMoreElements()) {
+        NetworkInterface nint = en.nextElement();
+        if (!nint.isLoopback()) {
+          // Pick the first valid non loopback address we find
+          byte[] address = nint.getHardwareAddress();
+          if (isValidAddress(address)) {
+            return address;
+          }
+        }
+      }
+    }
+    // Could not find a mac address
+    return null;
+  }
+
+  @VisibleForTesting
+  static byte[] constructDummyMulticastAddress() {
+    byte[] dummy = new byte[BYTE_SIZE];
+    new SecureRandom().nextBytes(dummy);
+    // Set the broadcast bit to indicate this is not a _real_ mac address
+    dummy[0] |= (byte) 0x01;
+    return dummy;
+  }
+
+}
diff --git a/sonar-core/src/main/java/org/sonar/core/util/UuidFactory.java b/sonar-core/src/main/java/org/sonar/core/util/UuidFactory.java
new file mode 100644 (file)
index 0000000..66ca3fb
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube 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.
+ *
+ * SonarQube 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.core.util;
+
+public interface UuidFactory {
+
+  /**
+   * Create a universally unique identifier. Underlying algorithm, so format and max length,
+   * can vary over SonarQube versions.
+   * <p/>
+   * UUID is a base64 ASCII encoded string and is URL-safe. It does not contain - and + characters
+   * but only letters, digits, dash (-) and underscore (_). Length can vary but does
+   * not exceed 40 characters (arbitrary value).
+   */
+  String create();
+
+}
diff --git a/sonar-core/src/main/java/org/sonar/core/util/UuidFactoryImpl.java b/sonar-core/src/main/java/org/sonar/core/util/UuidFactoryImpl.java
new file mode 100644 (file)
index 0000000..0f0d855
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube 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.
+ *
+ * SonarQube 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.core.util;
+
+import java.security.SecureRandom;
+import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.commons.codec.binary.Base64;
+
+/**
+ * Heavily inspired from Elasticsearch {@code TimeBasedUUIDGenerator}, which could be directly
+ * used the day {@code UuidFactoryImpl} is moved outside module sonar-core.
+ * See https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/common/TimeBasedUUIDGenerator.java
+ */
+public enum UuidFactoryImpl implements UuidFactory {
+
+  /**
+   * Should be removed as long {@link Uuids} is not used anymore. {@code UuidFactoryImpl}
+   * should be built by picocontainer through a public constructor.
+   */
+  INSTANCE;
+
+  // We only use bottom 3 bytes for the sequence number. Paranoia: init with random int so that if JVM/OS/machine goes down, clock slips
+  // backwards, and JVM comes back up, we are less likely to be on the same sequenceNumber at the same time:
+  private final AtomicInteger sequenceNumber = new AtomicInteger(new SecureRandom().nextInt());
+
+  // Used to ensure clock moves forward
+  private long lastTimestamp = 0L;
+
+  private final byte[] secureMungedAddress = MacAddressProvider.getSecureMungedAddress();
+
+  @Override
+  public String create() {
+    int sequenceId = sequenceNumber.incrementAndGet() & 0xffffff;
+    long timestamp = System.currentTimeMillis();
+
+    synchronized (this) {
+      // Don't let timestamp go backwards, at least "on our watch" (while this JVM is running). We are still vulnerable if we are
+      // shut down, clock goes backwards, and we restart... for this we randomize the sequenceNumber on init to decrease chance of
+      // collision:
+      timestamp = Math.max(lastTimestamp, timestamp);
+
+      if (sequenceId == 0) {
+        // Always force the clock to increment whenever sequence number is 0, in case we have a long time-slip backwards:
+        timestamp++;
+      }
+
+      lastTimestamp = timestamp;
+    }
+
+    byte[] uuidBytes = new byte[15];
+
+    // Only use lower 6 bytes of the timestamp (this will suffice beyond the year 10000):
+    putLong(uuidBytes, timestamp, 0, 6);
+
+    // MAC address adds 6 bytes:
+    System.arraycopy(secureMungedAddress, 0, uuidBytes, 6, secureMungedAddress.length);
+
+    // Sequence number adds 3 bytes:
+    putLong(uuidBytes, sequenceId, 12, 3);
+
+    return Base64.encodeBase64URLSafeString(uuidBytes);
+  }
+
+  /** Puts the lower numberOfLongBytes from l into the array, starting index pos. */
+  private static void putLong(byte[] array, long l, int pos, int numberOfLongBytes) {
+    for (int i = 0; i < numberOfLongBytes; ++i) {
+      array[pos + numberOfLongBytes - i - 1] = (byte) (l >>> (i * 8));
+    }
+  }
+}
diff --git a/sonar-core/src/main/java/org/sonar/core/util/Uuids.java b/sonar-core/src/main/java/org/sonar/core/util/Uuids.java
new file mode 100644 (file)
index 0000000..387b75e
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube 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.
+ *
+ * SonarQube 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.core.util;
+
+public class Uuids {
+
+  private Uuids() {
+    // only static fields
+  }
+
+  /**
+   * Create a universally unique identifier. It's recommended to use the non-static way
+   * through {@link UuidFactory} which is available in IoC container.
+   * @see UuidFactory#create()
+   */
+  public static String create() {
+    return UuidFactoryImpl.INSTANCE.create();
+  }
+}
diff --git a/sonar-core/src/test/java/org/sonar/core/util/MacAddressProviderTest.java b/sonar-core/src/test/java/org/sonar/core/util/MacAddressProviderTest.java
new file mode 100644 (file)
index 0000000..dc568e9
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube 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.
+ *
+ * SonarQube 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.core.util;
+
+import org.junit.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class MacAddressProviderTest {
+
+  @Test
+  public void getSecureMungedAddress() throws Exception {
+    byte[] address = MacAddressProvider.getSecureMungedAddress();
+    assertThat(address).isNotEmpty();
+    assertThat(address).hasSize(6);
+  }
+
+  @Test
+  public void constructDummyMulticastAddress() {
+    byte[] address = MacAddressProvider.constructDummyMulticastAddress();
+    assertThat(address).isNotEmpty();
+    assertThat(address).hasSize(6);
+  }
+}
diff --git a/sonar-core/src/test/java/org/sonar/core/util/UuidFactoryImplTest.java b/sonar-core/src/test/java/org/sonar/core/util/UuidFactoryImplTest.java
new file mode 100644 (file)
index 0000000..0774e32
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube 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.
+ *
+ * SonarQube 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.core.util;
+
+import org.junit.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class UuidFactoryImplTest {
+
+  UuidFactory underTest = UuidFactoryImpl.INSTANCE;
+
+  @Test
+  public void create_different_uuids() {
+    // this test is not enough to ensure that generated strings are unique,
+    // but it still does a simple and stupid verification
+    assertThat(underTest.create()).isNotEqualTo(underTest.create());
+  }
+
+  @Test
+  public void test_format_of_uuid() throws Exception {
+    String uuid = underTest.create();
+
+    assertThat(uuid.length()).isGreaterThan(10).isLessThan(40);
+
+    // URL-safe: only letters, digits, dash and underscore.
+    assertThat(uuid).matches("^[\\w\\-_]+$");
+  }
+}
diff --git a/sonar-core/src/test/java/org/sonar/core/util/UuidsTest.java b/sonar-core/src/test/java/org/sonar/core/util/UuidsTest.java
new file mode 100644 (file)
index 0000000..dd3efff
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube 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.
+ *
+ * SonarQube 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.core.util;
+
+import com.google.common.collect.Sets;
+import org.junit.Test;
+import org.sonar.test.TestUtils;
+
+import java.util.Set;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class UuidsTest {
+
+  @Test
+  public void create_unique() {
+    Set<String> all = Sets.newHashSet();
+    for (int i = 0; i < 50; i++) {
+      String uuid = Uuids.create();
+      assertThat(uuid).isNotEmpty();
+      all.add(uuid);
+    }
+    assertThat(all).hasSize(50);
+  }
+
+  @Test
+  public void constructor_is_private() {
+    TestUtils.hasOnlyPrivateConstructors(Uuids.class);
+  }
+}
index 593ec0d63ca5f9ce9b2643c2200867090f9da83b..eced20dda2cff26d57fb707826b2fc131fd4099d 100644 (file)
@@ -22,7 +22,7 @@ package org.sonar.core.issue;
 
 import java.util.Date;
 import org.sonar.api.issue.ActionPlan;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 
 public class ActionPlanStats extends DefaultActionPlan {
 
index bf1fe49aae1448adfa1a80c19d992e71cc68c047..1d4019cdd91adb83910259977e5d1ee27567e4cd 100644 (file)
@@ -37,7 +37,7 @@ import org.sonar.api.resources.Project;
 import org.sonar.api.rule.RuleKey;
 import org.sonar.api.utils.Duration;
 import org.sonar.api.utils.KeyValueFormat;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.core.issue.DefaultIssue;
 import org.sonar.db.component.ComponentDto;
 import org.sonar.db.protobuf.DbIssues;
index 181d0aeebf367a16c38b983204687f90cf12f4fe..547f42f91286f344d3ca989d1242a56b46218963 100644 (file)
@@ -28,7 +28,7 @@ import java.util.concurrent.atomic.AtomicLong;
 import org.apache.ibatis.session.ResultContext;
 import org.apache.ibatis.session.ResultHandler;
 import org.sonar.api.resources.Scopes;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 import org.sonar.api.utils.log.Logger;
 import org.sonar.api.utils.log.Loggers;
 import org.sonar.core.util.ProgressLogger;
index f492d037f43ed0e722046d53c4e9dbcf1adcd598..ddbc5c345e094ed0e1598c09b989ebc7604de85e 100644 (file)
@@ -23,7 +23,7 @@ package org.sonar.db.component;
 import com.google.common.base.Preconditions;
 import org.sonar.api.resources.Qualifiers;
 import org.sonar.api.resources.Scopes;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 
 import static org.sonar.db.component.ComponentDto.MODULE_UUID_PATH_SEP;
 
index fc6db6de75c53b796de95b8d268130a3f293954e..c8f35799c4c6a0e4f4ac8fff6a7abf07ed6257ff 100644 (file)
@@ -21,7 +21,7 @@
 package org.sonar.db.permission;
 
 import java.util.Date;
-import org.sonar.api.utils.internal.Uuids;
+import org.sonar.core.util.Uuids;
 
 import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
 import static org.apache.commons.lang.RandomStringUtils.randomAscii;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/Uuids.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/Uuids.java
deleted file mode 100644 (file)
index e72c123..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube 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.
- *
- * SonarQube 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.utils.internal;
-
-import java.util.UUID;
-
-/**
- * @since 5.0
- */
-public class Uuids {
-
-  private Uuids() {
-    // only static fields
-  }
-
-  /**
-   * Create a universally unique identifier. Underlying algorithm can change over SQ versions.
-   */
-  public static String create() {
-    return UUID.randomUUID().toString();
-  }
-}
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/UuidsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/UuidsTest.java
deleted file mode 100644 (file)
index a5b4aff..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube 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.
- *
- * SonarQube 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.utils.internal;
-
-import com.google.common.collect.Sets;
-import org.junit.Test;
-import org.sonar.test.TestUtils;
-
-import java.util.Set;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class UuidsTest {
-
-  @Test
-  public void create_unique() {
-    Set<String> all = Sets.newHashSet();
-    for (int i = 0; i < 50; i++) {
-      String uuid = Uuids.create();
-      assertThat(uuid).isNotEmpty();
-      all.add(uuid);
-    }
-    assertThat(all).hasSize(50);
-  }
-
-  @Test
-  public void constructor_is_private() {
-    TestUtils.hasOnlyPrivateConstructors(Uuids.class);
-  }
-}