diff options
1867 files changed, 11490 insertions, 11490 deletions
diff --git a/copyright.txt b/copyright.txt index d868b0b2e53..4f3dc1be72c 100644 --- a/copyright.txt +++ b/copyright.txt @@ -1,5 +1,5 @@ Sonar, open source software quality management tool. -Copyright (C) 2009 SonarSource SA +Copyright (C) 2008-2011 SonarSource mailto:contact AT sonarsource DOT com Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleAuditListener.java b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleAuditListener.java index 20e051480a0..64b0ece2253 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleAuditListener.java +++ b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleAuditListener.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleConfiguration.java b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleConfiguration.java index b33b0be8ece..970d50019f0 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleConfiguration.java +++ b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleConfiguration.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleConstants.java b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleConstants.java index c8ec295a13a..78ec934681f 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleConstants.java +++ b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleConstants.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleExecutor.java b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleExecutor.java index 1564e30b45e..2ec7fcf737d 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleExecutor.java +++ b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleExecutor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstylePlugin.java b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstylePlugin.java index 644aaeaeabf..3af36e2809c 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstylePlugin.java +++ b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstylePlugin.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleProfileExporter.java b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleProfileExporter.java index a44b578c769..d39b716b9c3 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleProfileExporter.java +++ b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleProfileExporter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleProfileImporter.java b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleProfileImporter.java index 0fef160a0f2..2ea3f1b6232 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleProfileImporter.java +++ b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleProfileImporter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleRuleRepository.java b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleRuleRepository.java index 02dd0ad885c..e6e05615618 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleRuleRepository.java +++ b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleRuleRepository.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleSensor.java b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleSensor.java index 3cd042564eb..32a52c47625 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleSensor.java +++ b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleSensor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleSeverityUtils.java b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleSeverityUtils.java index cfa31c923a1..42a3f3ba91f 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleSeverityUtils.java +++ b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleSeverityUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleVersion.java b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleVersion.java index 050a7dcd444..228caf0235f 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleVersion.java +++ b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleVersion.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/SonarWayProfile.java b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/SonarWayProfile.java index a0cf3410ce0..40e57808e43 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/SonarWayProfile.java +++ b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/SonarWayProfile.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/SonarWayWithFindbugsProfile.java b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/SonarWayWithFindbugsProfile.java index d9b26e2b43f..3667b20bdec 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/SonarWayWithFindbugsProfile.java +++ b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/SonarWayWithFindbugsProfile.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/SunConventionsProfile.java b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/SunConventionsProfile.java index 82b0e8b7177..3afca41057c 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/SunConventionsProfile.java +++ b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/SunConventionsProfile.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleConfigurationTest.java b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleConfigurationTest.java index 4bd33ebd1b2..e9bf6ce42bc 100644 --- a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleConfigurationTest.java +++ b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleConfigurationTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleExecutorTest.java b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleExecutorTest.java index 5cf62a2b05d..87e5aea56b5 100644 --- a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleExecutorTest.java +++ b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleExecutorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstylePluginTest.java b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstylePluginTest.java index 7eb1656dfc5..57ecda9920d 100644 --- a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstylePluginTest.java +++ b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstylePluginTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleProfileExporterTest.java b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleProfileExporterTest.java index f8727211127..58ebc668272 100644 --- a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleProfileExporterTest.java +++ b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleProfileExporterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleProfileImporterTest.java b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleProfileImporterTest.java index f3d4a41c1ff..dab3cda5415 100644 --- a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleProfileImporterTest.java +++ b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleProfileImporterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleRuleRepositoryTest.java b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleRuleRepositoryTest.java index a501feb7308..98cab62eacf 100644 --- a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleRuleRepositoryTest.java +++ b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleRuleRepositoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleSeverityUtilsTest.java b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleSeverityUtilsTest.java index 2f1e2b14acb..26d61618de2 100644 --- a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleSeverityUtilsTest.java +++ b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleSeverityUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleVersionTest.java b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleVersionTest.java index 96d44e7880f..ab9bf56dcdd 100644 --- a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleVersionTest.java +++ b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleVersionTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SonarWayProfileTest.java b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SonarWayProfileTest.java index fef7df549a4..cb28685d34a 100644 --- a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SonarWayProfileTest.java +++ b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SonarWayProfileTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SonarWayWithFindbugsProfileTest.java b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SonarWayWithFindbugsProfileTest.java index c53eff084ca..d9fc0c3fa33 100644 --- a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SonarWayWithFindbugsProfileTest.java +++ b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SonarWayWithFindbugsProfileTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SunConventionsProfileTest.java b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SunConventionsProfileTest.java index 4f2bb9361d8..200b3f04800 100644 --- a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SunConventionsProfileTest.java +++ b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SunConventionsProfileTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverConstants.java b/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverConstants.java index e35ccde4c1b..b59bac436da 100644 --- a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverConstants.java +++ b/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverConstants.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverMavenPluginHandler.java b/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverMavenPluginHandler.java index bd1db7af013..48d5c8e37c9 100644 --- a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverMavenPluginHandler.java +++ b/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverMavenPluginHandler.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverPlugin.java b/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverPlugin.java index 21b34b32c5a..9e173aaebe6 100644 --- a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverPlugin.java +++ b/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverPlugin.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverSensor.java b/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverSensor.java index 0fdc76999bd..8d131178445 100644 --- a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverSensor.java +++ b/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverSensor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/XmlReportParser.java b/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/XmlReportParser.java index 87c38d54523..0e3ad76dd83 100644 --- a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/XmlReportParser.java +++ b/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/XmlReportParser.java @@ -1,207 +1,207 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.clover;
-
-import org.apache.commons.lang.StringUtils;
-import org.codehaus.staxmate.in.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.sonar.api.batch.SensorContext;
-import org.sonar.api.measures.CoreMetrics;
-import org.sonar.api.measures.PropertiesBuilder;
-import org.sonar.api.resources.JavaFile;
-import org.sonar.api.resources.JavaPackage;
-import org.sonar.api.resources.Resource;
-import org.sonar.api.utils.ParsingUtils;
-import static org.sonar.api.utils.ParsingUtils.scaleValue;
-import org.sonar.api.utils.StaxParser;
-import org.sonar.api.utils.XmlParserException;
-
-import java.io.File;
-import java.text.ParseException;
-import javax.xml.stream.XMLStreamException;
-
-public class XmlReportParser {
-
- private static final Logger LOG = LoggerFactory.getLogger(XmlReportParser.class);
- private SensorContext context;
- final PropertiesBuilder<String, Integer> lineHitsBuilder = new PropertiesBuilder<String, Integer>(CoreMetrics.COVERAGE_LINE_HITS_DATA);
- final PropertiesBuilder<String, String> branchHitsBuilder = new PropertiesBuilder<String, String>(CoreMetrics.BRANCH_COVERAGE_HITS_DATA);
-
- public XmlReportParser(SensorContext context) {
- this.context = context;
- }
-
- private boolean reportExists(File report) {
- return report != null && report.exists() && report.isFile();
- }
-
- protected void collect(File xmlFile) {
- try {
- if (reportExists(xmlFile)) {
- LOG.info("Parsing " + xmlFile.getCanonicalPath());
- StaxParser parser = new StaxParser(new StaxParser.XmlStreamHandler() {
- public void stream(SMHierarchicCursor rootCursor) throws XMLStreamException {
- try {
- collectProjectMeasures(rootCursor.advance());
- } catch (ParseException e) {
- throw new XMLStreamException(e);
- }
- }
- });
- parser.parse(xmlFile);
- }
- } catch (Exception e) {
- throw new XmlParserException(e);
- }
- }
-
- private void collectProjectMeasures(SMInputCursor rootCursor) throws ParseException, XMLStreamException {
- SMInputCursor projectCursor = rootCursor.descendantElementCursor("project");
- SMInputCursor projectChildrenCursor = projectCursor.advance().childElementCursor();
- projectChildrenCursor.setFilter(new SimpleFilter(SMEvent.START_ELEMENT));
-
- SMInputCursor metricsCursor = projectChildrenCursor.advance();
- analyseMetricsNode(null, metricsCursor);
- collectPackageMeasures(projectChildrenCursor);
- }
-
- private void analyseMetricsNode(Resource resource, SMInputCursor metricsCursor) throws ParseException, XMLStreamException {
- int elements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("elements"));
- if (elements == 0) {
- return;
- }
-
- int statements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("statements"));
- int methods = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("methods"));
- int conditionals = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("conditionals"));
- int coveredElements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredelements"));
- int coveredStatements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredstatements"));
- int coveredMethods = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredmethods"));
- int coveredConditionals = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredconditionals"));
-
- context.saveMeasure(resource, CoreMetrics.COVERAGE, calculateCoverage(coveredElements, elements));
-
- context.saveMeasure(resource, CoreMetrics.LINE_COVERAGE, calculateCoverage(coveredMethods + coveredStatements, methods + statements));
- context.saveMeasure(resource, CoreMetrics.LINES_TO_COVER, (double) (statements + methods));
- context.saveMeasure(resource, CoreMetrics.UNCOVERED_LINES, (double) (statements + methods - coveredStatements - coveredMethods));
-
- if (conditionals > 0) {
- context.saveMeasure(resource, CoreMetrics.BRANCH_COVERAGE, calculateCoverage(coveredConditionals, conditionals));
- context.saveMeasure(resource, CoreMetrics.CONDITIONS_TO_COVER, (double) (conditionals));
- context.saveMeasure(resource, CoreMetrics.UNCOVERED_CONDITIONS, (double) (conditionals - coveredConditionals));
- }
- }
-
- private double calculateCoverage(int coveredElements, int elements) {
- if (elements > 0) {
- return scaleValue(100.0 * ((double) coveredElements / (double) elements));
- }
- return 0.0;
- }
-
- private void collectPackageMeasures(SMInputCursor packCursor) throws ParseException, XMLStreamException {
- while (packCursor.getNext() != null) {
- JavaPackage pack = new JavaPackage(packCursor.getAttrValue("name"));
- SMInputCursor packChildrenCursor = packCursor.descendantElementCursor();
- packChildrenCursor.setFilter(new SimpleFilter(SMEvent.START_ELEMENT));
- SMInputCursor metricsCursor = packChildrenCursor.advance();
- analyseMetricsNode(pack, metricsCursor);
- collectFileMeasures(packChildrenCursor, pack);
- }
- }
-
- private void collectFileMeasures(SMInputCursor fileCursor, JavaPackage pack) throws ParseException, XMLStreamException {
- fileCursor.setFilter(SMFilterFactory.getElementOnlyFilter("file"));
- while (fileCursor.getNext() != null) {
- if (fileCursor.asEvent().isStartElement()) {
- String classKey = extractClassName(fileCursor.getAttrValue("name"));
- if (classKey != null) {
- SMInputCursor fileChildrenCursor = fileCursor.childCursor(new SimpleFilter(SMEvent.START_ELEMENT));
- // cursor should be on the metrics element
- if (canBeIncludedInFileMetrics(fileChildrenCursor)) {
- JavaFile resource = new JavaFile(pack.getKey(), classKey, false);
- analyseMetricsNode(resource, fileChildrenCursor);
-
- // cursor should be now on the line cursor
- saveHitsData(resource, fileChildrenCursor);
- }
- }
- }
- }
- }
-
- private void saveHitsData(Resource resource, SMInputCursor lineCursor) throws ParseException, XMLStreamException {
- lineHitsBuilder.clear();
- branchHitsBuilder.clear();
- boolean hasBranches = false;
-
- while (lineCursor.getNext() != null) {
- // skip class elements on format 2_3_2
- if (lineCursor.getLocalName().equals("class")) {
- continue;
- }
- final String lineId = lineCursor.getAttrValue("num");
- int hits;
- String count = lineCursor.getAttrValue("count");
- if (StringUtils.isBlank(count)) {
- int trueCount = (int) ParsingUtils.parseNumber(lineCursor.getAttrValue("truecount"));
- int falseCount = (int) ParsingUtils.parseNumber(lineCursor.getAttrValue("falsecount"));
- hits = trueCount + falseCount;
- String branchHits;
- if (trueCount > 0 && falseCount > 0) {
- branchHits = "100%";
- } else if (trueCount == 0 && falseCount == 0) {
- branchHits = "0%";
- } else {
- branchHits = "50%";
- }
- branchHitsBuilder.add(lineId, branchHits);
- hasBranches = true;
-
- } else {
- hits = (int) ParsingUtils.parseNumber(count);
- }
- lineHitsBuilder.add(lineId, hits);
- }
- context.saveMeasure(resource, lineHitsBuilder.build());
- if (hasBranches) {
- context.saveMeasure(resource, branchHitsBuilder.build());
- }
- }
-
- private boolean canBeIncludedInFileMetrics(SMInputCursor metricsCursor) throws ParseException, XMLStreamException {
- // skip class elements on 1.x xml format
- while (metricsCursor.getNext() != null && metricsCursor.getLocalName().equals("class")) {
- }
- return ParsingUtils.parseNumber(metricsCursor.getAttrValue("elements")) > 0;
- }
-
- protected String extractClassName(String filename) {
- if (filename != null) {
- filename = StringUtils.replaceChars(filename, '\\', '/');
- filename = StringUtils.substringBeforeLast(filename, ".java");
- if (filename.indexOf('/') >= 0) {
- filename = StringUtils.substringAfterLast(filename, "/");
- }
- }
- return filename;
- }
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.clover; + +import org.apache.commons.lang.StringUtils; +import org.codehaus.staxmate.in.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.sonar.api.batch.SensorContext; +import org.sonar.api.measures.CoreMetrics; +import org.sonar.api.measures.PropertiesBuilder; +import org.sonar.api.resources.JavaFile; +import org.sonar.api.resources.JavaPackage; +import org.sonar.api.resources.Resource; +import org.sonar.api.utils.ParsingUtils; +import static org.sonar.api.utils.ParsingUtils.scaleValue; +import org.sonar.api.utils.StaxParser; +import org.sonar.api.utils.XmlParserException; + +import java.io.File; +import java.text.ParseException; +import javax.xml.stream.XMLStreamException; + +public class XmlReportParser { + + private static final Logger LOG = LoggerFactory.getLogger(XmlReportParser.class); + private SensorContext context; + final PropertiesBuilder<String, Integer> lineHitsBuilder = new PropertiesBuilder<String, Integer>(CoreMetrics.COVERAGE_LINE_HITS_DATA); + final PropertiesBuilder<String, String> branchHitsBuilder = new PropertiesBuilder<String, String>(CoreMetrics.BRANCH_COVERAGE_HITS_DATA); + + public XmlReportParser(SensorContext context) { + this.context = context; + } + + private boolean reportExists(File report) { + return report != null && report.exists() && report.isFile(); + } + + protected void collect(File xmlFile) { + try { + if (reportExists(xmlFile)) { + LOG.info("Parsing " + xmlFile.getCanonicalPath()); + StaxParser parser = new StaxParser(new StaxParser.XmlStreamHandler() { + public void stream(SMHierarchicCursor rootCursor) throws XMLStreamException { + try { + collectProjectMeasures(rootCursor.advance()); + } catch (ParseException e) { + throw new XMLStreamException(e); + } + } + }); + parser.parse(xmlFile); + } + } catch (Exception e) { + throw new XmlParserException(e); + } + } + + private void collectProjectMeasures(SMInputCursor rootCursor) throws ParseException, XMLStreamException { + SMInputCursor projectCursor = rootCursor.descendantElementCursor("project"); + SMInputCursor projectChildrenCursor = projectCursor.advance().childElementCursor(); + projectChildrenCursor.setFilter(new SimpleFilter(SMEvent.START_ELEMENT)); + + SMInputCursor metricsCursor = projectChildrenCursor.advance(); + analyseMetricsNode(null, metricsCursor); + collectPackageMeasures(projectChildrenCursor); + } + + private void analyseMetricsNode(Resource resource, SMInputCursor metricsCursor) throws ParseException, XMLStreamException { + int elements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("elements")); + if (elements == 0) { + return; + } + + int statements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("statements")); + int methods = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("methods")); + int conditionals = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("conditionals")); + int coveredElements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredelements")); + int coveredStatements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredstatements")); + int coveredMethods = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredmethods")); + int coveredConditionals = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredconditionals")); + + context.saveMeasure(resource, CoreMetrics.COVERAGE, calculateCoverage(coveredElements, elements)); + + context.saveMeasure(resource, CoreMetrics.LINE_COVERAGE, calculateCoverage(coveredMethods + coveredStatements, methods + statements)); + context.saveMeasure(resource, CoreMetrics.LINES_TO_COVER, (double) (statements + methods)); + context.saveMeasure(resource, CoreMetrics.UNCOVERED_LINES, (double) (statements + methods - coveredStatements - coveredMethods)); + + if (conditionals > 0) { + context.saveMeasure(resource, CoreMetrics.BRANCH_COVERAGE, calculateCoverage(coveredConditionals, conditionals)); + context.saveMeasure(resource, CoreMetrics.CONDITIONS_TO_COVER, (double) (conditionals)); + context.saveMeasure(resource, CoreMetrics.UNCOVERED_CONDITIONS, (double) (conditionals - coveredConditionals)); + } + } + + private double calculateCoverage(int coveredElements, int elements) { + if (elements > 0) { + return scaleValue(100.0 * ((double) coveredElements / (double) elements)); + } + return 0.0; + } + + private void collectPackageMeasures(SMInputCursor packCursor) throws ParseException, XMLStreamException { + while (packCursor.getNext() != null) { + JavaPackage pack = new JavaPackage(packCursor.getAttrValue("name")); + SMInputCursor packChildrenCursor = packCursor.descendantElementCursor(); + packChildrenCursor.setFilter(new SimpleFilter(SMEvent.START_ELEMENT)); + SMInputCursor metricsCursor = packChildrenCursor.advance(); + analyseMetricsNode(pack, metricsCursor); + collectFileMeasures(packChildrenCursor, pack); + } + } + + private void collectFileMeasures(SMInputCursor fileCursor, JavaPackage pack) throws ParseException, XMLStreamException { + fileCursor.setFilter(SMFilterFactory.getElementOnlyFilter("file")); + while (fileCursor.getNext() != null) { + if (fileCursor.asEvent().isStartElement()) { + String classKey = extractClassName(fileCursor.getAttrValue("name")); + if (classKey != null) { + SMInputCursor fileChildrenCursor = fileCursor.childCursor(new SimpleFilter(SMEvent.START_ELEMENT)); + // cursor should be on the metrics element + if (canBeIncludedInFileMetrics(fileChildrenCursor)) { + JavaFile resource = new JavaFile(pack.getKey(), classKey, false); + analyseMetricsNode(resource, fileChildrenCursor); + + // cursor should be now on the line cursor + saveHitsData(resource, fileChildrenCursor); + } + } + } + } + } + + private void saveHitsData(Resource resource, SMInputCursor lineCursor) throws ParseException, XMLStreamException { + lineHitsBuilder.clear(); + branchHitsBuilder.clear(); + boolean hasBranches = false; + + while (lineCursor.getNext() != null) { + // skip class elements on format 2_3_2 + if (lineCursor.getLocalName().equals("class")) { + continue; + } + final String lineId = lineCursor.getAttrValue("num"); + int hits; + String count = lineCursor.getAttrValue("count"); + if (StringUtils.isBlank(count)) { + int trueCount = (int) ParsingUtils.parseNumber(lineCursor.getAttrValue("truecount")); + int falseCount = (int) ParsingUtils.parseNumber(lineCursor.getAttrValue("falsecount")); + hits = trueCount + falseCount; + String branchHits; + if (trueCount > 0 && falseCount > 0) { + branchHits = "100%"; + } else if (trueCount == 0 && falseCount == 0) { + branchHits = "0%"; + } else { + branchHits = "50%"; + } + branchHitsBuilder.add(lineId, branchHits); + hasBranches = true; + + } else { + hits = (int) ParsingUtils.parseNumber(count); + } + lineHitsBuilder.add(lineId, hits); + } + context.saveMeasure(resource, lineHitsBuilder.build()); + if (hasBranches) { + context.saveMeasure(resource, branchHitsBuilder.build()); + } + } + + private boolean canBeIncludedInFileMetrics(SMInputCursor metricsCursor) throws ParseException, XMLStreamException { + // skip class elements on 1.x xml format + while (metricsCursor.getNext() != null && metricsCursor.getLocalName().equals("class")) { + } + return ParsingUtils.parseNumber(metricsCursor.getAttrValue("elements")) > 0; + } + + protected String extractClassName(String filename) { + if (filename != null) { + filename = StringUtils.replaceChars(filename, '\\', '/'); + filename = StringUtils.substringBeforeLast(filename, ".java"); + if (filename.indexOf('/') >= 0) { + filename = StringUtils.substringAfterLast(filename, "/"); + } + } + return filename; + } }
\ No newline at end of file diff --git a/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverMavenPluginHandlerTest.java b/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverMavenPluginHandlerTest.java index f18a233d45f..3b63d6a2b6b 100644 --- a/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverMavenPluginHandlerTest.java +++ b/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverMavenPluginHandlerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverPluginTest.java b/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverPluginTest.java index ae55bda063f..9efcb86c256 100644 --- a/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverPluginTest.java +++ b/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverPluginTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverSensorTest.java b/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverSensorTest.java index 6b9b2744be8..06003ff2baf 100644 --- a/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverSensorTest.java +++ b/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverSensorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/XmlReportParserTest.java b/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/XmlReportParserTest.java index 1424830d956..8219edd4489 100644 --- a/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/XmlReportParserTest.java +++ b/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/XmlReportParserTest.java @@ -1,150 +1,150 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.clover;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.sonar.api.batch.SensorContext;
-import org.sonar.api.measures.CoreMetrics;
-import org.sonar.api.resources.JavaFile;
-import org.sonar.api.resources.JavaPackage;
-import org.sonar.api.resources.Resource;
-import org.sonar.api.test.IsMeasure;
-import org.sonar.test.TestUtils;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.text.ParseException;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.anyDouble;
-import static org.mockito.Matchers.anyObject;
-import static org.mockito.Matchers.argThat;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.*;
-
-public class XmlReportParserTest {
-
- private XmlReportParser reportParser;
- private SensorContext context;
- private File xmlFile;
-
- @Before
- public void before() throws URISyntaxException {
- xmlFile = TestUtils.getResource(getClass(), "clover.xml");
- context = mock(SensorContext.class);
- reportParser = new XmlReportParser(context);
- }
-
- @Test
- public void collectProjectMeasures() throws Exception {
- reportParser.collect(xmlFile);
- verify(context).saveMeasure(null, CoreMetrics.COVERAGE, 5.0); // coveredelements / elements
-
- verify(context).saveMeasure(null, CoreMetrics.LINE_COVERAGE, 6.63); // covered methods + covered statements / methods + statements
- verify(context).saveMeasure(null, CoreMetrics.LINES_TO_COVER, 196.0);
- verify(context).saveMeasure(null, CoreMetrics.UNCOVERED_LINES, 183.0); // covered methods + covered statements
-
- verify(context).saveMeasure(null, CoreMetrics.BRANCH_COVERAGE, 0.0); // covered conditionals / conditionals
- verify(context).saveMeasure(null, CoreMetrics.CONDITIONS_TO_COVER, 64.0); // covered_conditionals
- verify(context).saveMeasure(null, CoreMetrics.UNCOVERED_CONDITIONS, 64.0);
- }
-
- @Test
- public void collectPackageMeasures() throws ParseException {
- reportParser.collect(xmlFile);
- final JavaPackage pac = new JavaPackage("org.sonar.samples");
- verify(context).saveMeasure(pac, CoreMetrics.COVERAGE, 28.89);
-
- // lines
- verify(context).saveMeasure(pac, CoreMetrics.LINE_COVERAGE, 28.89);
- verify(context).saveMeasure(pac, CoreMetrics.LINES_TO_COVER, 45.0);
- verify(context).saveMeasure(pac, CoreMetrics.UNCOVERED_LINES, 32.0);
-
- // no conditions
- verify(context, never()).saveMeasure(eq(pac), eq(CoreMetrics.BRANCH_COVERAGE), anyDouble());
- verify(context, never()).saveMeasure(eq(pac), eq(CoreMetrics.CONDITIONS_TO_COVER), anyDouble());
- verify(context, never()).saveMeasure(eq(pac), eq(CoreMetrics.UNCOVERED_CONDITIONS), anyDouble());
- }
-
- @Test
- public void parseClaver232Format() throws ParseException, URISyntaxException {
- reportParser.collect(TestUtils.getResource(getClass(), "clover_2_3_2.xml"));
- verify(context).saveMeasure(new JavaPackage("org.sonar.squid.sensors"), CoreMetrics.COVERAGE, 94.87);
- }
-
-// @Test
-// public void doNotSaveInnerClassMeasures() throws ParseException, URISyntaxException {
-// collector.collect(xmlFile);
-//
-// verify(context, never()).saveMeasure(
-// eq(new JavaFile("ch.hortis.sonar.model.MetricMetaInf.Classes")), eq(CoreMetrics.COVERAGE), anyDouble());
-// verify(context).saveMeasure(
-// eq(new JavaFile("ch.hortis.sonar.model.MetricMetaInf")), eq(CoreMetrics.COVERAGE), anyDouble());
-// }
-
- @Test
- public void collectFileMeasures() throws Exception {
- reportParser.collect(xmlFile);
-
- final JavaFile file = new JavaFile("org.sonar.samples.ClassUnderTest");
- verify(context).saveMeasure(file, CoreMetrics.COVERAGE, 100.0);
-
- verify(context).saveMeasure(file, CoreMetrics.LINE_COVERAGE, 100.0);
- verify(context).saveMeasure(file, CoreMetrics.LINES_TO_COVER, 5.0);
- verify(context).saveMeasure(file, CoreMetrics.UNCOVERED_LINES, 0.0);
-
- // no conditions
- verify(context, never()).saveMeasure(eq(file), eq(CoreMetrics.BRANCH_COVERAGE), anyDouble());
- verify(context, never()).saveMeasure(eq(file), eq(CoreMetrics.CONDITIONS_TO_COVER), anyDouble());
- verify(context, never()).saveMeasure(eq(file), eq(CoreMetrics.UNCOVERED_CONDITIONS), anyDouble());
- }
-
- @Test
- public void collectFileHitsData() throws Exception {
- reportParser.collect(xmlFile);
- verify(context).saveMeasure(eq(new JavaFile("org.sonar.samples.ClassUnderTest")), argThat(new IsMeasure(CoreMetrics.COVERAGE_LINE_HITS_DATA, "4=1;5=1;6=1;8=1;9=1")));
- }
-
- @Test
- public void clover1FileNameContainsPath() {
- XmlReportParser reportParser = new XmlReportParser(context);
- assertEquals("SampleClass", reportParser.extractClassName("C:\\src\\main\\java\\org\\sonar\\samples\\SampleClass.java"));
-
- assertEquals("SampleClass", reportParser.extractClassName("/src/main/java/org/sonar/samples/SampleClass.java"));
- }
-
- @Test
- public void clover2FileNameDoesNotContainPath() {
- XmlReportParser reportParser = new XmlReportParser(context);
- assertEquals("SampleClass", reportParser.extractClassName("SampleClass.java"));
- }
-
- @Test
- public void coverageShouldBeZeroWhenNoElements() throws URISyntaxException {
- File xmlFile = TestUtils.getResource(getClass(), "coverageShouldBeZeroWhenNoElements/clover.xml");
- context = mock(SensorContext.class);
- XmlReportParser reportParser = new XmlReportParser(context);
- reportParser.collect(xmlFile);
- verify(context, never()).saveMeasure((Resource) anyObject(), eq(CoreMetrics.COVERAGE), anyDouble());
- verify(context, never()).saveMeasure((Resource) anyObject(), eq(CoreMetrics.LINE_COVERAGE), anyDouble());
- verify(context, never()).saveMeasure((Resource) anyObject(), eq(CoreMetrics.BRANCH_COVERAGE), anyDouble());
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.clover; + +import org.junit.Before; +import org.junit.Test; +import org.sonar.api.batch.SensorContext; +import org.sonar.api.measures.CoreMetrics; +import org.sonar.api.resources.JavaFile; +import org.sonar.api.resources.JavaPackage; +import org.sonar.api.resources.Resource; +import org.sonar.api.test.IsMeasure; +import org.sonar.test.TestUtils; + +import java.io.File; +import java.net.URISyntaxException; +import java.text.ParseException; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Matchers.anyDouble; +import static org.mockito.Matchers.anyObject; +import static org.mockito.Matchers.argThat; +import static org.mockito.Matchers.eq; +import static org.mockito.Mockito.*; + +public class XmlReportParserTest { + + private XmlReportParser reportParser; + private SensorContext context; + private File xmlFile; + + @Before + public void before() throws URISyntaxException { + xmlFile = TestUtils.getResource(getClass(), "clover.xml"); + context = mock(SensorContext.class); + reportParser = new XmlReportParser(context); + } + + @Test + public void collectProjectMeasures() throws Exception { + reportParser.collect(xmlFile); + verify(context).saveMeasure(null, CoreMetrics.COVERAGE, 5.0); // coveredelements / elements + + verify(context).saveMeasure(null, CoreMetrics.LINE_COVERAGE, 6.63); // covered methods + covered statements / methods + statements + verify(context).saveMeasure(null, CoreMetrics.LINES_TO_COVER, 196.0); + verify(context).saveMeasure(null, CoreMetrics.UNCOVERED_LINES, 183.0); // covered methods + covered statements + + verify(context).saveMeasure(null, CoreMetrics.BRANCH_COVERAGE, 0.0); // covered conditionals / conditionals + verify(context).saveMeasure(null, CoreMetrics.CONDITIONS_TO_COVER, 64.0); // covered_conditionals + verify(context).saveMeasure(null, CoreMetrics.UNCOVERED_CONDITIONS, 64.0); + } + + @Test + public void collectPackageMeasures() throws ParseException { + reportParser.collect(xmlFile); + final JavaPackage pac = new JavaPackage("org.sonar.samples"); + verify(context).saveMeasure(pac, CoreMetrics.COVERAGE, 28.89); + + // lines + verify(context).saveMeasure(pac, CoreMetrics.LINE_COVERAGE, 28.89); + verify(context).saveMeasure(pac, CoreMetrics.LINES_TO_COVER, 45.0); + verify(context).saveMeasure(pac, CoreMetrics.UNCOVERED_LINES, 32.0); + + // no conditions + verify(context, never()).saveMeasure(eq(pac), eq(CoreMetrics.BRANCH_COVERAGE), anyDouble()); + verify(context, never()).saveMeasure(eq(pac), eq(CoreMetrics.CONDITIONS_TO_COVER), anyDouble()); + verify(context, never()).saveMeasure(eq(pac), eq(CoreMetrics.UNCOVERED_CONDITIONS), anyDouble()); + } + + @Test + public void parseClaver232Format() throws ParseException, URISyntaxException { + reportParser.collect(TestUtils.getResource(getClass(), "clover_2_3_2.xml")); + verify(context).saveMeasure(new JavaPackage("org.sonar.squid.sensors"), CoreMetrics.COVERAGE, 94.87); + } + +// @Test +// public void doNotSaveInnerClassMeasures() throws ParseException, URISyntaxException { +// collector.collect(xmlFile); +// +// verify(context, never()).saveMeasure( +// eq(new JavaFile("ch.hortis.sonar.model.MetricMetaInf.Classes")), eq(CoreMetrics.COVERAGE), anyDouble()); +// verify(context).saveMeasure( +// eq(new JavaFile("ch.hortis.sonar.model.MetricMetaInf")), eq(CoreMetrics.COVERAGE), anyDouble()); +// } + + @Test + public void collectFileMeasures() throws Exception { + reportParser.collect(xmlFile); + + final JavaFile file = new JavaFile("org.sonar.samples.ClassUnderTest"); + verify(context).saveMeasure(file, CoreMetrics.COVERAGE, 100.0); + + verify(context).saveMeasure(file, CoreMetrics.LINE_COVERAGE, 100.0); + verify(context).saveMeasure(file, CoreMetrics.LINES_TO_COVER, 5.0); + verify(context).saveMeasure(file, CoreMetrics.UNCOVERED_LINES, 0.0); + + // no conditions + verify(context, never()).saveMeasure(eq(file), eq(CoreMetrics.BRANCH_COVERAGE), anyDouble()); + verify(context, never()).saveMeasure(eq(file), eq(CoreMetrics.CONDITIONS_TO_COVER), anyDouble()); + verify(context, never()).saveMeasure(eq(file), eq(CoreMetrics.UNCOVERED_CONDITIONS), anyDouble()); + } + + @Test + public void collectFileHitsData() throws Exception { + reportParser.collect(xmlFile); + verify(context).saveMeasure(eq(new JavaFile("org.sonar.samples.ClassUnderTest")), argThat(new IsMeasure(CoreMetrics.COVERAGE_LINE_HITS_DATA, "4=1;5=1;6=1;8=1;9=1"))); + } + + @Test + public void clover1FileNameContainsPath() { + XmlReportParser reportParser = new XmlReportParser(context); + assertEquals("SampleClass", reportParser.extractClassName("C:\\src\\main\\java\\org\\sonar\\samples\\SampleClass.java")); + + assertEquals("SampleClass", reportParser.extractClassName("/src/main/java/org/sonar/samples/SampleClass.java")); + } + + @Test + public void clover2FileNameDoesNotContainPath() { + XmlReportParser reportParser = new XmlReportParser(context); + assertEquals("SampleClass", reportParser.extractClassName("SampleClass.java")); + } + + @Test + public void coverageShouldBeZeroWhenNoElements() throws URISyntaxException { + File xmlFile = TestUtils.getResource(getClass(), "coverageShouldBeZeroWhenNoElements/clover.xml"); + context = mock(SensorContext.class); + XmlReportParser reportParser = new XmlReportParser(context); + reportParser.collect(xmlFile); + verify(context, never()).saveMeasure((Resource) anyObject(), eq(CoreMetrics.COVERAGE), anyDouble()); + verify(context, never()).saveMeasure((Resource) anyObject(), eq(CoreMetrics.LINE_COVERAGE), anyDouble()); + verify(context, never()).saveMeasure((Resource) anyObject(), eq(CoreMetrics.BRANCH_COVERAGE), anyDouble()); + } +} diff --git a/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaMavenPluginHandler.java b/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaMavenPluginHandler.java index 8bf085f5325..63b63a886fd 100644 --- a/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaMavenPluginHandler.java +++ b/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaMavenPluginHandler.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaPlugin.java b/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaPlugin.java index e758da4ee2a..11f3f1ab067 100644 --- a/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaPlugin.java +++ b/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaPlugin.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaSensor.java b/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaSensor.java index 1cb6061d8ab..f620b037d9d 100644 --- a/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaSensor.java +++ b/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaSensor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/api/AbstractCoberturaParser.java b/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/api/AbstractCoberturaParser.java index 05d289cbf86..bd095688fb0 100644 --- a/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/api/AbstractCoberturaParser.java +++ b/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/api/AbstractCoberturaParser.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/api/CoberturaUtils.java b/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/api/CoberturaUtils.java index 891b76b6cec..129d1ac4b91 100644 --- a/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/api/CoberturaUtils.java +++ b/plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/api/CoberturaUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaMavenPluginHandlerTest.java b/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaMavenPluginHandlerTest.java index 0dd64edf611..8a81a94f843 100644 --- a/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaMavenPluginHandlerTest.java +++ b/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaMavenPluginHandlerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaPluginTest.java b/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaPluginTest.java index 02b6f0a1a51..803e9f3bb10 100644 --- a/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaPluginTest.java +++ b/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaPluginTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaSensorTest.java b/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaSensorTest.java index 4a3a5a21b7e..865aece0c53 100644 --- a/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaSensorTest.java +++ b/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaSensorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/api/CoberturaUtilsTest.java b/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/api/CoberturaUtilsTest.java index e657a9a2c19..59192a3a258 100644 --- a/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/api/CoberturaUtilsTest.java +++ b/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/api/CoberturaUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/Clouds.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/Clouds.java index f0b319604b2..946fb6a0b63 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/Clouds.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/Clouds.java @@ -1,42 +1,42 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.core.clouds;
-
-import org.sonar.api.resources.Resource;
-import org.sonar.api.web.GwtPage;
-import org.sonar.api.web.NavigationSection;
-import org.sonar.api.web.ResourceScope;
-import org.sonar.api.web.UserRole;
-import org.sonar.plugins.core.clouds.client.GwtClouds;
-
-@NavigationSection(NavigationSection.RESOURCE)
-@ResourceScope({Resource.SCOPE_SET, Resource.SCOPE_SPACE})
-@UserRole(UserRole.USER)
-public class Clouds extends GwtPage {
-
- public String getGwtId() {
- return GwtClouds.GWT_ID;
- }
-
- public String getTitle() {
- return "Clouds";
- }
-
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.core.clouds; + +import org.sonar.api.resources.Resource; +import org.sonar.api.web.GwtPage; +import org.sonar.api.web.NavigationSection; +import org.sonar.api.web.ResourceScope; +import org.sonar.api.web.UserRole; +import org.sonar.plugins.core.clouds.client.GwtClouds; + +@NavigationSection(NavigationSection.RESOURCE) +@ResourceScope({Resource.SCOPE_SET, Resource.SCOPE_SPACE}) +@UserRole(UserRole.USER) +public class Clouds extends GwtPage { + + public String getGwtId() { + return GwtClouds.GWT_ID; + } + + public String getTitle() { + return "Clouds"; + } + }
\ No newline at end of file diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/Calculator.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/Calculator.java index 5202b4feebc..c63e667f989 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/Calculator.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/Calculator.java @@ -1,119 +1,119 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.core.clouds.client;
-
-import org.sonar.plugins.core.clouds.client.model.Color;
-
-public class Calculator {
-
- private Float minValue;
- private Float maxValue;
- private Float minPercent;
- private Float maxPercent;
-
- public Calculator(Float minPercent, Float maxPercent) {
- this.minPercent = minPercent;
- this.maxPercent = maxPercent;
- }
-
- public void updateMaxAndMin(Float value){
- updateMaxValue(value);
- updateMinValue(value);
- }
-
- public Integer getFontSizePercent(Integer value) {
- float divisor = getMaxValue() - getMinValue();
- float size = getMinPercent();
- if (divisor != 0) {
- float multiplier = (getMaxPercent() - getMinPercent()) / divisor;
- size = getMinPercent() +
- ((getMaxValue() - (getMaxValue() - (value - getMinValue()))) * multiplier);
- }
- return Float.valueOf(size).intValue();
- }
-
- public String getFontColor(float value) {
- float interval = (getMaxPercent() - getMinPercent()) / 2f;
- float mean = (getMinPercent() + getMaxPercent()) / 2f;
-
- Color minColor = new Color(191/255f, 0f, 21/255f); // red
- Color meanColor = new Color(77/255f, 5/255f, 177/255f); // purple
- Color maxColor = new Color(23/255f, 96/255f, 191/255f); // blue
-
- Color color;
- if (value > mean) {
- float valuePercent = ((value - mean) / interval) * 100f;
- color = mixColorWith(maxColor, meanColor, valuePercent);
- } else {
- float valuePercent = ((mean - value) / interval) * 100f;
- color = mixColorWith(minColor, meanColor, valuePercent);
- }
-
- int r = Float.valueOf(color.getRed()* 255f).intValue();
- int g = Float.valueOf(color.getGreen() * 255f).intValue();
- int b = Float.valueOf(color.getBlue() * 255f).intValue();
-
- return ("rgb("+ r +","+ g +","+ b +")");
- }
-
- private Color mixColorWith(Color currentColor, Color mask, float value){
- float opacity = value / 100f;
-
- float r = (currentColor.getRed() * opacity) + (mask.getRed() * (1f - opacity));
- float g = (currentColor.getGreen() * opacity) + (mask.getGreen() * (1f - opacity));
- float b = (currentColor.getBlue() * opacity) + (mask.getBlue() * (1f - opacity));
-
- return new Color(r, g, b);
- }
-
-
- private void updateMaxValue(Float value) {
- if (maxValue == null) {
- maxValue = value;
- } else if (value > maxValue) {
- maxValue = value;
- }
- }
-
- private void updateMinValue(Float value) {
- if (minValue == null) {
- minValue = value;
- } else if (value < minValue) {
- minValue = value;
- }
- }
-
-
- public Float getMinValue() {
- return minValue;
- }
-
- public Float getMaxValue() {
- return maxValue;
- }
-
- public Float getMinPercent() {
- return minPercent;
- }
-
- public Float getMaxPercent() {
- return maxPercent;
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.core.clouds.client; + +import org.sonar.plugins.core.clouds.client.model.Color; + +public class Calculator { + + private Float minValue; + private Float maxValue; + private Float minPercent; + private Float maxPercent; + + public Calculator(Float minPercent, Float maxPercent) { + this.minPercent = minPercent; + this.maxPercent = maxPercent; + } + + public void updateMaxAndMin(Float value){ + updateMaxValue(value); + updateMinValue(value); + } + + public Integer getFontSizePercent(Integer value) { + float divisor = getMaxValue() - getMinValue(); + float size = getMinPercent(); + if (divisor != 0) { + float multiplier = (getMaxPercent() - getMinPercent()) / divisor; + size = getMinPercent() + + ((getMaxValue() - (getMaxValue() - (value - getMinValue()))) * multiplier); + } + return Float.valueOf(size).intValue(); + } + + public String getFontColor(float value) { + float interval = (getMaxPercent() - getMinPercent()) / 2f; + float mean = (getMinPercent() + getMaxPercent()) / 2f; + + Color minColor = new Color(191/255f, 0f, 21/255f); // red + Color meanColor = new Color(77/255f, 5/255f, 177/255f); // purple + Color maxColor = new Color(23/255f, 96/255f, 191/255f); // blue + + Color color; + if (value > mean) { + float valuePercent = ((value - mean) / interval) * 100f; + color = mixColorWith(maxColor, meanColor, valuePercent); + } else { + float valuePercent = ((mean - value) / interval) * 100f; + color = mixColorWith(minColor, meanColor, valuePercent); + } + + int r = Float.valueOf(color.getRed()* 255f).intValue(); + int g = Float.valueOf(color.getGreen() * 255f).intValue(); + int b = Float.valueOf(color.getBlue() * 255f).intValue(); + + return ("rgb("+ r +","+ g +","+ b +")"); + } + + private Color mixColorWith(Color currentColor, Color mask, float value){ + float opacity = value / 100f; + + float r = (currentColor.getRed() * opacity) + (mask.getRed() * (1f - opacity)); + float g = (currentColor.getGreen() * opacity) + (mask.getGreen() * (1f - opacity)); + float b = (currentColor.getBlue() * opacity) + (mask.getBlue() * (1f - opacity)); + + return new Color(r, g, b); + } + + + private void updateMaxValue(Float value) { + if (maxValue == null) { + maxValue = value; + } else if (value > maxValue) { + maxValue = value; + } + } + + private void updateMinValue(Float value) { + if (minValue == null) { + minValue = value; + } else if (value < minValue) { + minValue = value; + } + } + + + public Float getMinValue() { + return minValue; + } + + public Float getMaxValue() { + return maxValue; + } + + public Float getMinPercent() { + return minPercent; + } + + public Float getMaxPercent() { + return maxPercent; + } +} diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/GwtClouds.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/GwtClouds.java index 4770f3d64ba..9b07b53d915 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/GwtClouds.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/GwtClouds.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/model/CloudElement.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/model/CloudElement.java index 60f928d8f3e..08bcac836b0 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/model/CloudElement.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/model/CloudElement.java @@ -1,53 +1,53 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.core.clouds.client.model;
-
-import org.sonar.api.web.gwt.client.webservices.Resource;
-
-
-public class CloudElement implements Comparable<CloudElement> {
-
- private Integer fontSize;
- private Float fontColor;
- private Resource resource;
-
- public CloudElement(Resource resource, Integer fontSize, Float fontColor) {
- this.resource = resource;
- this.fontSize = fontSize;
- this.fontColor = fontColor;
- }
-
- public Resource getResource() {
- return resource;
- }
-
- public Integer getFontSize() {
- return fontSize;
- }
-
- public Float getFontColor() {
- return fontColor;
- }
-
- public int compareTo(CloudElement cloudElement) {
- return resource.getName().compareTo(cloudElement.getResource().getName());
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.core.clouds.client.model; + +import org.sonar.api.web.gwt.client.webservices.Resource; + + +public class CloudElement implements Comparable<CloudElement> { + + private Integer fontSize; + private Float fontColor; + private Resource resource; + + public CloudElement(Resource resource, Integer fontSize, Float fontColor) { + this.resource = resource; + this.fontSize = fontSize; + this.fontColor = fontColor; + } + + public Resource getResource() { + return resource; + } + + public Integer getFontSize() { + return fontSize; + } + + public Float getFontColor() { + return fontColor; + } + + public int compareTo(CloudElement cloudElement) { + return resource.getName().compareTo(cloudElement.getResource().getName()); + } + +} diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/model/Color.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/model/Color.java index 598c470f207..d3f8f6f988e 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/model/Color.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/model/Color.java @@ -1,50 +1,50 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.core.clouds.client.model;
-
-public class Color {
-
- private float red;
- private float green;
- private float blue;
-
- public Color(float red, float green, float blue) {
- this.red = red;
- this.green = green;
- this.blue = blue;
- }
-
- public float getRed() {
- return red;
- }
-
- public float getGreen() {
- return green;
- }
-
- public float getBlue() {
- return blue;
- }
-
- @Override
- public String toString() {
- return ("red : "+ red + ", green : "+ green + ", blue : "+ blue );
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.core.clouds.client.model; + +public class Color { + + private float red; + private float green; + private float blue; + + public Color(float red, float green, float blue) { + this.red = red; + this.green = green; + this.blue = blue; + } + + public float getRed() { + return red; + } + + public float getGreen() { + return green; + } + + public float getBlue() { + return blue; + } + + @Override + public String toString() { + return ("red : "+ red + ", green : "+ green + ", blue : "+ blue ); + } +} diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/widget/ClassCloudsWidget.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/widget/ClassCloudsWidget.java index 49c28d87656..d3233fd8519 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/widget/ClassCloudsWidget.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/widget/ClassCloudsWidget.java @@ -1,146 +1,146 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.core.clouds.client.widget;
-
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.ui.*;
-import org.sonar.api.web.gwt.client.Utils;
-import org.sonar.api.web.gwt.client.webservices.Measure;
-import org.sonar.api.web.gwt.client.webservices.Resource;
-import org.sonar.api.web.gwt.client.webservices.WSMetrics.Metric;
-import org.sonar.api.web.gwt.client.widgets.LoadingLabel;
-import org.sonar.plugins.core.clouds.client.Calculator;
-import org.sonar.plugins.core.clouds.client.GwtClouds;
-import org.sonar.plugins.core.clouds.client.model.CloudElement;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-public class ClassCloudsWidget extends Composite {
-
- private Panel main;
- private Metric sizeMetric;
- private List<Resource> resources;
- private float minSizePercent = 60f;
- private float maxSizePercent = 240f;
-
- private Calculator sizeCalculator = new Calculator(minSizePercent, maxSizePercent);
- private Calculator colorCalculator = new Calculator(0f, 100f);
-
- public ClassCloudsWidget(List<Resource> resources, Metric sizeMetric) {
- this.sizeMetric = sizeMetric;
- this.main = new FlowPanel();
- this.resources = resources;
- initWidget(main);
- }
-
- public Metric getSizeMetric() {
- return sizeMetric;
- }
-
- public void generateCloud(Metric colorMetric) {
- main.clear();
- LoadingLabel loading = new LoadingLabel();
- main.add(loading);
- if (colorMetric.equals(colorMetric)) {
- List<CloudElement> cloudElements = getCloudElements(resources, colorMetric);
- createClouds(cloudElements, colorMetric);
- }
- main.remove(loading);
- }
-
- private List<CloudElement> getCloudElements(List<Resource> resources, Metric colorMetric) {
- List<CloudElement> tagList = new ArrayList<CloudElement>();
- for (Resource resource : resources) {
- Measure sizeMeasure = getMeasure(resource, sizeMetric);
- Measure colorMeasure = getMeasure(resource, colorMetric);
-
- if (sizeMeasure != null && colorMeasure != null) {
- Integer size = getMeasureValue(sizeMeasure.getValue());
- float color = colorMeasure.getValue().floatValue();
- tagList.add(new CloudElement(resource, size, color));
- sizeCalculator.updateMaxAndMin(Float.valueOf(size.toString()));
- }
- }
- Collections.sort(tagList);
- return tagList;
- }
-
- private Integer getMeasureValue(Double value) {
- Float floatValue = (value.floatValue() * 100.0f);
- return floatValue.intValue();
- }
-
- private Measure getMeasure(Resource project, Metric metricToFind) {
- return project.getMeasure(metricToFind);
- }
-
- private void createClouds(List<CloudElement> cloudElements, Metric colorMetric) {
- for (CloudElement tag : cloudElements) {
- HTML className = new HTML(
- "<span style=\"font-size:" + Integer.toString(sizeCalculator.getFontSizePercent(tag.getFontSize())) +
- "%; color:" + colorCalculator.getFontColor(tag.getFontColor()) + "\" >" +
- tag.getResource().getName() + "</span>\n");
- className.setStyleName("inline");
-
- Hyperlink link = createLink(tag, colorMetric);
- link.setHTML(className.getHTML());
- main.add(link);
- }
- }
-
- private Hyperlink createLink(CloudElement tag, final Metric colorMetric) {
- Hyperlink link = new Hyperlink();
- link.setStyleName("tag inline");
- String tooltip = getTooltip(tag.getResource(), colorMetric);
- link.getElement().setAttribute("title", tooltip);
- link.getElement().setAttribute("rel", tooltip);
-
- String sizeCss = Float.toString(maxSizePercent / 100f) + "em";
- link.setHeight(sizeCss);
- final Resource clickResource = tag.getResource();
- link.addClickHandler(new ClickHandler() {
- public void onClick(final ClickEvent event) {
- if (clickResource.getCopy() != null) {
- Window.Location.assign(Utils.getServerUrl() + "/plugins/resource/" + clickResource.getCopy() + "?page=" + GwtClouds.GWT_ID);
- } else {
- Utils.openResourcePopup(clickResource, colorMetric.getKey());
- }
- }
- });
-
- return link;
- }
-
- private String getTooltip(Resource resource, Metric colorMetric) {
- Measure sizeMeasure = getMeasure(resource, sizeMetric);
- String sizeMetricName = sizeMetric.getName();
- String sizeMetricValue = sizeMeasure.getFormattedValue();
-
- Measure colorMeasure = getMeasure(resource, colorMetric);
- String colorMetricName = colorMetric.getName();
- String colorMetricValue = colorMeasure.getFormattedValue();
-
- return resource.getName(true) + ", " + sizeMetricName + " : " + sizeMetricValue + ", " + colorMetricName + " : " + colorMetricValue;
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.core.clouds.client.widget; + +import com.google.gwt.event.dom.client.ClickEvent; +import com.google.gwt.event.dom.client.ClickHandler; +import com.google.gwt.user.client.Window; +import com.google.gwt.user.client.ui.*; +import org.sonar.api.web.gwt.client.Utils; +import org.sonar.api.web.gwt.client.webservices.Measure; +import org.sonar.api.web.gwt.client.webservices.Resource; +import org.sonar.api.web.gwt.client.webservices.WSMetrics.Metric; +import org.sonar.api.web.gwt.client.widgets.LoadingLabel; +import org.sonar.plugins.core.clouds.client.Calculator; +import org.sonar.plugins.core.clouds.client.GwtClouds; +import org.sonar.plugins.core.clouds.client.model.CloudElement; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public class ClassCloudsWidget extends Composite { + + private Panel main; + private Metric sizeMetric; + private List<Resource> resources; + private float minSizePercent = 60f; + private float maxSizePercent = 240f; + + private Calculator sizeCalculator = new Calculator(minSizePercent, maxSizePercent); + private Calculator colorCalculator = new Calculator(0f, 100f); + + public ClassCloudsWidget(List<Resource> resources, Metric sizeMetric) { + this.sizeMetric = sizeMetric; + this.main = new FlowPanel(); + this.resources = resources; + initWidget(main); + } + + public Metric getSizeMetric() { + return sizeMetric; + } + + public void generateCloud(Metric colorMetric) { + main.clear(); + LoadingLabel loading = new LoadingLabel(); + main.add(loading); + if (colorMetric.equals(colorMetric)) { + List<CloudElement> cloudElements = getCloudElements(resources, colorMetric); + createClouds(cloudElements, colorMetric); + } + main.remove(loading); + } + + private List<CloudElement> getCloudElements(List<Resource> resources, Metric colorMetric) { + List<CloudElement> tagList = new ArrayList<CloudElement>(); + for (Resource resource : resources) { + Measure sizeMeasure = getMeasure(resource, sizeMetric); + Measure colorMeasure = getMeasure(resource, colorMetric); + + if (sizeMeasure != null && colorMeasure != null) { + Integer size = getMeasureValue(sizeMeasure.getValue()); + float color = colorMeasure.getValue().floatValue(); + tagList.add(new CloudElement(resource, size, color)); + sizeCalculator.updateMaxAndMin(Float.valueOf(size.toString())); + } + } + Collections.sort(tagList); + return tagList; + } + + private Integer getMeasureValue(Double value) { + Float floatValue = (value.floatValue() * 100.0f); + return floatValue.intValue(); + } + + private Measure getMeasure(Resource project, Metric metricToFind) { + return project.getMeasure(metricToFind); + } + + private void createClouds(List<CloudElement> cloudElements, Metric colorMetric) { + for (CloudElement tag : cloudElements) { + HTML className = new HTML( + "<span style=\"font-size:" + Integer.toString(sizeCalculator.getFontSizePercent(tag.getFontSize())) + + "%; color:" + colorCalculator.getFontColor(tag.getFontColor()) + "\" >" + + tag.getResource().getName() + "</span>\n"); + className.setStyleName("inline"); + + Hyperlink link = createLink(tag, colorMetric); + link.setHTML(className.getHTML()); + main.add(link); + } + } + + private Hyperlink createLink(CloudElement tag, final Metric colorMetric) { + Hyperlink link = new Hyperlink(); + link.setStyleName("tag inline"); + String tooltip = getTooltip(tag.getResource(), colorMetric); + link.getElement().setAttribute("title", tooltip); + link.getElement().setAttribute("rel", tooltip); + + String sizeCss = Float.toString(maxSizePercent / 100f) + "em"; + link.setHeight(sizeCss); + final Resource clickResource = tag.getResource(); + link.addClickHandler(new ClickHandler() { + public void onClick(final ClickEvent event) { + if (clickResource.getCopy() != null) { + Window.Location.assign(Utils.getServerUrl() + "/plugins/resource/" + clickResource.getCopy() + "?page=" + GwtClouds.GWT_ID); + } else { + Utils.openResourcePopup(clickResource, colorMetric.getKey()); + } + } + }); + + return link; + } + + private String getTooltip(Resource resource, Metric colorMetric) { + Measure sizeMeasure = getMeasure(resource, sizeMetric); + String sizeMetricName = sizeMetric.getName(); + String sizeMetricValue = sizeMeasure.getFormattedValue(); + + Measure colorMeasure = getMeasure(resource, colorMetric); + String colorMetricName = colorMetric.getName(); + String colorMetricValue = colorMeasure.getFormattedValue(); + + return resource.getName(true) + ", " + sizeMetricName + " : " + sizeMetricValue + ", " + colorMetricName + " : " + colorMetricValue; + } +} diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/widget/TabWidget.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/widget/TabWidget.java index 7e9b571a4e0..ace9d651a01 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/widget/TabWidget.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/widget/TabWidget.java @@ -1,77 +1,77 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.core.clouds.client.widget;
-
-import com.google.gwt.event.logical.shared.SelectionEvent;
-import com.google.gwt.event.logical.shared.SelectionHandler;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.TabPanel;
-import com.google.gwt.user.client.ui.Widget;
-
-public class TabWidget extends Composite {
-
- private TabPanel tab = new TabPanel();
-
- private Integer nbTab;
- private final Integer defaultSelectedTabPosition = 0;
- private String selectedTabId;
- private int selectedIndex;
-
- public TabWidget(final SelectionHandler<Integer> selectionListener) {
- nbTab = 0;
- initWidget(tab);
- tab.setWidth("100%");
-
- tab.addSelectionHandler(new SelectionHandler<Integer>() {
- public void onSelection(SelectionEvent<Integer> event) {
- selectedTabId = tab.getWidget(event.getSelectedItem()).getElement().getId().replace("_tab_content", "");
- selectedIndex = event.getSelectedItem();
- selectionListener.onSelection(event);
- }
- });
-
- }
-
- public String getSelectedTabId() {
- return selectedTabId;
- }
-
- public Widget getSelectedWidget() {
- return tab.getWidget(selectedIndex);
- }
-
- public void addTab(Widget widget, String tabName, String id) {
- widget.getElement().setId(id + "_tab_content");
- tab.add(widget, createTabLabel(tabName, id));
- if (nbTab.equals(defaultSelectedTabPosition)) {
- tab.selectTab(defaultSelectedTabPosition);
- }
- nbTab++;
- }
-
- private Label createTabLabel(String tabName, String id) {
- Label tabLabel = new Label(tabName);
- tabLabel.getElement().setId(id + "_tab_title");
- tabLabel.addStyleName("tab_title");
- return tabLabel;
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.core.clouds.client.widget; + +import com.google.gwt.event.logical.shared.SelectionEvent; +import com.google.gwt.event.logical.shared.SelectionHandler; +import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.Label; +import com.google.gwt.user.client.ui.TabPanel; +import com.google.gwt.user.client.ui.Widget; + +public class TabWidget extends Composite { + + private TabPanel tab = new TabPanel(); + + private Integer nbTab; + private final Integer defaultSelectedTabPosition = 0; + private String selectedTabId; + private int selectedIndex; + + public TabWidget(final SelectionHandler<Integer> selectionListener) { + nbTab = 0; + initWidget(tab); + tab.setWidth("100%"); + + tab.addSelectionHandler(new SelectionHandler<Integer>() { + public void onSelection(SelectionEvent<Integer> event) { + selectedTabId = tab.getWidget(event.getSelectedItem()).getElement().getId().replace("_tab_content", ""); + selectedIndex = event.getSelectedItem(); + selectionListener.onSelection(event); + } + }); + + } + + public String getSelectedTabId() { + return selectedTabId; + } + + public Widget getSelectedWidget() { + return tab.getWidget(selectedIndex); + } + + public void addTab(Widget widget, String tabName, String id) { + widget.getElement().setId(id + "_tab_content"); + tab.add(widget, createTabLabel(tabName, id)); + if (nbTab.equals(defaultSelectedTabPosition)) { + tab.selectTab(defaultSelectedTabPosition); + } + nbTab++; + } + + private Label createTabLabel(String tabName, String id) { + Label tabLabel = new Label(tabName); + tabLabel.getElement().setId(id + "_tab_title"); + tabLabel.addStyleName("tab_title"); + return tabLabel; + } + +} diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/coverageviewer/CoverageViewerDefinition.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/coverageviewer/CoverageViewerDefinition.java index ba9231e491d..25989ae2d18 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/coverageviewer/CoverageViewerDefinition.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/coverageviewer/CoverageViewerDefinition.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/coverageviewer/client/CoveragePanel.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/coverageviewer/client/CoveragePanel.java index fabda63343e..b6b4833e243 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/coverageviewer/client/CoveragePanel.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/coverageviewer/client/CoveragePanel.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/coverageviewer/client/CoverageViewer.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/coverageviewer/client/CoverageViewer.java index 64752ddd7c0..61fa9cd8de4 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/coverageviewer/client/CoverageViewer.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/coverageviewer/client/CoverageViewer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/defaultsourceviewer/DefaultSourceViewer.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/defaultsourceviewer/DefaultSourceViewer.java index f400727cc55..df411bc8234 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/defaultsourceviewer/DefaultSourceViewer.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/defaultsourceviewer/DefaultSourceViewer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/defaultsourceviewer/client/GwtDefaultSourceViewer.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/defaultsourceviewer/client/GwtDefaultSourceViewer.java index fd9a929ae58..ad6101bb31c 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/defaultsourceviewer/client/GwtDefaultSourceViewer.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/defaultsourceviewer/client/GwtDefaultSourceViewer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/duplicationsviewer/DuplicationsViewerDefinition.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/duplicationsviewer/DuplicationsViewerDefinition.java index b679a144f76..17c7ffa95b2 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/duplicationsviewer/DuplicationsViewerDefinition.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/duplicationsviewer/DuplicationsViewerDefinition.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/duplicationsviewer/client/DuplicationsPanel.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/duplicationsviewer/client/DuplicationsPanel.java index 17f34ffa94b..24a8ff15392 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/duplicationsviewer/client/DuplicationsPanel.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/duplicationsviewer/client/DuplicationsPanel.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/duplicationsviewer/client/DuplicationsViewer.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/duplicationsviewer/client/DuplicationsViewer.java index 742e0975dc7..cf44ad88b25 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/duplicationsviewer/client/DuplicationsViewer.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/duplicationsviewer/client/DuplicationsViewer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/Hotspots.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/Hotspots.java index 35ec96f4e93..33a02af82cd 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/Hotspots.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/Hotspots.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/GwtHotspots.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/GwtHotspots.java index 5f9f3edae0c..c4cd86ba5dc 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/GwtHotspots.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/GwtHotspots.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/I18nConstants.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/I18nConstants.java index 4abcd8f2b12..ac1ebd5ab0d 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/I18nConstants.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/I18nConstants.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/AbstractHotspot.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/AbstractHotspot.java index f214e9f58d9..fa84185c303 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/AbstractHotspot.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/AbstractHotspot.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MetricHotspot.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MetricHotspot.java index 688cca9a08a..bb19d263d0c 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MetricHotspot.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MetricHotspot.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostBadlyDesignedFiles.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostBadlyDesignedFiles.java index e0400fa9eb9..df84f197d49 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostBadlyDesignedFiles.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostBadlyDesignedFiles.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostViolatedResources.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostViolatedResources.java index 6017b205060..d523bc13b4f 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostViolatedResources.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostViolatedResources.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostViolatedRules.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostViolatedRules.java index a8af7097d74..c58b018a6eb 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostViolatedRules.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostViolatedRules.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/TestsViewerDefinition.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/TestsViewerDefinition.java index 98bc53a0437..d1a60ecfc7c 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/TestsViewerDefinition.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/TestsViewerDefinition.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/client/TestsPanel.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/client/TestsPanel.java index ace2bb747a6..99f50ff1bc2 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/client/TestsPanel.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/client/TestsPanel.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/client/TestsViewer.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/client/TestsViewer.java index e6dfc2545e1..c757be379f6 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/client/TestsViewer.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/client/TestsViewer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/GwtPageSelector.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/GwtPageSelector.java index ccebcbf588c..1b7a29edd38 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/GwtPageSelector.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/GwtPageSelector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/I18nConstants.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/I18nConstants.java index 29e5d451445..90f2b6b2c0d 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/I18nConstants.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/I18nConstants.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/PageDef.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/PageDef.java index 048096e182f..7614a968b10 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/PageDef.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/PageDef.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/PagePanel.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/PagePanel.java index 6c28f8c4d6c..f944d47110e 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/PagePanel.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/PagePanel.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/PageSelector.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/PageSelector.java index 76b6226fc58..d15dccb52de 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/PageSelector.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/PageSelector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/ViolationsViewerDefinition.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/ViolationsViewerDefinition.java index 6b56ecc510c..0d35f3be818 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/ViolationsViewerDefinition.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/ViolationsViewerDefinition.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/I18nConstants.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/I18nConstants.java index 588852943e6..a63c0119574 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/I18nConstants.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/I18nConstants.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsPanel.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsPanel.java index 42b63b4b87f..d17edf1ca35 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsPanel.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsPanel.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java index 71f43a8d315..25d9d0abf1a 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java index 944fc9a572d..c56ab2192ef 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/batch/ExcludedResourceFilter.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/batch/ExcludedResourceFilter.java index 78365bce65c..f594d194835 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/batch/ExcludedResourceFilter.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/batch/ExcludedResourceFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/charts/DistributionAreaChart.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/charts/DistributionAreaChart.java index a0f597ee7fc..141d2eefd84 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/charts/DistributionAreaChart.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/charts/DistributionAreaChart.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/charts/DistributionBarChart.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/charts/DistributionBarChart.java index 6820283e795..58d2f3cbf85 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/charts/DistributionBarChart.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/charts/DistributionBarChart.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/charts/XradarChart.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/charts/XradarChart.java index 52cfebd7d3b..a615b357953 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/charts/XradarChart.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/charts/XradarChart.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/colorizers/JavaColorizerFormat.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/colorizers/JavaColorizerFormat.java index 45d6dc5d754..97b318199f5 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/colorizers/JavaColorizerFormat.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/colorizers/JavaColorizerFormat.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/metrics/UserManagedMetrics.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/metrics/UserManagedMetrics.java index 1f8d5a79a9e..6907cacf1ef 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/metrics/UserManagedMetrics.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/metrics/UserManagedMetrics.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/security/ApplyProjectRolesDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/security/ApplyProjectRolesDecorator.java index 2f9f2e74779..df4f66f9b04 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/security/ApplyProjectRolesDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/security/ApplyProjectRolesDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/security/RoleManager.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/security/RoleManager.java index 12bea9448a2..b03d92d07fd 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/security/RoleManager.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/security/RoleManager.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AbstractCoverageDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AbstractCoverageDecorator.java index d6bc7c87828..b548de52143 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AbstractCoverageDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AbstractCoverageDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AlertUtils.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AlertUtils.java index 4003f182106..d65f635424d 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AlertUtils.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AlertUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AsynchronousMeasuresSensor.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AsynchronousMeasuresSensor.java index aef6430ae37..e3f1a8c8726 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AsynchronousMeasuresSensor.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AsynchronousMeasuresSensor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/BranchCoverageDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/BranchCoverageDecorator.java index 4102ec48e18..ce4c61bd11a 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/BranchCoverageDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/BranchCoverageDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CheckAlertThresholds.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CheckAlertThresholds.java index 5b3be2accff..74e149a2f96 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CheckAlertThresholds.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CheckAlertThresholds.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CommentDensityDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CommentDensityDecorator.java index 0d9d579eb0c..a0c45da54d8 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CommentDensityDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CommentDensityDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CoverageDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CoverageDecorator.java index 559d61e3c43..4342742a87e 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CoverageDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CoverageDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/DirectoriesDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/DirectoriesDecorator.java index 5df50ef6028..a6c3e799b74 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/DirectoriesDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/DirectoriesDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/FilesDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/FilesDecorator.java index 124690647e9..5adb42ac84f 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/FilesDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/FilesDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/GenerateAlertEvents.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/GenerateAlertEvents.java index 62b8882fd2d..69b1ddccf1c 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/GenerateAlertEvents.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/GenerateAlertEvents.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/LineCoverageDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/LineCoverageDecorator.java index c97cc7784bf..5d8ed7bd57a 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/LineCoverageDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/LineCoverageDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ProfileSensor.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ProfileSensor.java index 661ea9f83d7..fb8787355d8 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ProfileSensor.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ProfileSensor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ProjectLinksSensor.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ProjectLinksSensor.java index e8170cbe4c6..c9ef33368dc 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ProjectLinksSensor.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ProjectLinksSensor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/UncoveredComplexityDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/UncoveredComplexityDecorator.java index 2af5b2f3d08..153b4d66a3d 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/UncoveredComplexityDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/UncoveredComplexityDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/UnitTestDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/UnitTestDecorator.java index 8bc670aec9d..c61a46bfec2 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/UnitTestDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/UnitTestDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/VersionEventsSensor.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/VersionEventsSensor.java index 97c572ed9f7..555d53e80b2 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/VersionEventsSensor.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/VersionEventsSensor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ViolationsDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ViolationsDecorator.java index 1b5d56d458e..1190432b1a9 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ViolationsDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ViolationsDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ViolationsDensityDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ViolationsDensityDecorator.java index d09a3be007f..b0d1577210c 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ViolationsDensityDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ViolationsDensityDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/WeightedViolationsDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/WeightedViolationsDecorator.java index fdffd293ac0..a0b636d1481 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/WeightedViolationsDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/WeightedViolationsDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/NewViolationsDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/NewViolationsDecorator.java index da1415f6fde..53b5f77f3a2 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/NewViolationsDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/NewViolationsDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TendencyAnalyser.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TendencyAnalyser.java index 4ec79fcdaae..89af173f676 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TendencyAnalyser.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TendencyAnalyser.java @@ -1,191 +1,191 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.core.timemachine;
-
-import java.util.List;
-
-public class TendencyAnalyser {
-
- public final static Integer TENDENCY_BIG_UP = 2;
- public final static Integer TENDENCY_UP = 1;
- public final static Integer TENDENCY_NEUTRAL = 0;
- public final static Integer TENDENCY_DOWN = -1;
- public final static Integer TENDENCY_BIG_DOWN = -2;
-
- public Integer analyseLevel(List<Double> values) {
- TendencyAnalyser.SlopeData slopeData = analyse(values);
- if (slopeData != null) {
- return slopeData.getLevel();
- }
- return null;
- }
-
- public SlopeData analyse(List<Double> values) {
- double sumY = 0.0;
- double sumX = 0.0;
- double sumYPower2 = 0.0;
- double sumXY = 0.0;
- double sumXPower2 = 0.0;
- int nbrPoints = 0;
- boolean nullValuesYList = true;
- int i = 0;
- for (Double p : values) {
- if (p != null) {
- nullValuesYList = false;
- //SumY calculation
- sumY += p;
- // sumYPower2 calculation
- sumYPower2 += p * p;
- //sumXY calculation
- sumXY += p * (i + 1);
- //SumX calculation
- sumX += (i + 1);
- //sumXPower2 calculation
- sumXPower2 += (i + 1) * (i + 1);
- //Point number calculation
- nbrPoints++;
- }
- i++;
- }
- // no tendency if null values or only 1 value
- if (nullValuesYList || nbrPoints == 1) {
- return null;
- }
- double n0 = (((nbrPoints) * (sumXY)) - ((sumX) * (sumY)));
- double d = (((nbrPoints) * (sumXPower2)) - ((sumX) * (sumX)));
- double n1 = (((sumY) * (sumXPower2)) - ((sumX) * (sumXY)));
-
- SlopeData result = new SlopeData();
-
- //yIntercept Calculation the value when X equals zero
- result.setYIntercept(n1 / d);
- // Slope Calculation
- if (n0 == 0d && d == 0d) {
- result.setSlope(0.0);
- } else {
- Double slope = n0 / d;
- if (Double.isNaN(slope) || Double.isInfinite(slope)) {
- result.setSlope(null);
- } else {
- result.setSlope(slope);
- }
- }
- result.setSumXPower2(sumXPower2);
- result.setSumXY(sumXY);
- result.setSumYPower2(sumYPower2);
-
- if (sumXPower2 == 0 || sumYPower2 == 0) {
- result.setCorrelationRate(0.0);
- } else {
- result.setCorrelationRate((sumXY) / (Math.sqrt(sumXPower2 * sumYPower2)));
- }
-
- return result;
- }
-
-
- static class SlopeData {
- private double sumXPower2;
- private double sumYPower2;
- private double sumXY;
- private double yIntercept; // not used today
- private Double slope;
- private Double correlationRate;
-
- public double getSumXPower2() {
- return sumXPower2;
- }
-
- public void setSumXPower2(double sumXPower2) {
- this.sumXPower2 = sumXPower2;
- }
-
- public double getSumYPower2() {
- return sumYPower2;
- }
-
- public void setSumYPower2(double sumYPower2) {
- this.sumYPower2 = sumYPower2;
- }
-
- public double getSumXY() {
- return sumXY;
- }
-
- public void setSumXY(double sumXY) {
- this.sumXY = sumXY;
- }
-
- public double getYIntercept() {
- return yIntercept;
- }
-
- public void setYIntercept(double yIntercept) {
- this.yIntercept = yIntercept;
- }
-
- public Double getSlope() {
- return slope;
- }
-
- public void setSlope(Double slope) {
- this.slope = slope;
- }
-
- public Double getCorrelationRate() {
- return correlationRate;
- }
-
- public void setCorrelationRate(Double correlationRate) {
- this.correlationRate = correlationRate;
- }
-
- public Integer getLevel() {
- double hSlope = 0.8;
- double nSlope = 0.2;
-
- double vHighCorcoef = 1.0;
- double modCorcoef = 0.69;
- Double correlationCoeff = getCorrelationRate();
- boolean vHCorCoefPos = (correlationCoeff > modCorcoef) && (correlationCoeff <= vHighCorcoef);
- boolean vHCorCoefNeg = (correlationCoeff < -modCorcoef) && (correlationCoeff >= -vHighCorcoef);
-
- if ((vHCorCoefPos || vHCorCoefNeg) && (slope >= hSlope)) {
- return TENDENCY_BIG_UP;
-
- } else if ((vHCorCoefPos || vHCorCoefNeg) && (slope <= -hSlope)) {
- return TENDENCY_BIG_DOWN;
-
- } else if ((vHCorCoefPos || vHCorCoefNeg) && ((slope >= nSlope) && (slope < hSlope))) {
- return TENDENCY_UP;
-
- } else if ((vHCorCoefPos || vHCorCoefNeg) && ((slope <= -nSlope) && (slope > -hSlope))) {
- return TENDENCY_DOWN;
-
- } else if ((vHCorCoefPos || vHCorCoefNeg) && ((slope < nSlope) || (slope > -nSlope))) {
- return TENDENCY_NEUTRAL;
-
- } else if (correlationCoeff == 0 && slope == 0 && !vHCorCoefPos && !vHCorCoefNeg) {
- return TENDENCY_NEUTRAL;
- }
- return null;
- }
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.core.timemachine; + +import java.util.List; + +public class TendencyAnalyser { + + public final static Integer TENDENCY_BIG_UP = 2; + public final static Integer TENDENCY_UP = 1; + public final static Integer TENDENCY_NEUTRAL = 0; + public final static Integer TENDENCY_DOWN = -1; + public final static Integer TENDENCY_BIG_DOWN = -2; + + public Integer analyseLevel(List<Double> values) { + TendencyAnalyser.SlopeData slopeData = analyse(values); + if (slopeData != null) { + return slopeData.getLevel(); + } + return null; + } + + public SlopeData analyse(List<Double> values) { + double sumY = 0.0; + double sumX = 0.0; + double sumYPower2 = 0.0; + double sumXY = 0.0; + double sumXPower2 = 0.0; + int nbrPoints = 0; + boolean nullValuesYList = true; + int i = 0; + for (Double p : values) { + if (p != null) { + nullValuesYList = false; + //SumY calculation + sumY += p; + // sumYPower2 calculation + sumYPower2 += p * p; + //sumXY calculation + sumXY += p * (i + 1); + //SumX calculation + sumX += (i + 1); + //sumXPower2 calculation + sumXPower2 += (i + 1) * (i + 1); + //Point number calculation + nbrPoints++; + } + i++; + } + // no tendency if null values or only 1 value + if (nullValuesYList || nbrPoints == 1) { + return null; + } + double n0 = (((nbrPoints) * (sumXY)) - ((sumX) * (sumY))); + double d = (((nbrPoints) * (sumXPower2)) - ((sumX) * (sumX))); + double n1 = (((sumY) * (sumXPower2)) - ((sumX) * (sumXY))); + + SlopeData result = new SlopeData(); + + //yIntercept Calculation the value when X equals zero + result.setYIntercept(n1 / d); + // Slope Calculation + if (n0 == 0d && d == 0d) { + result.setSlope(0.0); + } else { + Double slope = n0 / d; + if (Double.isNaN(slope) || Double.isInfinite(slope)) { + result.setSlope(null); + } else { + result.setSlope(slope); + } + } + result.setSumXPower2(sumXPower2); + result.setSumXY(sumXY); + result.setSumYPower2(sumYPower2); + + if (sumXPower2 == 0 || sumYPower2 == 0) { + result.setCorrelationRate(0.0); + } else { + result.setCorrelationRate((sumXY) / (Math.sqrt(sumXPower2 * sumYPower2))); + } + + return result; + } + + + static class SlopeData { + private double sumXPower2; + private double sumYPower2; + private double sumXY; + private double yIntercept; // not used today + private Double slope; + private Double correlationRate; + + public double getSumXPower2() { + return sumXPower2; + } + + public void setSumXPower2(double sumXPower2) { + this.sumXPower2 = sumXPower2; + } + + public double getSumYPower2() { + return sumYPower2; + } + + public void setSumYPower2(double sumYPower2) { + this.sumYPower2 = sumYPower2; + } + + public double getSumXY() { + return sumXY; + } + + public void setSumXY(double sumXY) { + this.sumXY = sumXY; + } + + public double getYIntercept() { + return yIntercept; + } + + public void setYIntercept(double yIntercept) { + this.yIntercept = yIntercept; + } + + public Double getSlope() { + return slope; + } + + public void setSlope(Double slope) { + this.slope = slope; + } + + public Double getCorrelationRate() { + return correlationRate; + } + + public void setCorrelationRate(Double correlationRate) { + this.correlationRate = correlationRate; + } + + public Integer getLevel() { + double hSlope = 0.8; + double nSlope = 0.2; + + double vHighCorcoef = 1.0; + double modCorcoef = 0.69; + Double correlationCoeff = getCorrelationRate(); + boolean vHCorCoefPos = (correlationCoeff > modCorcoef) && (correlationCoeff <= vHighCorcoef); + boolean vHCorCoefNeg = (correlationCoeff < -modCorcoef) && (correlationCoeff >= -vHighCorcoef); + + if ((vHCorCoefPos || vHCorCoefNeg) && (slope >= hSlope)) { + return TENDENCY_BIG_UP; + + } else if ((vHCorCoefPos || vHCorCoefNeg) && (slope <= -hSlope)) { + return TENDENCY_BIG_DOWN; + + } else if ((vHCorCoefPos || vHCorCoefNeg) && ((slope >= nSlope) && (slope < hSlope))) { + return TENDENCY_UP; + + } else if ((vHCorCoefPos || vHCorCoefNeg) && ((slope <= -nSlope) && (slope > -hSlope))) { + return TENDENCY_DOWN; + + } else if ((vHCorCoefPos || vHCorCoefNeg) && ((slope < nSlope) || (slope > -nSlope))) { + return TENDENCY_NEUTRAL; + + } else if (correlationCoeff == 0 && slope == 0 && !vHCorCoefPos && !vHCorCoefNeg) { + return TENDENCY_NEUTRAL; + } + return null; + } + } +} diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TendencyDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TendencyDecorator.java index 310b19f04ef..e68ae61ce77 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TendencyDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TendencyDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersister.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersister.java index 5d2e923e70a..092f59bed7a 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersister.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersister.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java index 68e686f61c8..ac55d86ebf5 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/ViolationPersisterDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/ViolationPersisterDecorator.java index 2c1c31fe9e4..e1299a01365 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/ViolationPersisterDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/ViolationPersisterDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/AlertsWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/AlertsWidget.java index 426f35f93f8..3f7933cea9d 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/AlertsWidget.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/AlertsWidget.java @@ -1,39 +1,39 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.core.widgets;
-
-import org.sonar.api.web.*;
-
-@WidgetLayout(WidgetLayoutType.NONE)
-@Description("Display current alerts on the project.")
-public class AlertsWidget extends AbstractRubyTemplate implements RubyRailsWidget {
- public String getId() {
- return "alerts";
- }
-
- public String getTitle() {
- return "Alerts";
- }
-
- @Override
- protected String getTemplatePath() {
- return "/org/sonar/plugins/core/widgets/alerts.html.erb";
- }
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.core.widgets; + +import org.sonar.api.web.*; + +@WidgetLayout(WidgetLayoutType.NONE) +@Description("Display current alerts on the project.") +public class AlertsWidget extends AbstractRubyTemplate implements RubyRailsWidget { + public String getId() { + return "alerts"; + } + + public String getTitle() { + return "Alerts"; + } + + @Override + protected String getTemplatePath() { + return "/org/sonar/plugins/core/widgets/alerts.html.erb"; + } }
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CodeCoverageWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CodeCoverageWidget.java index cd3f09e0df9..5f9b6697f8d 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CodeCoverageWidget.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CodeCoverageWidget.java @@ -1,42 +1,42 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.core.widgets;
-
-import org.sonar.api.web.AbstractRubyTemplate;
-import org.sonar.api.web.Description;
-import org.sonar.api.web.RubyRailsWidget;
-import org.sonar.api.web.WidgetCategory;
-
-@WidgetCategory({"Tests"})
-@Description("Reports on units tests and code coverage by unit tests.")
-public class CodeCoverageWidget extends AbstractRubyTemplate implements RubyRailsWidget {
- public String getId() {
- return "code_coverage";
- }
-
- public String getTitle() {
- return "Code coverage";
- }
-
- @Override
- protected String getTemplatePath() {
- return "/org/sonar/plugins/core/widgets/code_coverage.html.erb";
- }
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.core.widgets; + +import org.sonar.api.web.AbstractRubyTemplate; +import org.sonar.api.web.Description; +import org.sonar.api.web.RubyRailsWidget; +import org.sonar.api.web.WidgetCategory; + +@WidgetCategory({"Tests"}) +@Description("Reports on units tests and code coverage by unit tests.") +public class CodeCoverageWidget extends AbstractRubyTemplate implements RubyRailsWidget { + public String getId() { + return "code_coverage"; + } + + public String getTitle() { + return "Code coverage"; + } + + @Override + protected String getTemplatePath() { + return "/org/sonar/plugins/core/widgets/code_coverage.html.erb"; + } }
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CommentsDuplicationsWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CommentsDuplicationsWidget.java index 62446403366..a8f5fbeb7ef 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CommentsDuplicationsWidget.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CommentsDuplicationsWidget.java @@ -1,40 +1,40 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.core.widgets;
-
-import org.sonar.api.web.AbstractRubyTemplate;
-import org.sonar.api.web.Description;
-import org.sonar.api.web.RubyRailsWidget;
-
-@Description("Reports on copy/paste and documentation")
-public class CommentsDuplicationsWidget extends AbstractRubyTemplate implements RubyRailsWidget {
- public String getId() {
- return "comments_duplications";
- }
-
- public String getTitle() {
- return "Comments & Duplications";
- }
-
- @Override
- protected String getTemplatePath() {
- return "/org/sonar/plugins/core/widgets/comments_duplications.html.erb";
- }
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.core.widgets; + +import org.sonar.api.web.AbstractRubyTemplate; +import org.sonar.api.web.Description; +import org.sonar.api.web.RubyRailsWidget; + +@Description("Reports on copy/paste and documentation") +public class CommentsDuplicationsWidget extends AbstractRubyTemplate implements RubyRailsWidget { + public String getId() { + return "comments_duplications"; + } + + public String getTitle() { + return "Comments & Duplications"; + } + + @Override + protected String getTemplatePath() { + return "/org/sonar/plugins/core/widgets/comments_duplications.html.erb"; + } }
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/ComplexityWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/ComplexityWidget.java index 90dba687ae3..cf955db69d3 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/ComplexityWidget.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/ComplexityWidget.java @@ -1,40 +1,40 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.core.widgets;
-
-import org.sonar.api.web.AbstractRubyTemplate;
-import org.sonar.api.web.Description;
-import org.sonar.api.web.RubyRailsWidget;
-
-@Description("Reports on complexity, average complexity and complexity distribution.")
-public class ComplexityWidget extends AbstractRubyTemplate implements RubyRailsWidget {
- public String getId() {
- return "complexity";
- }
-
- public String getTitle() {
- return "Complexity";
- }
-
- @Override
- protected String getTemplatePath() {
- return "/org/sonar/plugins/core/widgets/complexity.html.erb";
- }
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.core.widgets; + +import org.sonar.api.web.AbstractRubyTemplate; +import org.sonar.api.web.Description; +import org.sonar.api.web.RubyRailsWidget; + +@Description("Reports on complexity, average complexity and complexity distribution.") +public class ComplexityWidget extends AbstractRubyTemplate implements RubyRailsWidget { + public String getId() { + return "complexity"; + } + + public String getTitle() { + return "Complexity"; + } + + @Override + protected String getTemplatePath() { + return "/org/sonar/plugins/core/widgets/complexity.html.erb"; + } }
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CustomMeasuresWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CustomMeasuresWidget.java index 84d99a7f63c..5bb3525a3fd 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CustomMeasuresWidget.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CustomMeasuresWidget.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/DescriptionWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/DescriptionWidget.java index f3304e46073..02cf7944cc0 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/DescriptionWidget.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/DescriptionWidget.java @@ -1,39 +1,39 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.core.widgets;
-
-import org.sonar.api.web.*;
-
-@WidgetLayout(WidgetLayoutType.NONE)
-@Description("Displays general project information taken from the pom.xml")
-public class DescriptionWidget extends AbstractRubyTemplate implements RubyRailsWidget {
- public String getId() {
- return "description";
- }
-
- public String getTitle() {
- return "Description";
- }
-
- @Override
- protected String getTemplatePath() {
- return "/org/sonar/plugins/core/widgets/description.html.erb";
- }
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.core.widgets; + +import org.sonar.api.web.*; + +@WidgetLayout(WidgetLayoutType.NONE) +@Description("Displays general project information taken from the pom.xml") +public class DescriptionWidget extends AbstractRubyTemplate implements RubyRailsWidget { + public String getId() { + return "description"; + } + + public String getTitle() { + return "Description"; + } + + @Override + protected String getTemplatePath() { + return "/org/sonar/plugins/core/widgets/description.html.erb"; + } }
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/EventsWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/EventsWidget.java index 0da901088b6..1c1ccc2775a 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/EventsWidget.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/EventsWidget.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/RulesWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/RulesWidget.java index d9d166aefda..37acbe79559 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/RulesWidget.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/RulesWidget.java @@ -1,39 +1,39 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.core.widgets;
-
-import org.sonar.api.web.*;
-
-@WidgetCategory({"Rules"})
-@Description("Reports violations and compliance index on coding standards.")
-public class RulesWidget extends AbstractRubyTemplate implements RubyRailsWidget {
- public String getId() {
- return "rules";
- }
-
- public String getTitle() {
- return "Rules Compliance";
- }
-
- @Override
- protected String getTemplatePath() {
- return "/org/sonar/plugins/core/widgets/rules.html.erb";
- }
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.core.widgets; + +import org.sonar.api.web.*; + +@WidgetCategory({"Rules"}) +@Description("Reports violations and compliance index on coding standards.") +public class RulesWidget extends AbstractRubyTemplate implements RubyRailsWidget { + public String getId() { + return "rules"; + } + + public String getTitle() { + return "Rules Compliance"; + } + + @Override + protected String getTemplatePath() { + return "/org/sonar/plugins/core/widgets/rules.html.erb"; + } }
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/SizeWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/SizeWidget.java index 3c6a5c42055..b7ff7657d5f 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/SizeWidget.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/SizeWidget.java @@ -1,40 +1,40 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.core.widgets;
-
-import org.sonar.api.web.AbstractRubyTemplate;
-import org.sonar.api.web.Description;
-import org.sonar.api.web.RubyRailsWidget;
-
-@Description("Reports general metrics on the size of the project.")
-public class SizeWidget extends AbstractRubyTemplate implements RubyRailsWidget {
- public String getId() {
- return "size";
- }
-
- public String getTitle() {
- return "Size metrics";
- }
-
- @Override
- protected String getTemplatePath() {
- return "/org/sonar/plugins/core/widgets/size.html.erb";
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.core.widgets; + +import org.sonar.api.web.AbstractRubyTemplate; +import org.sonar.api.web.Description; +import org.sonar.api.web.RubyRailsWidget; + +@Description("Reports general metrics on the size of the project.") +public class SizeWidget extends AbstractRubyTemplate implements RubyRailsWidget { + public String getId() { + return "size"; + } + + public String getTitle() { + return "Size metrics"; + } + + @Override + protected String getTemplatePath() { + return "/org/sonar/plugins/core/widgets/size.html.erb"; + } +} diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/CorePluginTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/CorePluginTest.java index b9dd13aaa14..01465d08843 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/CorePluginTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/CorePluginTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/batch/ExcludedResourceFilterTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/batch/ExcludedResourceFilterTest.java index b65b0500747..2079725ed5e 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/batch/ExcludedResourceFilterTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/batch/ExcludedResourceFilterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionAreaChartTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionAreaChartTest.java index 3be2879ad12..a2e5fa7afa7 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionAreaChartTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionAreaChartTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionBarChartTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionBarChartTest.java index b83ed6f81ed..e3e9a75cde6 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionBarChartTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionBarChartTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/XradarChartTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/XradarChartTest.java index 8f9cb7eb745..e744e5f3b0b 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/XradarChartTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/XradarChartTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/metrics/UserManagedMetricsTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/metrics/UserManagedMetricsTest.java index 7ce01bb0ae1..238f26d6558 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/metrics/UserManagedMetricsTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/metrics/UserManagedMetricsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/security/ApplyProjectRolesDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/security/ApplyProjectRolesDecoratorTest.java index 51673cd37f0..0721a6ae9d3 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/security/ApplyProjectRolesDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/security/ApplyProjectRolesDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/security/RoleManagerTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/security/RoleManagerTest.java index ad89b5611b7..fb289e72caa 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/security/RoleManagerTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/security/RoleManagerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/AlertUtilsTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/AlertUtilsTest.java index 828ab46c4c9..e0c19eaf81e 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/AlertUtilsTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/AlertUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/BranchCoverageDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/BranchCoverageDecoratorTest.java index 69e3e06bd9e..e98980ba776 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/BranchCoverageDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/BranchCoverageDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CheckAlertThresholdsTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CheckAlertThresholdsTest.java index 4354c4914c9..c8958fe4572 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CheckAlertThresholdsTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CheckAlertThresholdsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CommentDensityDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CommentDensityDecoratorTest.java index fd887e5df7a..355e400ce77 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CommentDensityDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CommentDensityDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CoverageDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CoverageDecoratorTest.java index 01a90d7afb0..e0d15196855 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CoverageDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CoverageDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/DirectoriesDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/DirectoriesDecoratorTest.java index b3b3720fb5f..2515abb7d06 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/DirectoriesDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/DirectoriesDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/GenerateAlertEventsTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/GenerateAlertEventsTest.java index 6a5732d76ae..15964b7259e 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/GenerateAlertEventsTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/GenerateAlertEventsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/LineCoverageDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/LineCoverageDecoratorTest.java index 018ac637503..15d2e56d0f1 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/LineCoverageDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/LineCoverageDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProfileSensorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProfileSensorTest.java index c0b94847950..29ac9fad4ec 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProfileSensorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProfileSensorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProjectLinksSensorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProjectLinksSensorTest.java index 38f44eb001d..d4a6b85a72d 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProjectLinksSensorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProjectLinksSensorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/UncoveredComplexityDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/UncoveredComplexityDecoratorTest.java index 6c3c4f08049..e585691f730 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/UncoveredComplexityDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/UncoveredComplexityDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/UnitTestDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/UnitTestDecoratorTest.java index 2f837804bc0..3b46ae33a0f 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/UnitTestDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/UnitTestDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/VersionEventsSensorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/VersionEventsSensorTest.java index ef6401e5578..e3ac1ee4d5e 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/VersionEventsSensorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/VersionEventsSensorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationsDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationsDecoratorTest.java index e848be2a39d..73173480748 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationsDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationsDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationsDensityDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationsDensityDecoratorTest.java index 7bf1650e570..8e242d4a95d 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationsDensityDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationsDensityDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/WeightedViolationsDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/WeightedViolationsDecoratorTest.java index c6bb156ecba..54407f80223 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/WeightedViolationsDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/WeightedViolationsDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/NewViolationsDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/NewViolationsDecoratorTest.java index 22574d4a1b7..22a239811b3 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/NewViolationsDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/NewViolationsDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyAnalyserTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyAnalyserTest.java index 15acb78854d..0f3b6aa748e 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyAnalyserTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyAnalyserTest.java @@ -1,132 +1,132 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.core.timemachine;
-
-import org.junit.Test;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.*;
-
-public class TendencyAnalyserTest {
- private TendencyAnalyser analyser = new TendencyAnalyser();
-
- private List<Double> getValues(Double[] array) {
- return Arrays.asList(array);
- }
-
-
- protected void assertBetween(String typeLabel, Double value, Double min, Double max) {
- assertTrue(typeLabel + " " + value + "<" + min, value >= min);
- assertTrue(typeLabel + "=" + value + ">" + max, value <= max);
- }
-
- @Test
- public void testNoData() {
- assertThat(analyser.analyse(Collections.<Double>emptyList()), nullValue());
- }
-
- @Test
- public void testNotEnoughData() {
- assertThat(analyser.analyseLevel(Arrays.asList(10.0)), nullValue());
- }
-
- @Test
- public void testTendencyOnThreeDays() {
- Double[] doubles = new Double[]{10.0, null, 9.9};
- TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));
- assertBetween("slope", slopeData.getSlope(), -0.5, 0.5);
- assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel());
- }
-
- @Test
- public void testTendencyOnTwoZeroDays() {
- Double[] doubles = new Double[]{0.0, 0.0};
- TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));
- assertBetween("slope", slopeData.getSlope(), -0.0, 0.0);
- assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel());
- }
-
- @Test
- public void testTendencyOnThreeZeroDays() {
- Double[] doubles = new Double[]{0.0, 0.0, 0.0};
- TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));
- assertBetween("slope", slopeData.getSlope(), -0.0, 0.0);
- assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel());
- }
-
- @Test
- public void testBigDownOnThreeDays() {
- Double[] doubles = new Double[]{90.0, 91.0, 50.0};
- TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));
- assertTrue("slope", slopeData.getSlope() < -2.0);
- assertEquals(TendencyAnalyser.TENDENCY_BIG_DOWN, slopeData.getLevel());
- }
-
- @Test
- public void testFlatTendency() {
- Double[] doubles = new Double[]{10.0, 10.2, 9.9};
- TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));
- assertBetween("slope", slopeData.getSlope(), -0.5, 0.5);
- assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel());
- }
-
- @Test
- public void testFlatTendencyWithPeak() {
- Double[] doubles = new Double[]{10.0, 15.0, 10.0};
- TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));
- assertBetween("slope", slopeData.getSlope(), -0.5, 0.5);
- assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel());
- }
-
- @Test
- public void testBigUpTendencyOnThreeValues() {
- Double[] doubles = new Double[]{10.0, 12.0, 15.5};
- TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));
- assertBetween("slope", slopeData.getSlope(), 2.5, 3.0);
- assertEquals(TendencyAnalyser.TENDENCY_BIG_UP, slopeData.getLevel());
- }
-
- @Test
- public void testBigUpTendencyOnTenValues() {
- Double[] doubles = new Double[]{45.0, 60.0, 57.0, 65.0, 58.0, 68.0, 59.0, 66.0, 76.0, 80.0};
- TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));
- assertBetween("slope", slopeData.getSlope(), 2.5, 3.0);
- assertEquals(TendencyAnalyser.TENDENCY_BIG_UP, slopeData.getLevel());
- }
-
- @Test
- public void testMediumUpTendency() {
- Double[] doubles = new Double[]{5.0, 4.5, 5.1, 5.5, 5.3, 6.4, 6.3, 6.6, 6.8, 6.5};
- TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));
- assertBetween("slope", slopeData.getSlope(), 0.0, 1.0);
- assertEquals(TendencyAnalyser.TENDENCY_UP, slopeData.getLevel());
- }
-
- @Test
- public void testAsymetricAlgorithm() {
- TendencyAnalyser.SlopeData slopeData1 = analyser.analyse(getValues(new Double[]{45.0, 47.0, 95.0}));
- TendencyAnalyser.SlopeData slopeData2 = analyser.analyse(getValues(new Double[]{95.0, 45.0, 47.0}));
- assertTrue(slopeData1.getSlope() != slopeData2.getSlope());
- }
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.core.timemachine; + +import org.junit.Test; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import static org.hamcrest.CoreMatchers.nullValue; +import static org.junit.Assert.*; + +public class TendencyAnalyserTest { + private TendencyAnalyser analyser = new TendencyAnalyser(); + + private List<Double> getValues(Double[] array) { + return Arrays.asList(array); + } + + + protected void assertBetween(String typeLabel, Double value, Double min, Double max) { + assertTrue(typeLabel + " " + value + "<" + min, value >= min); + assertTrue(typeLabel + "=" + value + ">" + max, value <= max); + } + + @Test + public void testNoData() { + assertThat(analyser.analyse(Collections.<Double>emptyList()), nullValue()); + } + + @Test + public void testNotEnoughData() { + assertThat(analyser.analyseLevel(Arrays.asList(10.0)), nullValue()); + } + + @Test + public void testTendencyOnThreeDays() { + Double[] doubles = new Double[]{10.0, null, 9.9}; + TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles)); + assertBetween("slope", slopeData.getSlope(), -0.5, 0.5); + assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel()); + } + + @Test + public void testTendencyOnTwoZeroDays() { + Double[] doubles = new Double[]{0.0, 0.0}; + TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles)); + assertBetween("slope", slopeData.getSlope(), -0.0, 0.0); + assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel()); + } + + @Test + public void testTendencyOnThreeZeroDays() { + Double[] doubles = new Double[]{0.0, 0.0, 0.0}; + TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles)); + assertBetween("slope", slopeData.getSlope(), -0.0, 0.0); + assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel()); + } + + @Test + public void testBigDownOnThreeDays() { + Double[] doubles = new Double[]{90.0, 91.0, 50.0}; + TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles)); + assertTrue("slope", slopeData.getSlope() < -2.0); + assertEquals(TendencyAnalyser.TENDENCY_BIG_DOWN, slopeData.getLevel()); + } + + @Test + public void testFlatTendency() { + Double[] doubles = new Double[]{10.0, 10.2, 9.9}; + TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles)); + assertBetween("slope", slopeData.getSlope(), -0.5, 0.5); + assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel()); + } + + @Test + public void testFlatTendencyWithPeak() { + Double[] doubles = new Double[]{10.0, 15.0, 10.0}; + TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles)); + assertBetween("slope", slopeData.getSlope(), -0.5, 0.5); + assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel()); + } + + @Test + public void testBigUpTendencyOnThreeValues() { + Double[] doubles = new Double[]{10.0, 12.0, 15.5}; + TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles)); + assertBetween("slope", slopeData.getSlope(), 2.5, 3.0); + assertEquals(TendencyAnalyser.TENDENCY_BIG_UP, slopeData.getLevel()); + } + + @Test + public void testBigUpTendencyOnTenValues() { + Double[] doubles = new Double[]{45.0, 60.0, 57.0, 65.0, 58.0, 68.0, 59.0, 66.0, 76.0, 80.0}; + TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles)); + assertBetween("slope", slopeData.getSlope(), 2.5, 3.0); + assertEquals(TendencyAnalyser.TENDENCY_BIG_UP, slopeData.getLevel()); + } + + @Test + public void testMediumUpTendency() { + Double[] doubles = new Double[]{5.0, 4.5, 5.1, 5.5, 5.3, 6.4, 6.3, 6.6, 6.8, 6.5}; + TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles)); + assertBetween("slope", slopeData.getSlope(), 0.0, 1.0); + assertEquals(TendencyAnalyser.TENDENCY_UP, slopeData.getLevel()); + } + + @Test + public void testAsymetricAlgorithm() { + TendencyAnalyser.SlopeData slopeData1 = analyser.analyse(getValues(new Double[]{45.0, 47.0, 95.0})); + TendencyAnalyser.SlopeData slopeData2 = analyser.analyse(getValues(new Double[]{95.0, 45.0, 47.0})); + assertTrue(slopeData1.getSlope() != slopeData2.getSlope()); + } }
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyDecoratorTest.java index ddf68f6d428..9fd3336ab0c 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersisterTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersisterTest.java index 20bf7ddcdf2..90481c78e65 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersisterTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersisterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationTest.java index 4a834d65796..5af00f44226 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/VariationDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/VariationDecoratorTest.java index 76fddcfb7f9..12d95464637 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/VariationDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/VariationDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest.java index 741496af6a4..daf343330c6 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdAnalyser.java b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdAnalyser.java index 4d1da130abb..7693706f382 100644 --- a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdAnalyser.java +++ b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdAnalyser.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdException.java b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdException.java index 389a4c59c08..f7aa533e9ad 100644 --- a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdException.java +++ b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdPlugin.java b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdPlugin.java index e4a8c54a4ad..3c64cd47ff4 100644 --- a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdPlugin.java +++ b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdPlugin.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdSensor.java b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdSensor.java index db232383622..3e65dd742ea 100644 --- a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdSensor.java +++ b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdSensor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/JavaCpdMapping.java b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/JavaCpdMapping.java index 5faa5ab2a1d..c588660de2d 100644 --- a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/JavaCpdMapping.java +++ b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/JavaCpdMapping.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/decorators/DuplicationDensityDecorator.java b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/decorators/DuplicationDensityDecorator.java index c05835cfb13..dcee3b15866 100644 --- a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/decorators/DuplicationDensityDecorator.java +++ b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/decorators/DuplicationDensityDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/decorators/SumDuplicationsDecorator.java b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/decorators/SumDuplicationsDecorator.java index c47b18a7110..008b2ffd5a4 100644 --- a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/decorators/SumDuplicationsDecorator.java +++ b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/decorators/SumDuplicationsDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdAnalyserTest.java b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdAnalyserTest.java index cc4e4681e85..1e387206823 100644 --- a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdAnalyserTest.java +++ b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdAnalyserTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdPluginTest.java b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdPluginTest.java index 4fa0132b48d..2f640d525a6 100644 --- a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdPluginTest.java +++ b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdPluginTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdSensorTest.java b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdSensorTest.java index 3687a26b3a1..a7699d21c4c 100644 --- a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdSensorTest.java +++ b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdSensorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/decorators/DuplicationDensityDecoratorTest.java b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/decorators/DuplicationDensityDecoratorTest.java index f958c8549fe..aa6ea11a769 100644 --- a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/decorators/DuplicationDensityDecoratorTest.java +++ b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/decorators/DuplicationDensityDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/decorators/SumDuplicationsDecoratorTest.java b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/decorators/SumDuplicationsDecoratorTest.java index 32cf781e366..931d63bdfec 100644 --- a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/decorators/SumDuplicationsDecoratorTest.java +++ b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/decorators/SumDuplicationsDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DbCleanerPlugin.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DbCleanerPlugin.java index 996957efb33..2ab4c945bca 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DbCleanerPlugin.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DbCleanerPlugin.java @@ -1,78 +1,78 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.dbcleaner;
-
-import org.sonar.api.Plugin;
-import org.sonar.api.Properties;
-import org.sonar.api.Property;
-import org.sonar.plugins.dbcleaner.api.DbCleanerConstants;
-import org.sonar.plugins.dbcleaner.period.DefaultPeriodCleaner;
-import org.sonar.plugins.dbcleaner.period.PeriodPurge;
-import org.sonar.plugins.dbcleaner.purges.*;
-import org.sonar.plugins.dbcleaner.runner.PurgeRunner;
-
-import java.util.Arrays;
-import java.util.List;
-
-@Properties({
- @Property(key = DbCleanerConstants.MONTHS_BEFORE_KEEPING_ONLY_ONE_SNAPSHOT_BY_WEEK,
- defaultValue = DbCleanerConstants.ONE_MONTH, name = "Number of months before starting to keep only one snapshot by week",
- description = "After this number of months, if there are several snapshots during the same week, "
- + "the DbCleaner keeps the first one and fully delete the other ones.", global = true, project = true),
- @Property(key = DbCleanerConstants.MONTHS_BEFORE_KEEPING_ONLY_ONE_SNAPSHOT_BY_MONTH,
- defaultValue = DbCleanerConstants.ONE_YEAR, name = "Number of months before starting to keep only one snapshot by month",
- description = "After this number of months, if there are several snapshots during the same month, "
- + "the DbCleaner keeps the first one and fully delete the other ones.", global = true, project = true),
- @Property(key = DbCleanerConstants.MONTHS_BEFORE_DELETING_ALL_SNAPSHOTS, defaultValue = DbCleanerConstants.FIVE_YEARS,
- name = "Number of months before starting to delete all remaining snapshots",
- description = "After this number of months, all snapshots are fully deleted.", global = true, project = true)})
-public final class DbCleanerPlugin implements Plugin {
-
- @Override
- public String toString() {
- return DbCleanerConstants.PLUGIN_NAME;
- }
-
- public String getKey() {
- return DbCleanerConstants.PLUGIN_KEY;
- }
-
- public String getName() {
- return DbCleanerConstants.PLUGIN_NAME;
- }
-
- public String getDescription() {
- return "The DbCleaner optimizes the Sonar DB performances by removing old and useless quality snapshots.";
- }
-
- public List getExtensions() {
- return Arrays.asList(
- // shared components
- DefaultPeriodCleaner.class,
-
- // purges
- PurgeOrphanResources.class, PurgeEntities.class, PurgeRuleMeasures.class, PurgeUnprocessed.class,
- PurgeDeletedResources.class, PurgeDeprecatedLast.class, UnflagLastDoublons.class, PurgeDisabledResources.class,
- PurgeResourceRoles.class, PurgeEventOrphans.class, PurgePropertyOrphans.class, PeriodPurge.class, PurgeDependencies.class,
-
- // post-job
- PurgeRunner.class);
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.dbcleaner; + +import org.sonar.api.Plugin; +import org.sonar.api.Properties; +import org.sonar.api.Property; +import org.sonar.plugins.dbcleaner.api.DbCleanerConstants; +import org.sonar.plugins.dbcleaner.period.DefaultPeriodCleaner; +import org.sonar.plugins.dbcleaner.period.PeriodPurge; +import org.sonar.plugins.dbcleaner.purges.*; +import org.sonar.plugins.dbcleaner.runner.PurgeRunner; + +import java.util.Arrays; +import java.util.List; + +@Properties({ + @Property(key = DbCleanerConstants.MONTHS_BEFORE_KEEPING_ONLY_ONE_SNAPSHOT_BY_WEEK, + defaultValue = DbCleanerConstants.ONE_MONTH, name = "Number of months before starting to keep only one snapshot by week", + description = "After this number of months, if there are several snapshots during the same week, " + + "the DbCleaner keeps the first one and fully delete the other ones.", global = true, project = true), + @Property(key = DbCleanerConstants.MONTHS_BEFORE_KEEPING_ONLY_ONE_SNAPSHOT_BY_MONTH, + defaultValue = DbCleanerConstants.ONE_YEAR, name = "Number of months before starting to keep only one snapshot by month", + description = "After this number of months, if there are several snapshots during the same month, " + + "the DbCleaner keeps the first one and fully delete the other ones.", global = true, project = true), + @Property(key = DbCleanerConstants.MONTHS_BEFORE_DELETING_ALL_SNAPSHOTS, defaultValue = DbCleanerConstants.FIVE_YEARS, + name = "Number of months before starting to delete all remaining snapshots", + description = "After this number of months, all snapshots are fully deleted.", global = true, project = true)}) +public final class DbCleanerPlugin implements Plugin { + + @Override + public String toString() { + return DbCleanerConstants.PLUGIN_NAME; + } + + public String getKey() { + return DbCleanerConstants.PLUGIN_KEY; + } + + public String getName() { + return DbCleanerConstants.PLUGIN_NAME; + } + + public String getDescription() { + return "The DbCleaner optimizes the Sonar DB performances by removing old and useless quality snapshots."; + } + + public List getExtensions() { + return Arrays.asList( + // shared components + DefaultPeriodCleaner.class, + + // purges + PurgeOrphanResources.class, PurgeEntities.class, PurgeRuleMeasures.class, PurgeUnprocessed.class, + PurgeDeletedResources.class, PurgeDeprecatedLast.class, UnflagLastDoublons.class, PurgeDisabledResources.class, + PurgeResourceRoles.class, PurgeEventOrphans.class, PurgePropertyOrphans.class, PeriodPurge.class, PurgeDependencies.class, + + // post-job + PurgeRunner.class); + } +} diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/DbCleanerConstants.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/DbCleanerConstants.java index b7e1db082f5..72b968d1ed3 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/DbCleanerConstants.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/DbCleanerConstants.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/PeriodCleaner.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/PeriodCleaner.java index fa2650130b7..22840378c4f 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/PeriodCleaner.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/PeriodCleaner.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/Purge.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/Purge.java index d5177d3fa6c..d671085e080 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/Purge.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/Purge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/PurgeContext.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/PurgeContext.java index abaa9cb08cc..aee2c76c9e7 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/PurgeContext.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/PurgeContext.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/PurgeUtils.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/PurgeUtils.java index 229bcce88be..c417befec67 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/PurgeUtils.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/PurgeUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/DefaultPeriodCleaner.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/DefaultPeriodCleaner.java index c9c8f08099c..0cf4e7ee6c5 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/DefaultPeriodCleaner.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/DefaultPeriodCleaner.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepLastSnapshotFilter.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepLastSnapshotFilter.java index 272d989e034..86fb1a4322f 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepLastSnapshotFilter.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepLastSnapshotFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepLibrarySnapshotFilter.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepLibrarySnapshotFilter.java index 91889fba658..426d4b18fdb 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepLibrarySnapshotFilter.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepLibrarySnapshotFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepOneSnapshotByPeriodBetweenTwoDatesFilter.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepOneSnapshotByPeriodBetweenTwoDatesFilter.java index eaf3050cf82..c06d540299f 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepOneSnapshotByPeriodBetweenTwoDatesFilter.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepOneSnapshotByPeriodBetweenTwoDatesFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepSnapshotsBetweenTwoDatesFilter.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepSnapshotsBetweenTwoDatesFilter.java index 8700459a3d9..6946d44201a 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepSnapshotsBetweenTwoDatesFilter.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepSnapshotsBetweenTwoDatesFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/PeriodPurge.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/PeriodPurge.java index 326636528d7..722eec65338 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/PeriodPurge.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/PeriodPurge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/Periods.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/Periods.java index a852c4d17b4..fd8d284dd03 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/Periods.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/Periods.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/SQLRequests.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/SQLRequests.java index e1061d6114b..909bb123c7d 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/SQLRequests.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/SQLRequests.java @@ -1,51 +1,51 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.dbcleaner.period;
-
-import org.sonar.api.batch.Event;
-import org.sonar.api.database.DatabaseSession;
-import org.sonar.api.database.model.Snapshot;
-
-import javax.persistence.Query;
-import java.util.List;
-
-final class SQLRequests {
-
- private final DatabaseSession session;
-
- SQLRequests(DatabaseSession session) {
- this.session = session;
- }
-
- List<Snapshot> getProjectSnapshotsOrderedByCreatedAt(int oneProjectSnapshotId) {
- Query query = session.createQuery("FROM " + Snapshot.class.getSimpleName()
- + " sp1 WHERE sp1.resourceId = (select sp2.resourceId FROM " + Snapshot.class.getSimpleName()
- + " sp2 WHERE sp2.id = :id) and sp1.rootId= null and not exists (from " + Event.class.getSimpleName() + " e where e.snapshot=sp1) order by sp1.createdAt");
- query.setParameter("id", oneProjectSnapshotId);
- return query.getResultList();
- }
-
- List<Integer> getChildIds(Snapshot parentSnapshot) {
- Query query = session.createQuery("select sp.id FROM " + Snapshot.class.getSimpleName()
- + " sp WHERE sp.rootId = :rootId or id = :rootId");
- query.setParameter("rootId", parentSnapshot.getId());
- return query.getResultList();
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.dbcleaner.period; + +import org.sonar.api.batch.Event; +import org.sonar.api.database.DatabaseSession; +import org.sonar.api.database.model.Snapshot; + +import javax.persistence.Query; +import java.util.List; + +final class SQLRequests { + + private final DatabaseSession session; + + SQLRequests(DatabaseSession session) { + this.session = session; + } + + List<Snapshot> getProjectSnapshotsOrderedByCreatedAt(int oneProjectSnapshotId) { + Query query = session.createQuery("FROM " + Snapshot.class.getSimpleName() + + " sp1 WHERE sp1.resourceId = (select sp2.resourceId FROM " + Snapshot.class.getSimpleName() + + " sp2 WHERE sp2.id = :id) and sp1.rootId= null and not exists (from " + Event.class.getSimpleName() + " e where e.snapshot=sp1) order by sp1.createdAt"); + query.setParameter("id", oneProjectSnapshotId); + return query.getResultList(); + } + + List<Integer> getChildIds(Snapshot parentSnapshot) { + Query query = session.createQuery("select sp.id FROM " + Snapshot.class.getSimpleName() + + " sp WHERE sp.rootId = :rootId or id = :rootId"); + query.setParameter("rootId", parentSnapshot.getId()); + return query.getResultList(); + } +} diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/SnapshotFilter.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/SnapshotFilter.java index d5db44285f4..fd3402fa6d3 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/SnapshotFilter.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/SnapshotFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDeletedResources.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDeletedResources.java index 4e4708fa564..f91e1da8c70 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDeletedResources.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDeletedResources.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDependencies.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDependencies.java index 07f9e81efe8..a05bd16bb02 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDependencies.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDependencies.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDeprecatedLast.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDeprecatedLast.java index fb4d3782f03..fc84d52a2de 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDeprecatedLast.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDeprecatedLast.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResources.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResources.java index 5ce0448833e..4a0895fea0c 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResources.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResources.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeEntities.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeEntities.java index cff889cc37a..a074cb9a6bb 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeEntities.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeEntities.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeEventOrphans.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeEventOrphans.java index 16b01253ae9..41ddd5e06d6 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeEventOrphans.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeEventOrphans.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeOrphanResources.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeOrphanResources.java index 680faa6633b..f3e6d62a8d1 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeOrphanResources.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeOrphanResources.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgePropertyOrphans.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgePropertyOrphans.java index 485a036bedd..74dda00b9a7 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgePropertyOrphans.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgePropertyOrphans.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeResourceRoles.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeResourceRoles.java index 80f16aadb9b..63c2d9dcce8 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeResourceRoles.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeResourceRoles.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasures.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasures.java index 52943fcbef9..6b50aa8f858 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasures.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasures.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessed.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessed.java index 579cadf275d..21b7b67bb26 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessed.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessed.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublons.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublons.java index bb309655a58..5799850f8e8 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublons.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublons.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/runner/DefaultPurgeContext.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/runner/DefaultPurgeContext.java index 91b711baa81..ea49d64e485 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/runner/DefaultPurgeContext.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/runner/DefaultPurgeContext.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/runner/PurgeRunner.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/runner/PurgeRunner.java index 9548f8c853a..3cfb209410d 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/runner/PurgeRunner.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/runner/PurgeRunner.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DbCleanerPluginTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DbCleanerPluginTest.java index aa9dfcde266..a22dfc7ee56 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DbCleanerPluginTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DbCleanerPluginTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/Utils.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/Utils.java index 00327d4247c..fd78c35bd0e 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/Utils.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/Utils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest.java index 08bb8604fc2..e61c9b49195 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/DefaultPeriodCleanerTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/DefaultPeriodCleanerTest.java index 9b741780268..0d561db86e2 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/DefaultPeriodCleanerTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/DefaultPeriodCleanerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepLastSnapshotFilterTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepLastSnapshotFilterTest.java index 61699405b62..048e2f99b8a 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepLastSnapshotFilterTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepLastSnapshotFilterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepLibrarySnapshotFilterTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepLibrarySnapshotFilterTest.java index fe70628c220..6829d8cc950 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepLibrarySnapshotFilterTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepLibrarySnapshotFilterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepOneSnapshotByPeriodBetweenTwoDatesFilterTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepOneSnapshotByPeriodBetweenTwoDatesFilterTest.java index 06defdc69ce..c93c26a264d 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepOneSnapshotByPeriodBetweenTwoDatesFilterTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepOneSnapshotByPeriodBetweenTwoDatesFilterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepSnapshotsBetweenTwoDatesFilterTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepSnapshotsBetweenTwoDatesFilterTest.java index c99edd9743f..6fb58c7a76f 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepSnapshotsBetweenTwoDatesFilterTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepSnapshotsBetweenTwoDatesFilterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/PeriodsTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/PeriodsTest.java index 99dcf520280..2dea638ee3f 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/PeriodsTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/PeriodsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDeletedResourcesTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDeletedResourcesTest.java index 867d6f2a984..4bde0b19c87 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDeletedResourcesTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDeletedResourcesTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDependenciesTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDependenciesTest.java index 7983b474f5a..3ce14d6d27b 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDependenciesTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDependenciesTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDeprecatedLastTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDeprecatedLastTest.java index 63712b04496..3a480361452 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDeprecatedLastTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDeprecatedLastTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest.java index f83d8527957..8ff3d3d84c3 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeEntitiesTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeEntitiesTest.java index ab7e63eef83..0caae612803 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeEntitiesTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeEntitiesTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeEventOrphansTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeEventOrphansTest.java index 7418ec6dcee..223b6facf07 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeEventOrphansTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeEventOrphansTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeOrphanResourcesTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeOrphanResourcesTest.java index fcc9073156c..87ba7fb9c8b 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeOrphanResourcesTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeOrphanResourcesTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgePropertyOrphansTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgePropertyOrphansTest.java index 373117d7829..9489c7181db 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgePropertyOrphansTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgePropertyOrphansTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeResourceRolesTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeResourceRolesTest.java index af037daa59e..f25b612e7d6 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeResourceRolesTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeResourceRolesTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasuresTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasuresTest.java index f1ca3db58af..45fb2b69c51 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasuresTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasuresTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest.java index 0848a69c5de..d82640c1383 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest.java index 0be4e984e4c..e9204a462d9 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/runner/PurgeRunnerTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/runner/PurgeRunnerTest.java index 64c756228d9..c1a84d41e40 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/runner/PurgeRunnerTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/runner/PurgeRunnerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest/sharedFixture.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest/sharedFixture.xml index ae4f6b24985..b0485cc36ca 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest/sharedFixture.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest/sharedFixture.xml @@ -1,6 +1,6 @@ <!-- ~ Sonar, open source software quality management tool. - ~ Copyright (C) 2009 SonarSource SA + ~ Copyright (C) 2008-2011 SonarSource ~ mailto:contact AT sonarsource DOT com ~ ~ Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest/unflagLastDoublons-result.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest/unflagLastDoublons-result.xml index 4e53b22c276..61e0dfbce33 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest/unflagLastDoublons-result.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest/unflagLastDoublons-result.xml @@ -1,6 +1,6 @@ <!-- ~ Sonar, open source software quality management tool. - ~ Copyright (C) 2009 SonarSource SA + ~ Copyright (C) 2008-2011 SonarSource ~ mailto:contact AT sonarsource DOT com ~ ~ Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest/unflagLastDoublons.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest/unflagLastDoublons.xml index 511551f4acc..97a76b074fd 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest/unflagLastDoublons.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest/unflagLastDoublons.xml @@ -1,6 +1,6 @@ <!-- ~ Sonar, open source software quality management tool. - ~ Copyright (C) 2009 SonarSource SA + ~ Copyright (C) 2008-2011 SonarSource ~ mailto:contact AT sonarsource DOT com ~ ~ Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/DesignPlugin.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/DesignPlugin.java index fdb70535b59..3b2c0464684 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/DesignPlugin.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/DesignPlugin.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/DsmSerializer.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/DsmSerializer.java index 6ce0e006e57..c0846770857 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/DsmSerializer.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/DsmSerializer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/FileTangleIndexDecorator.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/FileTangleIndexDecorator.java index fa449e0887e..7b3ca9ee283 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/FileTangleIndexDecorator.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/FileTangleIndexDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/MavenDependenciesSensor.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/MavenDependenciesSensor.java index 3bb6f053dd2..eb00b801d4c 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/MavenDependenciesSensor.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/MavenDependenciesSensor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/PackageTangleIndexDecorator.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/PackageTangleIndexDecorator.java index fa4e440fbe5..0b23d080e6b 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/PackageTangleIndexDecorator.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/PackageTangleIndexDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/ProjectDsmDecorator.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/ProjectDsmDecorator.java index 103c0b95fc5..9f8e874d8aa 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/ProjectDsmDecorator.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/ProjectDsmDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/SuspectLcom4DensityDecorator.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/SuspectLcom4DensityDecorator.java index 35370a02d2f..b627753b364 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/SuspectLcom4DensityDecorator.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/SuspectLcom4DensityDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/TangleIndexDecorator.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/TangleIndexDecorator.java index 703bd6334ad..e99599066ef 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/TangleIndexDecorator.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/TangleIndexDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/GwtDependenciesTab.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/GwtDependenciesTab.java index f49bffdae1b..80d718b1223 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/GwtDependenciesTab.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/GwtDependenciesTab.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/Data.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/Data.java index 2d457de0347..2b9279c0fa6 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/Data.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/Data.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/DependenciesTab.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/DependenciesTab.java index 3e3541f0589..7f91b413080 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/DependenciesTab.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/DependenciesTab.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/DependenciesTable.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/DependenciesTable.java index 9faa122e7e7..ce4ed84c755 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/DependenciesTable.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/DependenciesTable.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/Header.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/Header.java index 8de67b00dc6..3be4f7037a5 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/Header.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/Header.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/I18nConstants.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/I18nConstants.java index a90e4fbfde5..cccb2304629 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/I18nConstants.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/I18nConstants.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/lcom4/GwtLcom4Tab.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/lcom4/GwtLcom4Tab.java index d4bee638d28..51eef44558a 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/lcom4/GwtLcom4Tab.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/lcom4/GwtLcom4Tab.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/lcom4/client/Data.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/lcom4/client/Data.java index 3f34d7400fe..76ee31729f2 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/lcom4/client/Data.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/lcom4/client/Data.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/lcom4/client/Lcom4Tab.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/lcom4/client/Lcom4Tab.java index ee7a2f4292b..7fe67a1a030 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/lcom4/client/Lcom4Tab.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/lcom4/client/Lcom4Tab.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/GwtLibrariesPage.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/GwtLibrariesPage.java index 32d54114a8d..cedea071945 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/GwtLibrariesPage.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/GwtLibrariesPage.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/Filters.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/Filters.java index 31f7888c04e..6a76d5c681e 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/Filters.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/Filters.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/I18nConstants.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/I18nConstants.java index 496fb44a656..79eecaffdf1 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/I18nConstants.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/I18nConstants.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/KeywordFilter.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/KeywordFilter.java index d162a4340e3..fd83334458e 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/KeywordFilter.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/KeywordFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/LibrariesPage.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/LibrariesPage.java index 54cb1deb2dc..a25a07e4c6c 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/LibrariesPage.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/LibrariesPage.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/Library.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/Library.java index 1e20f0c77b7..75bb8126ace 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/Library.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/Library.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/ProjectPanel.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/ProjectPanel.java index 6cae74bf78c..685b5ef21c0 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/ProjectPanel.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/ProjectPanel.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/GwtDesignPage.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/GwtDesignPage.java index cbd9e31a443..22dd200c31a 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/GwtDesignPage.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/GwtDesignPage.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DependencyInfo.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DependencyInfo.java index 72e263da58a..42db5030b05 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DependencyInfo.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DependencyInfo.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DesignPage.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DesignPage.java index a8be3dfd472..2ae8a283514 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DesignPage.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DesignPage.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/Dsm.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/Dsm.java index 2b7dba5bd01..6594f9dbf25 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/Dsm.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/Dsm.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DsmData.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DsmData.java index 42c362f268e..0466c38fc8d 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DsmData.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DsmData.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/I18nConstants.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/I18nConstants.java index 63423385f23..48dc7ac6ad2 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/I18nConstants.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/I18nConstants.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/widgets/ChidamberKemererWidget.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/widgets/ChidamberKemererWidget.java index 90345b27db8..ead27a5f51a 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/widgets/ChidamberKemererWidget.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/widgets/ChidamberKemererWidget.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/widgets/FileDesignWidget.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/widgets/FileDesignWidget.java index 06643cad191..74ba2db3239 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/widgets/FileDesignWidget.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/widgets/FileDesignWidget.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/widgets/PackageDesignWidget.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/widgets/PackageDesignWidget.java index 6c9ba0d1346..9edd64ec741 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/widgets/PackageDesignWidget.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/widgets/PackageDesignWidget.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/test/java/org/sonar/plugins/design/batch/DsmSerializerTest.java b/plugins/sonar-design-plugin/src/test/java/org/sonar/plugins/design/batch/DsmSerializerTest.java index 8b42373ccad..2930778806e 100644 --- a/plugins/sonar-design-plugin/src/test/java/org/sonar/plugins/design/batch/DsmSerializerTest.java +++ b/plugins/sonar-design-plugin/src/test/java/org/sonar/plugins/design/batch/DsmSerializerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/test/java/org/sonar/plugins/design/batch/MavenDependenciesSensorTest.java b/plugins/sonar-design-plugin/src/test/java/org/sonar/plugins/design/batch/MavenDependenciesSensorTest.java index 3ab99fbc620..8c74a45b1bc 100644 --- a/plugins/sonar-design-plugin/src/test/java/org/sonar/plugins/design/batch/MavenDependenciesSensorTest.java +++ b/plugins/sonar-design-plugin/src/test/java/org/sonar/plugins/design/batch/MavenDependenciesSensorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-design-plugin/src/test/java/org/sonar/plugins/design/batch/SuspectLcom4DensityDecoratorTest.java b/plugins/sonar-design-plugin/src/test/java/org/sonar/plugins/design/batch/SuspectLcom4DensityDecoratorTest.java index 28636be3167..ab60ee41dd9 100644 --- a/plugins/sonar-design-plugin/src/test/java/org/sonar/plugins/design/batch/SuspectLcom4DensityDecoratorTest.java +++ b/plugins/sonar-design-plugin/src/test/java/org/sonar/plugins/design/batch/SuspectLcom4DensityDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsAntConverter.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsAntConverter.java index 161938c42a8..5b2d12297c5 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsAntConverter.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsAntConverter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsCategory.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsCategory.java index 279f3114108..d6db5e209cc 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsCategory.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsCategory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConfiguration.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConfiguration.java index 05b220aa092..2898de20b90 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConfiguration.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConfiguration.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConstants.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConstants.java index 736043e1766..fc1491b9d56 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConstants.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConstants.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsExecutor.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsExecutor.java index feff4df74a5..26d531f1600 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsExecutor.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsExecutor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsLevelUtils.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsLevelUtils.java index 60237a995ef..db6edd9f4a5 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsLevelUtils.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsLevelUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsPlugin.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsPlugin.java index 2a369d3ff1a..29eb7551453 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsPlugin.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsPlugin.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsProfileExporter.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsProfileExporter.java index bb228713115..c7cc44d73c0 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsProfileExporter.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsProfileExporter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsProfileImporter.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsProfileImporter.java index cef9c2ded00..1d69b54b6f3 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsProfileImporter.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsProfileImporter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsRuleRepository.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsRuleRepository.java index 45b6a5e3416..287cd212543 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsRuleRepository.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsRuleRepository.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsSensor.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsSensor.java index 38e516aae9d..8d6a7d2fdb3 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsSensor.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsSensor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsVersion.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsVersion.java index e9f2ffd3571..dba812519f3 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsVersion.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsVersion.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsXmlReportParser.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsXmlReportParser.java index de979170cd3..f32956a465e 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsXmlReportParser.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsXmlReportParser.java @@ -1,139 +1,139 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.findbugs;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-
-import org.codehaus.staxmate.SMInputFactory;
-import org.codehaus.staxmate.in.SMInputCursor;
-import org.sonar.api.utils.SonarException;
-import org.sonar.api.utils.XmlParserException;
-
-class FindbugsXmlReportParser {
-
- private final File findbugsXmlReport;
- private final String findbugsXmlReportPath;
-
- public FindbugsXmlReportParser(File findbugsXmlReport) {
- this.findbugsXmlReport = findbugsXmlReport;
- findbugsXmlReportPath = findbugsXmlReport.getAbsolutePath();
- if ( !findbugsXmlReport.exists()) {
- throw new SonarException("The findbugs XML report can't be found at '" + findbugsXmlReportPath + "'");
- }
- }
-
- public List<Violation> getViolations() {
- List<Violation> violations = new ArrayList<Violation>();
- try {
- SMInputFactory inf = new SMInputFactory(XMLInputFactory.newInstance());
- SMInputCursor cursor = inf.rootElementCursor(findbugsXmlReport).advance();
- SMInputCursor bugInstanceCursor = cursor.childElementCursor("BugInstance").advance();
- while (bugInstanceCursor.asEvent() != null) {
- String type = bugInstanceCursor.getAttrValue("type");
- String longMessage = "";
- SMInputCursor bugInstanceChildCursor = bugInstanceCursor.childElementCursor().advance();
- while (bugInstanceChildCursor.asEvent() != null) {
- String nodeName = bugInstanceChildCursor.getLocalName();
- if ("LongMessage".equals(nodeName)) {
- longMessage = bugInstanceChildCursor.collectDescendantText();
- } else if ("SourceLine".equals(nodeName)) {
- Violation fbViolation = new Violation();
- fbViolation.type = type;
- fbViolation.longMessage = longMessage;
- fbViolation.parseStart(bugInstanceChildCursor.getAttrValue("start"));
- fbViolation.parseEnd(bugInstanceChildCursor.getAttrValue("end"));
- fbViolation.className = bugInstanceChildCursor.getAttrValue("classname");
- fbViolation.sourcePath = bugInstanceChildCursor.getAttrValue("sourcepath");
- violations.add(fbViolation);
- }
- bugInstanceChildCursor.advance();
- }
- bugInstanceCursor.advance();
- }
- cursor.getStreamReader().closeCompletely();
- } catch (XMLStreamException e) {
- throw new XmlParserException("Unable to parse the Findbugs XML Report '" + findbugsXmlReportPath + "'", e);
- }
- return violations;
- }
-
- public static class Violation {
-
- private String type;
- private String longMessage;
- private Integer start;
- private Integer end;
- protected String className;
- protected String sourcePath;
-
- public String getType() {
- return type;
- }
-
- public void parseStart(String attrValue) {
- try {
- start = Integer.parseInt(attrValue);
- } catch (NumberFormatException e) {
- start = null;
- }
- }
-
- public void parseEnd(String attrValue) {
- try {
- end = Integer.parseInt(attrValue);
- } catch (NumberFormatException e) {
- end = null;
- }
- }
-
- public String getLongMessage() {
- return longMessage;
- }
-
- public Integer getStart() {
- return start;
- }
-
- public Integer getEnd() {
- return end;
- }
-
- public String getClassName() {
- return className;
- }
-
- public String getSourcePath() {
- return sourcePath;
- }
-
- public String getSonarJavaFileKey() {
- if (className.indexOf('$') > -1) {
- return className.substring(0, className.indexOf('$'));
- }
- return className;
- }
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.findbugs; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamException; + +import org.codehaus.staxmate.SMInputFactory; +import org.codehaus.staxmate.in.SMInputCursor; +import org.sonar.api.utils.SonarException; +import org.sonar.api.utils.XmlParserException; + +class FindbugsXmlReportParser { + + private final File findbugsXmlReport; + private final String findbugsXmlReportPath; + + public FindbugsXmlReportParser(File findbugsXmlReport) { + this.findbugsXmlReport = findbugsXmlReport; + findbugsXmlReportPath = findbugsXmlReport.getAbsolutePath(); + if ( !findbugsXmlReport.exists()) { + throw new SonarException("The findbugs XML report can't be found at '" + findbugsXmlReportPath + "'"); + } + } + + public List<Violation> getViolations() { + List<Violation> violations = new ArrayList<Violation>(); + try { + SMInputFactory inf = new SMInputFactory(XMLInputFactory.newInstance()); + SMInputCursor cursor = inf.rootElementCursor(findbugsXmlReport).advance(); + SMInputCursor bugInstanceCursor = cursor.childElementCursor("BugInstance").advance(); + while (bugInstanceCursor.asEvent() != null) { + String type = bugInstanceCursor.getAttrValue("type"); + String longMessage = ""; + SMInputCursor bugInstanceChildCursor = bugInstanceCursor.childElementCursor().advance(); + while (bugInstanceChildCursor.asEvent() != null) { + String nodeName = bugInstanceChildCursor.getLocalName(); + if ("LongMessage".equals(nodeName)) { + longMessage = bugInstanceChildCursor.collectDescendantText(); + } else if ("SourceLine".equals(nodeName)) { + Violation fbViolation = new Violation(); + fbViolation.type = type; + fbViolation.longMessage = longMessage; + fbViolation.parseStart(bugInstanceChildCursor.getAttrValue("start")); + fbViolation.parseEnd(bugInstanceChildCursor.getAttrValue("end")); + fbViolation.className = bugInstanceChildCursor.getAttrValue("classname"); + fbViolation.sourcePath = bugInstanceChildCursor.getAttrValue("sourcepath"); + violations.add(fbViolation); + } + bugInstanceChildCursor.advance(); + } + bugInstanceCursor.advance(); + } + cursor.getStreamReader().closeCompletely(); + } catch (XMLStreamException e) { + throw new XmlParserException("Unable to parse the Findbugs XML Report '" + findbugsXmlReportPath + "'", e); + } + return violations; + } + + public static class Violation { + + private String type; + private String longMessage; + private Integer start; + private Integer end; + protected String className; + protected String sourcePath; + + public String getType() { + return type; + } + + public void parseStart(String attrValue) { + try { + start = Integer.parseInt(attrValue); + } catch (NumberFormatException e) { + start = null; + } + } + + public void parseEnd(String attrValue) { + try { + end = Integer.parseInt(attrValue); + } catch (NumberFormatException e) { + end = null; + } + } + + public String getLongMessage() { + return longMessage; + } + + public Integer getStart() { + return start; + } + + public Integer getEnd() { + return end; + } + + public String getClassName() { + return className; + } + + public String getSourcePath() { + return sourcePath; + } + + public String getSonarJavaFileKey() { + if (className.indexOf('$') > -1) { + return className.substring(0, className.indexOf('$')); + } + return className; + } + } + +} diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/SonarWayWithFindbugsProfile.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/SonarWayWithFindbugsProfile.java index e7b70e12dc1..31e959a41e3 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/SonarWayWithFindbugsProfile.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/SonarWayWithFindbugsProfile.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/Bug.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/Bug.java index ebc836d8b1f..99c03c92256 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/Bug.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/Bug.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/ClassFilter.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/ClassFilter.java index e8b307692c2..9b2d7fbe396 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/ClassFilter.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/ClassFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/FieldFilter.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/FieldFilter.java index 384c90c9a39..dcf814e9bdd 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/FieldFilter.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/FieldFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/FindBugsFilter.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/FindBugsFilter.java index a9cbc70a742..f32a9833719 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/FindBugsFilter.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/FindBugsFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/LocalFilter.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/LocalFilter.java index af26485cbd7..3e400688d37 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/LocalFilter.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/LocalFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/Match.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/Match.java index e8fb48778ee..6db62a6ab84 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/Match.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/Match.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/MethodFilter.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/MethodFilter.java index 78d353b6653..c492e00af1d 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/MethodFilter.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/MethodFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/OrFilter.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/OrFilter.java index 1fcdc24cbdf..46f25dade69 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/OrFilter.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/OrFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/PackageFilter.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/PackageFilter.java index 858528fadd7..d4221823268 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/PackageFilter.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/PackageFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/Priority.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/Priority.java index 6541bf3207c..7d1e77b2e56 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/Priority.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/Priority.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FakeRuleFinder.java b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FakeRuleFinder.java index 6ae98f1ea5d..d73fdeba831 100644 --- a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FakeRuleFinder.java +++ b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FakeRuleFinder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsAntConverterTest.java b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsAntConverterTest.java index d3625f052a4..68ef215d40e 100644 --- a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsAntConverterTest.java +++ b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsAntConverterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsConfigurationTest.java b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsConfigurationTest.java index e31d0d0a462..ef4b16df8d0 100644 --- a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsConfigurationTest.java +++ b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsConfigurationTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsExecutorTest.java b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsExecutorTest.java index 8e488266754..812f5180b8e 100644 --- a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsExecutorTest.java +++ b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsExecutorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsProfileExporterTest.java b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsProfileExporterTest.java index 52b7c246781..ab75288b390 100644 --- a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsProfileExporterTest.java +++ b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsProfileExporterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsProfileImporterTest.java b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsProfileImporterTest.java index 206ccdfc07d..5597ba3d898 100644 --- a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsProfileImporterTest.java +++ b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsProfileImporterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsRuleRepositoryTest.java b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsRuleRepositoryTest.java index 87c499354bc..1a5059f2bd5 100644 --- a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsRuleRepositoryTest.java +++ b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsRuleRepositoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsSensorTest.java b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsSensorTest.java index d436502634a..149ec5daeaf 100644 --- a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsSensorTest.java +++ b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsSensorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsTests.java b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsTests.java index 4312ec6b49d..900032273b2 100644 --- a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsTests.java +++ b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsTests.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsVersionTest.java b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsVersionTest.java index d9d86eb9587..5fc61429e29 100644 --- a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsVersionTest.java +++ b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsVersionTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsXmlReportParserTest.java b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsXmlReportParserTest.java index 35511b8cd3f..576e3b0b69c 100644 --- a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsXmlReportParserTest.java +++ b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsXmlReportParserTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/SonarWayWithFindbugsProfileTest.java b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/SonarWayWithFindbugsProfileTest.java index a21e3ccaecc..1a580d03c38 100644 --- a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/SonarWayWithFindbugsProfileTest.java +++ b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/SonarWayWithFindbugsProfileTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-googleanalytics-plugin/src/main/java/org/sonar/plugins/googleanalytics/GoogleAnalyticsPlugin.java b/plugins/sonar-googleanalytics-plugin/src/main/java/org/sonar/plugins/googleanalytics/GoogleAnalyticsPlugin.java index 79fa7cd1c73..2f667a7fb91 100644 --- a/plugins/sonar-googleanalytics-plugin/src/main/java/org/sonar/plugins/googleanalytics/GoogleAnalyticsPlugin.java +++ b/plugins/sonar-googleanalytics-plugin/src/main/java/org/sonar/plugins/googleanalytics/GoogleAnalyticsPlugin.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-googleanalytics-plugin/src/main/java/org/sonar/plugins/googleanalytics/GoogleAnalyticsWebFooter.java b/plugins/sonar-googleanalytics-plugin/src/main/java/org/sonar/plugins/googleanalytics/GoogleAnalyticsWebFooter.java index a2059a70fb7..7d90741a6f9 100644 --- a/plugins/sonar-googleanalytics-plugin/src/main/java/org/sonar/plugins/googleanalytics/GoogleAnalyticsWebFooter.java +++ b/plugins/sonar-googleanalytics-plugin/src/main/java/org/sonar/plugins/googleanalytics/GoogleAnalyticsWebFooter.java @@ -1,63 +1,63 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.googleanalytics;
-
-import org.apache.commons.configuration.Configuration;
-import org.sonar.api.CoreProperties;
-import org.sonar.api.web.Footer;
-
-public class GoogleAnalyticsWebFooter implements Footer {
-
- private Configuration configuration;
-
- public GoogleAnalyticsWebFooter(Configuration configuration) {
- this.configuration = configuration;
- }
-
- protected String getIdAccount() {
- return configuration.getString(CoreProperties.GOOGLE_ANALYTICS_ACCOUNT_PROPERTY, "");
- }
-
- public String getKey() {
- return "webfooter_" + CoreProperties.GOOGLE_ANALYTICS_PLUGIN;
- }
-
- public String getHtml() {
- String id = getIdAccount();
- if (id != null && !"".equals(id)) {
- return "<script type=\"text/javascript\">\n" +
- "var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");\n" +
- "document.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));\n" +
- "</script>\n" +
- "<script type=\"text/javascript\">\n" +
- "var pageTracker = _gat._getTracker(\"" + id + "\");\n" +
- "pageTracker._initData();\n" +
- "pageTracker._trackPageview();\n" +
- "</script>";
- }
- return null;
- }
-
- @Override
- public String toString() {
- return getKey();
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.googleanalytics; + +import org.apache.commons.configuration.Configuration; +import org.sonar.api.CoreProperties; +import org.sonar.api.web.Footer; + +public class GoogleAnalyticsWebFooter implements Footer { + + private Configuration configuration; + + public GoogleAnalyticsWebFooter(Configuration configuration) { + this.configuration = configuration; + } + + protected String getIdAccount() { + return configuration.getString(CoreProperties.GOOGLE_ANALYTICS_ACCOUNT_PROPERTY, ""); + } + + public String getKey() { + return "webfooter_" + CoreProperties.GOOGLE_ANALYTICS_PLUGIN; + } + + public String getHtml() { + String id = getIdAccount(); + if (id != null && !"".equals(id)) { + return "<script type=\"text/javascript\">\n" + + "var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");\n" + + "document.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));\n" + + "</script>\n" + + "<script type=\"text/javascript\">\n" + + "var pageTracker = _gat._getTracker(\"" + id + "\");\n" + + "pageTracker._initData();\n" + + "pageTracker._trackPageview();\n" + + "</script>"; + } + return null; + } + + @Override + public String toString() { + return getKey(); + } + +} diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdConfiguration.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdConfiguration.java index 4bace7566ea..36c583a0c09 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdConfiguration.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdConfiguration.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdConstants.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdConstants.java index 682d706a039..cf6c72c3f35 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdConstants.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdConstants.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdExecutor.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdExecutor.java index 5c613c42448..64b0005b9cc 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdExecutor.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdExecutor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdLevelUtils.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdLevelUtils.java index f0429b16aed..e4018c20960 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdLevelUtils.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdLevelUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdPlugin.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdPlugin.java index f745333dd45..3db3b2687cc 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdPlugin.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdPlugin.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdProfileExporter.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdProfileExporter.java index dd72f846a1c..a7024f01eb8 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdProfileExporter.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdProfileExporter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdProfileImporter.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdProfileImporter.java index bd25d94c34e..1c87b66ac6e 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdProfileImporter.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdProfileImporter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdRuleRepository.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdRuleRepository.java index 04fe1fdfe76..d6e26a97135 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdRuleRepository.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdRuleRepository.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdSensor.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdSensor.java index 91d14497bbe..6228fd8af62 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdSensor.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdSensor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdVersion.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdVersion.java index d0fbfefc60b..d08b484163e 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdVersion.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdVersion.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdViolationsXmlParser.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdViolationsXmlParser.java index 60803a680cc..37cbc4f7801 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdViolationsXmlParser.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdViolationsXmlParser.java @@ -1,78 +1,78 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.pmd;
-
-import org.apache.commons.lang.StringUtils;
-import org.codehaus.staxmate.in.SMInputCursor;
-import org.sonar.api.CoreProperties;
-import org.sonar.api.batch.AbstractViolationsStaxParser;
-import org.sonar.api.batch.SensorContext;
-import org.sonar.api.profiles.RulesProfile;
-import org.sonar.api.resources.JavaFile;
-import org.sonar.api.resources.Project;
-import org.sonar.api.resources.Resource;
-import org.sonar.api.rules.RulesManager;
-
-import javax.xml.stream.XMLStreamException;
-
-class PmdViolationsXmlParser extends AbstractViolationsStaxParser {
-
- private Project project;
-
- PmdViolationsXmlParser(Project project, SensorContext context, RulesManager rulesManager, RulesProfile profile) {
- super(context, rulesManager, profile);
- this.project = project;
- }
-
- @Override
- protected String keyForPlugin() {
- return CoreProperties.PMD_PLUGIN;
- }
-
- @Override
- protected SMInputCursor cursorForResources(SMInputCursor rootCursor) throws XMLStreamException {
- return rootCursor.descendantElementCursor("file");
- }
-
- @Override
- protected SMInputCursor cursorForViolations(SMInputCursor resourcesCursor) throws XMLStreamException {
- return resourcesCursor.descendantElementCursor("violation");
- }
-
- @Override
- protected String lineNumberForViolation(SMInputCursor violationCursor) throws XMLStreamException {
- return violationCursor.getAttrValue("beginline");
- }
-
- @Override
- protected String messageFor(SMInputCursor violationCursor) throws XMLStreamException {
- return StringUtils.trim(violationCursor.collectDescendantText());
- }
-
- @Override
- protected String ruleKey(SMInputCursor violationCursor) throws XMLStreamException {
- return violationCursor.getAttrValue("rule");
- }
-
- @Override
- protected Resource toResource(SMInputCursor resourcesCursor) throws XMLStreamException {
- return JavaFile.fromAbsolutePath(resourcesCursor.getAttrValue("name"), project.getFileSystem().getSourceDirs(), false);
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.pmd; + +import org.apache.commons.lang.StringUtils; +import org.codehaus.staxmate.in.SMInputCursor; +import org.sonar.api.CoreProperties; +import org.sonar.api.batch.AbstractViolationsStaxParser; +import org.sonar.api.batch.SensorContext; +import org.sonar.api.profiles.RulesProfile; +import org.sonar.api.resources.JavaFile; +import org.sonar.api.resources.Project; +import org.sonar.api.resources.Resource; +import org.sonar.api.rules.RulesManager; + +import javax.xml.stream.XMLStreamException; + +class PmdViolationsXmlParser extends AbstractViolationsStaxParser { + + private Project project; + + PmdViolationsXmlParser(Project project, SensorContext context, RulesManager rulesManager, RulesProfile profile) { + super(context, rulesManager, profile); + this.project = project; + } + + @Override + protected String keyForPlugin() { + return CoreProperties.PMD_PLUGIN; + } + + @Override + protected SMInputCursor cursorForResources(SMInputCursor rootCursor) throws XMLStreamException { + return rootCursor.descendantElementCursor("file"); + } + + @Override + protected SMInputCursor cursorForViolations(SMInputCursor resourcesCursor) throws XMLStreamException { + return resourcesCursor.descendantElementCursor("violation"); + } + + @Override + protected String lineNumberForViolation(SMInputCursor violationCursor) throws XMLStreamException { + return violationCursor.getAttrValue("beginline"); + } + + @Override + protected String messageFor(SMInputCursor violationCursor) throws XMLStreamException { + return StringUtils.trim(violationCursor.collectDescendantText()); + } + + @Override + protected String ruleKey(SMInputCursor violationCursor) throws XMLStreamException { + return violationCursor.getAttrValue("rule"); + } + + @Override + protected Resource toResource(SMInputCursor resourcesCursor) throws XMLStreamException { + return JavaFile.fromAbsolutePath(resourcesCursor.getAttrValue("name"), project.getFileSystem().getSourceDirs(), false); + } +} diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/SonarWayProfile.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/SonarWayProfile.java index fab6bf05f21..2a4b27ac788 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/SonarWayProfile.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/SonarWayProfile.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/SonarWayWithFindbugsProfile.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/SonarWayWithFindbugsProfile.java index f75d86f81c6..260484fd538 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/SonarWayWithFindbugsProfile.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/SonarWayWithFindbugsProfile.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/SunConventionsProfile.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/SunConventionsProfile.java index 46d4dffb515..a65d4cc3ea6 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/SunConventionsProfile.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/SunConventionsProfile.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdProperty.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdProperty.java index a7d502979b3..1ad06e0ca12 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdProperty.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdProperty.java @@ -1,58 +1,58 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.pmd.xml;
-
-public class PmdProperty {
-
- private String name;
-
- private String value;
-
- private String cdataValue;
-
- public PmdProperty(String name, String value) {
- this.name = name;
- this.value = value;
- }
-
- public String getName() {
- return name;
- }
-
- public String getValue() {
- return value;
- }
-
- public String getCdataValue() {
- return cdataValue;
- }
-
- public boolean isCdataValue(){
- return cdataValue != null;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-
- public void setCdataValue(String cdataValue) {
- this.cdataValue = cdataValue;
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.pmd.xml; + +public class PmdProperty { + + private String name; + + private String value; + + private String cdataValue; + + public PmdProperty(String name, String value) { + this.name = name; + this.value = value; + } + + public String getName() { + return name; + } + + public String getValue() { + return value; + } + + public String getCdataValue() { + return cdataValue; + } + + public boolean isCdataValue(){ + return cdataValue != null; + } + + public void setValue(String value) { + this.value = value; + } + + public void setCdataValue(String cdataValue) { + this.cdataValue = cdataValue; + } +} diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdRule.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdRule.java index 87305df110f..7cc292162ce 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdRule.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdRule.java @@ -1,124 +1,124 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.pmd.xml;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class PmdRule implements Comparable<String> {
-
- private String ref;
-
- private String priority;
-
- private String name;
-
- private String message;
-
- private List<PmdProperty> properties = new ArrayList<PmdProperty>();
-
- private String clazz;// NOSONAR unused private field
-
- public PmdRule(String ref) {
- this(ref, null);
- }
-
- public PmdRule(String ref, String priority) {
- this.ref = ref;
- this.priority = priority;
- }
-
- public String getRef() {
- return ref;
- }
-
- public void setProperties(List<PmdProperty> properties) {
- this.properties = properties;
- }
-
- public List<PmdProperty> getProperties() {
- return properties;
- }
-
- public PmdProperty getProperty(String propertyName) {
- for (PmdProperty prop : properties) {
- if (propertyName.equals(prop.getName())) {
- return prop;
- }
- }
- return null;
- }
-
- public int compareTo(String o) {
- return o.compareTo(ref);
- }
-
- public String getPriority() {
- return priority;
- }
-
- public void setPriority(String priority) {
- this.priority = priority;
- }
-
- public void addProperty(PmdProperty property) {
- if (properties == null) {
- properties = new ArrayList<PmdProperty>();
- }
- properties.add(property);
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-
- public String getMessage() {
- return message;
- }
-
- public String getClazz() {
- return clazz;
- }
-
- public void setRef(String ref) {
- this.ref = ref;
- }
-
- public void removeProperty(String propertyName) {
- PmdProperty prop = getProperty(propertyName);
- properties.remove(prop);
- }
-
- public void setClazz(String clazz) {
- this.clazz = clazz;
- }
-
- public String getName() {
- return name;
- }
-
- public boolean hasProperties() {
- return properties != null && !properties.isEmpty();
- }
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.pmd.xml; + +import java.util.ArrayList; +import java.util.List; + +public class PmdRule implements Comparable<String> { + + private String ref; + + private String priority; + + private String name; + + private String message; + + private List<PmdProperty> properties = new ArrayList<PmdProperty>(); + + private String clazz;// NOSONAR unused private field + + public PmdRule(String ref) { + this(ref, null); + } + + public PmdRule(String ref, String priority) { + this.ref = ref; + this.priority = priority; + } + + public String getRef() { + return ref; + } + + public void setProperties(List<PmdProperty> properties) { + this.properties = properties; + } + + public List<PmdProperty> getProperties() { + return properties; + } + + public PmdProperty getProperty(String propertyName) { + for (PmdProperty prop : properties) { + if (propertyName.equals(prop.getName())) { + return prop; + } + } + return null; + } + + public int compareTo(String o) { + return o.compareTo(ref); + } + + public String getPriority() { + return priority; + } + + public void setPriority(String priority) { + this.priority = priority; + } + + public void addProperty(PmdProperty property) { + if (properties == null) { + properties = new ArrayList<PmdProperty>(); + } + properties.add(property); + } + + public void setName(String name) { + this.name = name; + } + + public void setMessage(String message) { + this.message = message; + } + + public String getMessage() { + return message; + } + + public String getClazz() { + return clazz; + } + + public void setRef(String ref) { + this.ref = ref; + } + + public void removeProperty(String propertyName) { + PmdProperty prop = getProperty(propertyName); + properties.remove(prop); + } + + public void setClazz(String clazz) { + this.clazz = clazz; + } + + public String getName() { + return name; + } + + public boolean hasProperties() { + return properties != null && !properties.isEmpty(); + } }
\ No newline at end of file diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdRuleset.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdRuleset.java index 9df698a6a95..19ecf314911 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdRuleset.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdRuleset.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdConfigurationTest.java b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdConfigurationTest.java index 4a5498e8d3a..ed34c3940ae 100644 --- a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdConfigurationTest.java +++ b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdConfigurationTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdExecutorTest.java b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdExecutorTest.java index 07e9fb3a677..5cd3989546a 100644 --- a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdExecutorTest.java +++ b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdExecutorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdProfileExporterTest.java b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdProfileExporterTest.java index 031c88ad0f2..3fc3a2dfcce 100644 --- a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdProfileExporterTest.java +++ b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdProfileExporterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdProfileImporterTest.java b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdProfileImporterTest.java index 5a73f501448..3d9518efc2a 100644 --- a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdProfileImporterTest.java +++ b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdProfileImporterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdRuleRepositoryTest.java b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdRuleRepositoryTest.java index d726c28564e..b8c0a2433d8 100644 --- a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdRuleRepositoryTest.java +++ b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdRuleRepositoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdVersionTest.java b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdVersionTest.java index f95bedc1c75..8ae7a3a9e8a 100644 --- a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdVersionTest.java +++ b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdVersionTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdViolationsXmlParserTest.java b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdViolationsXmlParserTest.java index fdfea3f98ba..98e9a9a27fc 100644 --- a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdViolationsXmlParserTest.java +++ b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdViolationsXmlParserTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/SonarWayProfileTest.java b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/SonarWayProfileTest.java index ba5abe42307..136acadc5db 100644 --- a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/SonarWayProfileTest.java +++ b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/SonarWayProfileTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/SonarWayWithFindbugsProfileTest.java b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/SonarWayWithFindbugsProfileTest.java index 9e0ab0018f3..7ad207eba01 100644 --- a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/SonarWayWithFindbugsProfileTest.java +++ b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/SonarWayWithFindbugsProfileTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/SunConventionsProfileTest.java b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/SunConventionsProfileTest.java index b55a44b773f..d877db554f3 100644 --- a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/SunConventionsProfileTest.java +++ b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/SunConventionsProfileTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/PatternUtils.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/PatternUtils.java index bf4313997a7..fa0041d176f 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/PatternUtils.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/PatternUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/CheckstyleAuditListener.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/CheckstyleAuditListener.java index a63ddea630c..a96fe8b47a0 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/CheckstyleAuditListener.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/CheckstyleAuditListener.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/CheckstyleSquidBridge.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/CheckstyleSquidBridge.java index 4371668df72..3607ab3fe82 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/CheckstyleSquidBridge.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/CheckstyleSquidBridge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/JavaAstScanner.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/JavaAstScanner.java index 5a5094dae57..ae908db4c67 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/JavaAstScanner.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/JavaAstScanner.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/BreakCheck.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/BreakCheck.java index dc3cd9a9b9f..73f853bebe3 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/BreakCheck.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/BreakCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/ContinueCheck.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/ContinueCheck.java index 6249ada3a95..773eef025f6 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/ContinueCheck.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/ContinueCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/JavaAstCheck.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/JavaAstCheck.java index 6607c8eacf0..19916649f14 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/JavaAstCheck.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/JavaAstCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/UndocumentedApiCheck.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/UndocumentedApiCheck.java index 845a222cf06..c87626b8b19 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/UndocumentedApiCheck.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/UndocumentedApiCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/AccessorVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/AccessorVisitor.java index 0ce97322816..241a11c69a5 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/AccessorVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/AccessorVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/AnonymousInnerClassVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/AnonymousInnerClassVisitor.java index fa1e8427547..51e09d45883 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/AnonymousInnerClassVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/AnonymousInnerClassVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/AstUtils.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/AstUtils.java index c4d7dfc98e1..b34b8856a01 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/AstUtils.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/AstUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/BlankLinesVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/BlankLinesVisitor.java index be20ffb2d88..6d9c735817c 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/BlankLinesVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/BlankLinesVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/BranchVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/BranchVisitor.java index f1d7030b8bd..f07764467b1 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/BranchVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/BranchVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/ClassVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/ClassVisitor.java index 4995f90c4b0..722e5809933 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/ClassVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/ClassVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/CommentVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/CommentVisitor.java index 01b0ca1b9ba..a5184ea34d9 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/CommentVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/CommentVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/ComplexityVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/ComplexityVisitor.java index da1411f78ee..07b9e0b9c18 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/ComplexityVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/ComplexityVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/EndAtLineVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/EndAtLineVisitor.java index 931d43e5288..0b979831e56 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/EndAtLineVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/EndAtLineVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/FileVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/FileVisitor.java index 6f7bffd6a81..935a4f817e7 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/FileVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/FileVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/JavaAstVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/JavaAstVisitor.java index ebd20587f7b..c0c4c635c50 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/JavaAstVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/JavaAstVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/LinesOfCodeVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/LinesOfCodeVisitor.java index 0a891c95210..9c53b6d454a 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/LinesOfCodeVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/LinesOfCodeVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/LinesVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/LinesVisitor.java index d43f678fe7b..b9f95bd0f00 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/LinesVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/LinesVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/MethodVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/MethodVisitor.java index e1e08dcccab..20baa6befc7 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/MethodVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/MethodVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/PackageVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/PackageVisitor.java index fdf4a14b7aa..a0ba7e71430 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/PackageVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/PackageVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/PublicApiVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/PublicApiVisitor.java index 9db70862ddd..bd4fefc4133 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/PublicApiVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/PublicApiVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/StatementVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/StatementVisitor.java index 6bf3b55ba96..e75e57226b2 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/StatementVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/StatementVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/SuppressWarningsAnnotationUtils.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/SuppressWarningsAnnotationUtils.java index f35441b34a1..b36f9d3f6fa 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/SuppressWarningsAnnotationUtils.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/SuppressWarningsAnnotationUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/BytecodeScanner.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/BytecodeScanner.java index fde4fddf9b6..908b9fbfe3f 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/BytecodeScanner.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/BytecodeScanner.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/BytecodeVisitorNotifier.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/BytecodeVisitorNotifier.java index 0b274fb40c9..75c7c56c0a4 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/BytecodeVisitorNotifier.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/BytecodeVisitorNotifier.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/ClassworldsClassLoader.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/ClassworldsClassLoader.java index d92924122d6..4cc10aedce1 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/ClassworldsClassLoader.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/ClassworldsClassLoader.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/VirtualMethodsLinker.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/VirtualMethodsLinker.java index 3f40eede2bd..b132ef7eb8d 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/VirtualMethodsLinker.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/VirtualMethodsLinker.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmAccessFlags.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmAccessFlags.java index 3458b35f81e..481395d42b3 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmAccessFlags.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmAccessFlags.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClass.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClass.java index e5793a23d36..b61137b3428 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClass.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClass.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClassProvider.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClassProvider.java index c3679949744..9969d9d4697 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClassProvider.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClassProvider.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClassProviderImpl.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClassProviderImpl.java index 4805ec4c40e..3ae1bade06f 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClassProviderImpl.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClassProviderImpl.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClassVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClassVisitor.java index 675bd1393c3..e05878c42de 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClassVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClassVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmEdge.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmEdge.java index 21ec77371ba..d0e46a0458e 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmEdge.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmEdge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmField.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmField.java index 4a9bed4ed22..f3d17025ccd 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmField.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmField.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmMethod.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmMethod.java index c2581b0ae7e..dbb29d6557f 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmMethod.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmMethod.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmMethodVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmMethodVisitor.java index 5918af867a2..852e8a8c32a 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmMethodVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmMethodVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmResource.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmResource.java index 08e775c61ab..5d58c51deb7 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmResource.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmResource.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmSignature.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmSignature.java index 62340fb2bdd..4566c7e6724 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmSignature.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmSignature.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmSignatureVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmSignatureVisitor.java index af8ad8e0a94..35a8fd81c36 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmSignatureVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmSignatureVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmType.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmType.java index e079530a6d2..cbff543391e 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmType.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmType.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/ArchitectureCheck.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/ArchitectureCheck.java index 87a1c883579..b272f1ef58b 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/ArchitectureCheck.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/ArchitectureCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/BytecodeCheck.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/BytecodeCheck.java index 2fc463a1632..ad24cf3e903 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/BytecodeCheck.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/BytecodeCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/CallToDeprecatedMethodCheck.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/CallToDeprecatedMethodCheck.java index 0565ad57495..9dc17a1b4f9 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/CallToDeprecatedMethodCheck.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/CallToDeprecatedMethodCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/SerializableContract.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/SerializableContract.java index b77b47b6ac1..81d125ded12 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/SerializableContract.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/SerializableContract.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/UnusedPrivateMethodCheck.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/UnusedPrivateMethodCheck.java index 63c498df775..f91fb6da9d7 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/UnusedPrivateMethodCheck.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/UnusedPrivateMethodCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/UnusedProtectedMethodCheck.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/UnusedProtectedMethodCheck.java index 5c82048f70e..ea933b15184 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/UnusedProtectedMethodCheck.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/UnusedProtectedMethodCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/AccessorVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/AccessorVisitor.java index f5fa286c0b7..46b52d1b023 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/AccessorVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/AccessorVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/BytecodeVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/BytecodeVisitor.java index 0123195179c..9240ccbff98 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/BytecodeVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/BytecodeVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/DITVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/DITVisitor.java index 90cab186844..e906aaba386 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/DITVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/DITVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/DependenciesVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/DependenciesVisitor.java index d5668e072e0..e2ab1d72e4f 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/DependenciesVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/DependenciesVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/LCOM4Visitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/LCOM4Visitor.java index 17dd16fca68..e74fb2ea9c6 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/LCOM4Visitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/LCOM4Visitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/NOCVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/NOCVisitor.java index 434a1b76b60..65c6c13a50a 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/NOCVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/NOCVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/RFCVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/RFCVisitor.java index 228ce0226eb..ea51f1b5bc3 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/RFCVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/RFCVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/recognizer/JavaFootprint.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/recognizer/JavaFootprint.java index 998ff4a4dc9..5990b6d9148 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/recognizer/JavaFootprint.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/recognizer/JavaFootprint.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/JvmJavaType.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/JvmJavaType.java index 975788aa35d..2617d557b5d 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/JvmJavaType.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/JvmJavaType.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/MethodSignature.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/MethodSignature.java index 78517bd6c54..164f34722fa 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/MethodSignature.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/MethodSignature.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/MethodSignaturePrinter.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/MethodSignaturePrinter.java index 236bd6b61cc..da1a8b0b967 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/MethodSignaturePrinter.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/MethodSignaturePrinter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/MethodSignatureScanner.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/MethodSignatureScanner.java index 0aabea3f348..ad8ae7854db 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/MethodSignatureScanner.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/MethodSignatureScanner.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/Parameter.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/Parameter.java index 2714a2f88ae..b74a2e20c93 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/Parameter.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/Parameter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/ParameterSignaturePrinter.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/ParameterSignaturePrinter.java index f5bb4e76bff..8bb5809b407 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/ParameterSignaturePrinter.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/ParameterSignaturePrinter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/ParameterSignatureScanner.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/ParameterSignatureScanner.java index 8763b9bd464..b1087c8a82d 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/ParameterSignatureScanner.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/ParameterSignatureScanner.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/JavaSquidConfiguration.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/JavaSquidConfiguration.java index 817d4962477..e1e72bf4f90 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/JavaSquidConfiguration.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/JavaSquidConfiguration.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/SquidScanner.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/SquidScanner.java index 519d4fcd041..808099dd817 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/SquidScanner.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/SquidScanner.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/SquidVisitorNotifier.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/SquidVisitorNotifier.java index 550b1f956eb..f0dfe16a1aa 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/SquidVisitorNotifier.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/SquidVisitorNotifier.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/ClassComplexityCheck.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/ClassComplexityCheck.java index f48f6f1d692..faa95c72a7a 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/ClassComplexityCheck.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/ClassComplexityCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/DITCheck.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/DITCheck.java index 347b9b3bdfb..b9b13f76f26 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/DITCheck.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/DITCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/MethodComplexityCheck.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/MethodComplexityCheck.java index 84ffe5f0b95..186e859f38f 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/MethodComplexityCheck.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/MethodComplexityCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/NoSonarCheck.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/NoSonarCheck.java index dff3f4dbac3..1b329314b61 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/NoSonarCheck.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/NoSonarCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/SquidCheck.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/SquidCheck.java index 4cf44a75a9a..8823a309d81 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/SquidCheck.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/SquidCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/visitor/SquidVisitor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/visitor/SquidVisitor.java index e5b9bcd3ede..26bbbaa7b19 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/visitor/SquidVisitor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/visitor/SquidVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/JavaSourceImporter.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/JavaSourceImporter.java index 23bcd777f59..9627ba5f9f5 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/JavaSourceImporter.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/JavaSourceImporter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidConstants.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidConstants.java index 4654c0eb24f..5a9f9b25b75 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidConstants.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidConstants.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidExecutor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidExecutor.java index 46ffd241297..c96dd325793 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidExecutor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidExecutor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidPlugin.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidPlugin.java index 6fed2b2c84c..b3236c09757 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidPlugin.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidPlugin.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidPluginProperties.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidPluginProperties.java index f087d55c748..4e884bc3ffc 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidPluginProperties.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidPluginProperties.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidRuleRepository.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidRuleRepository.java index ef9fa2e531e..7558aa95b6e 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidRuleRepository.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidRuleRepository.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidSearchProxy.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidSearchProxy.java index e124214d461..0dad86dd95a 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidSearchProxy.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidSearchProxy.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidSensor.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidSensor.java index 56245cd153b..9024be2db3d 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidSensor.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidSensor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/Bridge.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/Bridge.java index 01752ffe749..c819e5a930f 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/Bridge.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/Bridge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/BridgeFactory.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/BridgeFactory.java index b621e87b230..bbadc0ae4e8 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/BridgeFactory.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/BridgeFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChecksBridge.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChecksBridge.java index 9be67bee3cb..0587bd6e15f 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChecksBridge.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChecksBridge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChidamberKemererBridge.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChidamberKemererBridge.java index 645d79ac607..53cc50904bd 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChidamberKemererBridge.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChidamberKemererBridge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChidamberKemererDistributionBridge.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChidamberKemererDistributionBridge.java index d2a3c467d6d..9a4ef5f4192 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChidamberKemererDistributionBridge.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChidamberKemererDistributionBridge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ClassComplexityDistributionBridge.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ClassComplexityDistributionBridge.java index 0bdbec7b52b..a9ae54a9cbd 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ClassComplexityDistributionBridge.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ClassComplexityDistributionBridge.java @@ -1,61 +1,61 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.squid.bridges;
-
-import org.sonar.api.measures.CoreMetrics;
-import org.sonar.api.measures.Measure;
-import org.sonar.api.resources.Resource;
-import org.sonar.squid.Squid;
-import org.sonar.squid.api.SourceClass;
-import org.sonar.squid.api.SourceCode;
-import org.sonar.squid.api.SourcePackage;
-import org.sonar.squid.indexer.QueryByParent;
-import org.sonar.squid.indexer.QueryByType;
-import org.sonar.squid.math.MeasuresDistribution;
-import org.sonar.squid.measures.Metric;
-
-import java.util.Map;
-
-public class ClassComplexityDistributionBridge extends Bridge {
-
- public static final int[] CLASSES_DISTRIB_BOTTOM_LIMITS = {0, 5, 10, 20, 30, 60, 90};
-
- protected ClassComplexityDistributionBridge() {
- super(false);
- }
-
- @Override
- public final void onPackage(SourcePackage squidPackage, Resource sonarPackage) {
- if (squidPackage.getDouble(Metric.METHODS) > 0) {
- context.saveMeasure(sonarPackage, new Measure(CoreMetrics.CLASS_COMPLEXITY_DISTRIBUTION, getClassesComplexityDistribution(squidPackage, squid)));
- }
- }
-
- private String getClassesComplexityDistribution(SourceCode unit, Squid squid) {
- MeasuresDistribution distribution = new MeasuresDistribution(squid.search(new QueryByParent(unit), new QueryByType(SourceClass.class)));
- Map<Integer, Integer> distrib = distribution.distributeAccordingTo(Metric.COMPLEXITY, CLASSES_DISTRIB_BOTTOM_LIMITS);
- StringBuilder distribString = new StringBuilder(32);
- for (Map.Entry<Integer, Integer> entry : distrib.entrySet()) {
- distribString.append(entry.getKey()).append('=').append(entry.getValue().toString()).append(';');
- }
- distribString.setLength(distribString.length() - 1);
- return distribString.toString();
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.squid.bridges; + +import org.sonar.api.measures.CoreMetrics; +import org.sonar.api.measures.Measure; +import org.sonar.api.resources.Resource; +import org.sonar.squid.Squid; +import org.sonar.squid.api.SourceClass; +import org.sonar.squid.api.SourceCode; +import org.sonar.squid.api.SourcePackage; +import org.sonar.squid.indexer.QueryByParent; +import org.sonar.squid.indexer.QueryByType; +import org.sonar.squid.math.MeasuresDistribution; +import org.sonar.squid.measures.Metric; + +import java.util.Map; + +public class ClassComplexityDistributionBridge extends Bridge { + + public static final int[] CLASSES_DISTRIB_BOTTOM_LIMITS = {0, 5, 10, 20, 30, 60, 90}; + + protected ClassComplexityDistributionBridge() { + super(false); + } + + @Override + public final void onPackage(SourcePackage squidPackage, Resource sonarPackage) { + if (squidPackage.getDouble(Metric.METHODS) > 0) { + context.saveMeasure(sonarPackage, new Measure(CoreMetrics.CLASS_COMPLEXITY_DISTRIBUTION, getClassesComplexityDistribution(squidPackage, squid))); + } + } + + private String getClassesComplexityDistribution(SourceCode unit, Squid squid) { + MeasuresDistribution distribution = new MeasuresDistribution(squid.search(new QueryByParent(unit), new QueryByType(SourceClass.class))); + Map<Integer, Integer> distrib = distribution.distributeAccordingTo(Metric.COMPLEXITY, CLASSES_DISTRIB_BOTTOM_LIMITS); + StringBuilder distribString = new StringBuilder(32); + for (Map.Entry<Integer, Integer> entry : distrib.entrySet()) { + distribString.append(entry.getKey()).append('=').append(entry.getValue().toString()).append(';'); + } + distribString.setLength(distribString.length() - 1); + return distribString.toString(); + } +} diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/CopyBasicMeasuresBridge.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/CopyBasicMeasuresBridge.java index 14cd8876c55..d5f11a53d47 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/CopyBasicMeasuresBridge.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/CopyBasicMeasuresBridge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DependencyIndex.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DependencyIndex.java index 79a0ca76a18..f46c399e9b4 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DependencyIndex.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DependencyIndex.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DesignBridge.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DesignBridge.java index ef98f42a769..d9ebd668028 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DesignBridge.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DesignBridge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DsmSerializer.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DsmSerializer.java index 58abb4c49f7..85a7a892857 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DsmSerializer.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DsmSerializer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/FunctionComplexityDistributionBridge.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/FunctionComplexityDistributionBridge.java index e091d4cd233..f51ff51cde8 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/FunctionComplexityDistributionBridge.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/FunctionComplexityDistributionBridge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/Lcom4BlocksBridge.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/Lcom4BlocksBridge.java index 8971e618b4e..dd11d3d9122 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/Lcom4BlocksBridge.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/Lcom4BlocksBridge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/NoSonarFilterLoader.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/NoSonarFilterLoader.java index abbff8ec449..e73de853a8a 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/NoSonarFilterLoader.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/NoSonarFilterLoader.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/PackagesBridge.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/PackagesBridge.java index 9c76901e838..737991ddfc2 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/PackagesBridge.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/PackagesBridge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/PublicUndocumentedApiBridge.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/PublicUndocumentedApiBridge.java index bd455b46187..39fddb3d01c 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/PublicUndocumentedApiBridge.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/PublicUndocumentedApiBridge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ResourceIndex.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ResourceIndex.java index b9c5819b994..ba49a80d6de 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ResourceIndex.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ResourceIndex.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/RobertCMartinBridge.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/RobertCMartinBridge.java index d67ab464b98..b7fc09e2acc 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/RobertCMartinBridge.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/RobertCMartinBridge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/SquidBrigeException.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/SquidBrigeException.java index 33fb53bf50e..74ebffed78e 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/SquidBrigeException.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/SquidBrigeException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/ClassComplexityDistributionBuilder.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/ClassComplexityDistributionBuilder.java index f0a0636f19c..2b8eb53be18 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/ClassComplexityDistributionBuilder.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/ClassComplexityDistributionBuilder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/ClassesDecorator.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/ClassesDecorator.java index aa605bdefd2..5e87d950cb4 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/ClassesDecorator.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/ClassesDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/FunctionComplexityDistributionBuilder.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/FunctionComplexityDistributionBuilder.java index 75c5c28fd8e..66570870c6f 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/FunctionComplexityDistributionBuilder.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/FunctionComplexityDistributionBuilder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/FunctionsDecorator.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/FunctionsDecorator.java index e8ec5e24d2b..0f15bf37fa5 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/FunctionsDecorator.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/FunctionsDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/PatternUtilsTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/PatternUtilsTest.java index 5163dc9347d..bb968b06821 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/PatternUtilsTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/PatternUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/JavaAstScannerTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/JavaAstScannerTest.java index 278b552778b..7506dbb50bd 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/JavaAstScannerTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/JavaAstScannerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/SquidTestUtils.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/SquidTestUtils.java index 7f8d3a04b76..766929440cf 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/SquidTestUtils.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/SquidTestUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/check/BreakCheckTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/check/BreakCheckTest.java index 4f375662191..2b61b9ea455 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/check/BreakCheckTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/check/BreakCheckTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/check/ContinueCheckTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/check/ContinueCheckTest.java index 6681c54441c..a5787df6df2 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/check/ContinueCheckTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/check/ContinueCheckTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/check/UndocumentedApiCheckTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/check/UndocumentedApiCheckTest.java index c48138680dd..2888fdcb22d 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/check/UndocumentedApiCheckTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/check/UndocumentedApiCheckTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/AccessorVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/AccessorVisitorTest.java index 9295075d836..7e43874b24f 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/AccessorVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/AccessorVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/AnonymousInnerClassVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/AnonymousInnerClassVisitorTest.java index 0061b15884b..d2827ccabe5 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/AnonymousInnerClassVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/AnonymousInnerClassVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/BlankLinesVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/BlankLinesVisitorTest.java index 301ad8a4852..711872a2831 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/BlankLinesVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/BlankLinesVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/BrancheVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/BrancheVisitorTest.java index d539f2218f7..e385db329ff 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/BrancheVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/BrancheVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/ClassVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/ClassVisitorTest.java index 421fae7069f..ee9a68dec15 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/ClassVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/ClassVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/CommentVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/CommentVisitorTest.java index 83647fe3c05..af8ba251112 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/CommentVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/CommentVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/ComplexityVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/ComplexityVisitorTest.java index 58b446062a7..07e7209ab09 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/ComplexityVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/ComplexityVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/EndAtLineVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/EndAtLineVisitorTest.java index 2f4f524e1e5..dc72f66caea 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/EndAtLineVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/EndAtLineVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/FileVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/FileVisitorTest.java index 3338515f610..7fe8036b70f 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/FileVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/FileVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/HeaderCommentVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/HeaderCommentVisitorTest.java index 1ccd987c592..662f871cdc9 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/HeaderCommentVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/HeaderCommentVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/LinesOfCodeVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/LinesOfCodeVisitorTest.java index d90401b81dc..107945ea0fe 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/LinesOfCodeVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/LinesOfCodeVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/LinesVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/LinesVisitorTest.java index aae2b7f4074..0d0eaec4984 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/LinesVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/LinesVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/MethodVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/MethodVisitorTest.java index 52f955842f4..a8e7d740ec4 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/MethodVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/MethodVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/PublicApiVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/PublicApiVisitorTest.java index d2619567ab7..925d196deda 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/PublicApiVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/PublicApiVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/StatementVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/StatementVisitorTest.java index 93aadbcdd36..ea7f9c57671 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/StatementVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/StatementVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/BytecodeVisitorsTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/BytecodeVisitorsTest.java index 0fbc8ffe163..24cf3c4c5a6 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/BytecodeVisitorsTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/BytecodeVisitorsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/ClassworldsClassLoaderTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/ClassworldsClassLoaderTest.java index 4b555cdb79c..93f0a2b4345 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/ClassworldsClassLoaderTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/ClassworldsClassLoaderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/VirtualMethodsLinkerTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/VirtualMethodsLinkerTest.java index e44af812157..a301b26039a 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/VirtualMethodsLinkerTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/VirtualMethodsLinkerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassProviderImplTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassProviderImplTest.java index 73b12e7a82b..2858a76ff3c 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassProviderImplTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassProviderImplTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassProviderTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassProviderTest.java index 2ed0b915f7e..b306e688b76 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassProviderTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassProviderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassTest.java index 954bde3dc4b..6db108ef116 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassVisitorTest.java index 6565fe19d03..d3b8a507a14 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmFieldTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmFieldTest.java index fa8d0e3332c..6b542992c09 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmFieldTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmFieldTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmFieldVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmFieldVisitorTest.java index a7f7959deee..c1165191e9c 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmFieldVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmFieldVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmMethodTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmMethodTest.java index 3147b3a35c2..127d51b9244 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmMethodTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmMethodTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmMethodVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmMethodVisitorTest.java index 1bbc785bf11..27abac563cc 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmMethodVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmMethodVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmSignatureTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmSignatureTest.java index bb67495464b..0b418dc0cb6 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmSignatureTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmSignatureTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmSignatureVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmSignatureVisitorTest.java index 4bfa2936460..7050db6c186 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmSignatureVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmSignatureVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmTypeTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmTypeTest.java index 9913d015d9f..291645e52fd 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmTypeTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmTypeTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/ArchitectureCheckTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/ArchitectureCheckTest.java index ee21746f770..0c0d4db2ae9 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/ArchitectureCheckTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/ArchitectureCheckTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/CallToDeprecatedMethodCheckTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/CallToDeprecatedMethodCheckTest.java index 5b0139411c1..209c7c6d1d6 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/CallToDeprecatedMethodCheckTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/CallToDeprecatedMethodCheckTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/SerializableContractTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/SerializableContractTest.java index 831e15b369a..2db4a0ce790 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/SerializableContractTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/SerializableContractTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/UnusedPrivateMethodCheckTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/UnusedPrivateMethodCheckTest.java index 6b7aae7d1e1..e09496804e1 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/UnusedPrivateMethodCheckTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/UnusedPrivateMethodCheckTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/UnusedProtectedMethodCheckTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/UnusedProtectedMethodCheckTest.java index 511c024390c..fd89ccdb3d2 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/UnusedProtectedMethodCheckTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/UnusedProtectedMethodCheckTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/visitor/AccessorVisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/visitor/AccessorVisitorTest.java index ddbaf763c7c..5cb36686f5a 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/visitor/AccessorVisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/visitor/AccessorVisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/visitor/LCOM4VisitorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/visitor/LCOM4VisitorTest.java index 8440672778d..4e1bc2bda6d 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/visitor/LCOM4VisitorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/visitor/LCOM4VisitorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/recognizer/JavaFootprintTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/recognizer/JavaFootprintTest.java index d079a4e6328..282c14726b2 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/recognizer/JavaFootprintTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/recognizer/JavaFootprintTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/MethodSignaturePrinterTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/MethodSignaturePrinterTest.java index 94c6f9f4db9..09cb53673a3 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/MethodSignaturePrinterTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/MethodSignaturePrinterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/MethodSignatureScannerTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/MethodSignatureScannerTest.java index 87e214f17aa..8de79955566 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/MethodSignatureScannerTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/MethodSignatureScannerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/ParameterSignaturePrinterTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/ParameterSignaturePrinterTest.java index 70a7e75b863..ee3ffa18c67 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/ParameterSignaturePrinterTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/ParameterSignaturePrinterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/ParameterSignatureScannerTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/ParameterSignatureScannerTest.java index c335a155d6f..79f7b71e8bc 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/ParameterSignatureScannerTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/ParameterSignatureScannerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/ParameterTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/ParameterTest.java index fb6151b7ef2..02fbc8259e5 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/ParameterTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/ParameterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/ClassComplexityCheckTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/ClassComplexityCheckTest.java index c82817d1cb6..66b3ab29ac0 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/ClassComplexityCheckTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/ClassComplexityCheckTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/DITCheckTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/DITCheckTest.java index 466e3ad49b9..0aecce29ae2 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/DITCheckTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/DITCheckTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/MethodComplexityCheckTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/MethodComplexityCheckTest.java index e7567d12250..985fd9b205e 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/MethodComplexityCheckTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/MethodComplexityCheckTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/NoSonarCheckTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/NoSonarCheckTest.java index 9f9c793e2b6..23d196c8b4a 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/NoSonarCheckTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/NoSonarCheckTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/JavaSourceImporterTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/JavaSourceImporterTest.java index f90274d9964..ec98b96ee15 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/JavaSourceImporterTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/JavaSourceImporterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidExecutorTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidExecutorTest.java index d8c39f388c6..18350132b50 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidExecutorTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidExecutorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidPluginTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidPluginTest.java index 4bf33ac016f..52db97389cf 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidPluginTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidPluginTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidSearchProxyTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidSearchProxyTest.java index 503046b9870..016bb315e6d 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidSearchProxyTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidSearchProxyTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidTestUtils.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidTestUtils.java index 30ab80523e6..ec308e66a16 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidTestUtils.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidTestUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/BridgeFactoryTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/BridgeFactoryTest.java index 9b5e847bfc1..783b24fa7d6 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/BridgeFactoryTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/BridgeFactoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/BridgeTestCase.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/BridgeTestCase.java index bfbbbb3e5f9..e0a21d9fe88 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/BridgeTestCase.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/BridgeTestCase.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/ChidamberKemererBridgeTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/ChidamberKemererBridgeTest.java index b67848837f6..964d51977b8 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/ChidamberKemererBridgeTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/ChidamberKemererBridgeTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/DesignBridgeTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/DesignBridgeTest.java index 961690cbe94..086d066b788 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/DesignBridgeTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/DesignBridgeTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/DsmSerializerTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/DsmSerializerTest.java index c533c835dc8..63c7f4e4f8a 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/DsmSerializerTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/DsmSerializerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/Lcom4BlocksBridgeTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/Lcom4BlocksBridgeTest.java index 67e102993dd..4333578a1f0 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/Lcom4BlocksBridgeTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/Lcom4BlocksBridgeTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/PublicUndocumentedApiBridgeTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/PublicUndocumentedApiBridgeTest.java index 435af35c529..e7efd032d92 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/PublicUndocumentedApiBridgeTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/PublicUndocumentedApiBridgeTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/RobertCMartinBridgeTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/RobertCMartinBridgeTest.java index 3799abfa4ba..5e845f8de9d 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/RobertCMartinBridgeTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/RobertCMartinBridgeTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/decorators/ClassComplexityDistributionBuilderTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/decorators/ClassComplexityDistributionBuilderTest.java index 891cf45e928..8066744d7d4 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/decorators/ClassComplexityDistributionBuilderTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/decorators/ClassComplexityDistributionBuilderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/decorators/FunctionComplexityDistributionBuilderTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/decorators/FunctionComplexityDistributionBuilderTest.java index aa0efe31cac..7fe4dc7d94a 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/decorators/FunctionComplexityDistributionBuilderTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/decorators/FunctionComplexityDistributionBuilderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/squid/SquidTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/squid/SquidTest.java index 434bae7495d..3f01a71bd26 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/squid/SquidTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/squid/SquidTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/squid/SquidUserGuideTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/squid/SquidUserGuideTest.java index b0fec1fca0b..9dd2a97b957 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/squid/SquidUserGuideTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/squid/SquidUserGuideTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/SurefirePlugin.java b/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/SurefirePlugin.java index 6286e46e205..aa15b652ced 100644 --- a/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/SurefirePlugin.java +++ b/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/SurefirePlugin.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/SurefireSensor.java b/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/SurefireSensor.java index 70dfe4e38b3..668af1b8f95 100644 --- a/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/SurefireSensor.java +++ b/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/SurefireSensor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/TestCaseDetails.java b/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/TestCaseDetails.java index f409c9e5d34..5209bcbde4f 100644 --- a/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/TestCaseDetails.java +++ b/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/TestCaseDetails.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/TestSuiteParser.java b/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/TestSuiteParser.java index 79eceb91cbc..3e8e326300c 100644 --- a/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/TestSuiteParser.java +++ b/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/TestSuiteParser.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/TestSuiteReport.java b/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/TestSuiteReport.java index 7f9b8cbea22..b5bd9abe14d 100644 --- a/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/TestSuiteReport.java +++ b/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/TestSuiteReport.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/api/AbstractSurefireParser.java b/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/api/AbstractSurefireParser.java index 7b082b4c09a..215ed9c8f23 100644 --- a/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/api/AbstractSurefireParser.java +++ b/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/api/AbstractSurefireParser.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/api/SurefireUtils.java b/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/api/SurefireUtils.java index 082a99703c8..084d13e7846 100644 --- a/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/api/SurefireUtils.java +++ b/plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/api/SurefireUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-surefire-plugin/src/test/java/org/sonar/plugins/surefire/SurefireSensorTest.java b/plugins/sonar-surefire-plugin/src/test/java/org/sonar/plugins/surefire/SurefireSensorTest.java index 450570ff6bc..37accaa32ef 100644 --- a/plugins/sonar-surefire-plugin/src/test/java/org/sonar/plugins/surefire/SurefireSensorTest.java +++ b/plugins/sonar-surefire-plugin/src/test/java/org/sonar/plugins/surefire/SurefireSensorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/plugins/sonar-surefire-plugin/src/test/java/org/sonar/plugins/surefire/api/SurefireUtilsTest.java b/plugins/sonar-surefire-plugin/src/test/java/org/sonar/plugins/surefire/api/SurefireUtilsTest.java index 03e9402115e..8a1d46c918d 100644 --- a/plugins/sonar-surefire-plugin/src/test/java/org/sonar/plugins/surefire/api/SurefireUtilsTest.java +++ b/plugins/sonar-surefire-plugin/src/test/java/org/sonar/plugins/surefire/api/SurefireUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-application/src/main/assembly/war/build-war.bat b/sonar-application/src/main/assembly/war/build-war.bat index 96e1f3f6a62..73cea1947ed 100644 --- a/sonar-application/src/main/assembly/war/build-war.bat +++ b/sonar-application/src/main/assembly/war/build-war.bat @@ -1,6 +1,6 @@ -@echo off
+@echo off -rem Copyright (C) 2009 SonarSource SA +rem Copyright (C) 2008-2011 SonarSource rem mailto:contact AT sonarsource DOT com rem rem Sonar is free software; you can redistribute it and/or diff --git a/sonar-application/src/main/assembly/war/build-war.sh b/sonar-application/src/main/assembly/war/build-war.sh index 9e5ec345416..0155f378f2b 100644 --- a/sonar-application/src/main/assembly/war/build-war.sh +++ b/sonar-application/src/main/assembly/war/build-war.sh @@ -1,6 +1,6 @@ #! /bin/sh -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-application/src/main/assembly/war/build.xml b/sonar-application/src/main/assembly/war/build.xml index 3efa2935547..b8409fbaa64 100644 --- a/sonar-application/src/main/assembly/war/build.xml +++ b/sonar-application/src/main/assembly/war/build.xml @@ -1,5 +1,5 @@ <!-- -Copyright (C) 2009 SonarSource SA +Copyright (C) 2008-2011 SonarSource mailto:contact AT sonarsource DOT com Sonar is free software; you can redistribute it and/or diff --git a/sonar-application/src/main/java/org/sonar/application/JettyEmbedder.java b/sonar-application/src/main/java/org/sonar/application/JettyEmbedder.java index 423eb04f9d6..369e07b68d3 100644 --- a/sonar-application/src/main/java/org/sonar/application/JettyEmbedder.java +++ b/sonar-application/src/main/java/org/sonar/application/JettyEmbedder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-application/src/main/java/org/sonar/application/StartServer.java b/sonar-application/src/main/java/org/sonar/application/StartServer.java index fd92dd066c1..c92b5069e6e 100644 --- a/sonar-application/src/main/java/org/sonar/application/StartServer.java +++ b/sonar-application/src/main/java/org/sonar/application/StartServer.java @@ -1,75 +1,75 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.application;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.Properties;
-
-public final class StartServer {
- private static final String DEFAULT_WEB_HOST = "0.0.0.0";
- private static final int DEFAULT_WEB_PORT = 9000;
- private static final String DEFAULT_WEB_CONTEXT = "/";
- private static final int DEFAULT_AJP13_PORT = -1;
-
- private StartServer() {
- }
-
- public static void main(String[] args) throws Exception {
- configureLogback();
- configureHome();
-
- Properties configuration = getConfiguration();
- String host = configuration.getProperty("sonar.web.host", DEFAULT_WEB_HOST);
- int port = Integer.parseInt(configuration.getProperty("sonar.web.port", "" + DEFAULT_WEB_PORT));
- String context = configuration.getProperty("sonar.web.context", DEFAULT_WEB_CONTEXT);
- int ajp13Port = Integer.parseInt(configuration.getProperty("sonar.ajp13.port", "" + DEFAULT_AJP13_PORT));
- JettyEmbedder jetty = new JettyEmbedder(host, port, context, ajp13Port, StartServer.class.getResource("/jetty.xml"));
- configureRequestLogs(jetty, configuration);
-
- jetty.start();
- Thread.currentThread().join();
- }
-
- private static void configureRequestLogs(JettyEmbedder jetty, Properties configuration) {
- String filenamePattern = configuration.getProperty("sonar.web.jettyRequestLogs");
- if (filenamePattern!=null) {
- jetty.configureRequestLogs(filenamePattern);
- }
- }
-
- private static Properties getConfiguration() throws IOException {
- Properties properties = new Properties();
- properties.load(StartServer.class.getResourceAsStream("/conf/sonar.properties"));
- return properties;
- }
-
- private static void configureHome() throws URISyntaxException {
- File confFile = new File(StartServer.class.getResource("/conf/sonar.properties").toURI());
- System.setProperty("sonar.home", confFile.getParentFile().getParentFile().getAbsolutePath());
- }
-
- private static void configureLogback() throws URISyntaxException {
- File confFile = new File(StartServer.class.getResource("/conf/logback.xml").toURI());
- System.setProperty("logback.configurationFile", confFile.getAbsolutePath());
- System.setProperty("logback.ContextSelector", "JNDI");
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.application; + +import java.io.File; +import java.io.IOException; +import java.net.URISyntaxException; +import java.util.Properties; + +public final class StartServer { + private static final String DEFAULT_WEB_HOST = "0.0.0.0"; + private static final int DEFAULT_WEB_PORT = 9000; + private static final String DEFAULT_WEB_CONTEXT = "/"; + private static final int DEFAULT_AJP13_PORT = -1; + + private StartServer() { + } + + public static void main(String[] args) throws Exception { + configureLogback(); + configureHome(); + + Properties configuration = getConfiguration(); + String host = configuration.getProperty("sonar.web.host", DEFAULT_WEB_HOST); + int port = Integer.parseInt(configuration.getProperty("sonar.web.port", "" + DEFAULT_WEB_PORT)); + String context = configuration.getProperty("sonar.web.context", DEFAULT_WEB_CONTEXT); + int ajp13Port = Integer.parseInt(configuration.getProperty("sonar.ajp13.port", "" + DEFAULT_AJP13_PORT)); + JettyEmbedder jetty = new JettyEmbedder(host, port, context, ajp13Port, StartServer.class.getResource("/jetty.xml")); + configureRequestLogs(jetty, configuration); + + jetty.start(); + Thread.currentThread().join(); + } + + private static void configureRequestLogs(JettyEmbedder jetty, Properties configuration) { + String filenamePattern = configuration.getProperty("sonar.web.jettyRequestLogs"); + if (filenamePattern!=null) { + jetty.configureRequestLogs(filenamePattern); + } + } + + private static Properties getConfiguration() throws IOException { + Properties properties = new Properties(); + properties.load(StartServer.class.getResourceAsStream("/conf/sonar.properties")); + return properties; + } + + private static void configureHome() throws URISyntaxException { + File confFile = new File(StartServer.class.getResource("/conf/sonar.properties").toURI()); + System.setProperty("sonar.home", confFile.getParentFile().getParentFile().getAbsolutePath()); + } + + private static void configureLogback() throws URISyntaxException { + File confFile = new File(StartServer.class.getResource("/conf/logback.xml").toURI()); + System.setProperty("logback.configurationFile", confFile.getAbsolutePath()); + System.setProperty("logback.ContextSelector", "JNDI"); + } +} diff --git a/sonar-application/src/test/java/org/sonar/application/JettyEmbedderTest.java b/sonar-application/src/test/java/org/sonar/application/JettyEmbedderTest.java index 9f0fcdb93f7..614e9752bdb 100644 --- a/sonar-application/src/test/java/org/sonar/application/JettyEmbedderTest.java +++ b/sonar-application/src/test/java/org/sonar/application/JettyEmbedderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BootstrapClassLoader.java b/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BootstrapClassLoader.java index c61a238df04..1bf933ea5c7 100644 --- a/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BootstrapClassLoader.java +++ b/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BootstrapClassLoader.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BootstrapException.java b/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BootstrapException.java index 8b75b61c97a..2624d291438 100644 --- a/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BootstrapException.java +++ b/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BootstrapException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/Bootstrapper.java b/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/Bootstrapper.java index 065c193c7d2..5dbd4f6edca 100644 --- a/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/Bootstrapper.java +++ b/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/Bootstrapper.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BootstrapperIOUtils.java b/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BootstrapperIOUtils.java index d400bc8c40d..cd3d8bf2cc7 100644 --- a/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BootstrapperIOUtils.java +++ b/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BootstrapperIOUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/package-info.java b/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/package-info.java index 7c23a7aa9ec..bbd3a83a680 100644 --- a/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/package-info.java +++ b/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/package-info.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch-bootstrapper/src/test/java/org/sonar/batch/bootstrapper/BootstrapClassLoaderTest.java b/sonar-batch-bootstrapper/src/test/java/org/sonar/batch/bootstrapper/BootstrapClassLoaderTest.java index b8a13d50173..dc737c8de2e 100644 --- a/sonar-batch-bootstrapper/src/test/java/org/sonar/batch/bootstrapper/BootstrapClassLoaderTest.java +++ b/sonar-batch-bootstrapper/src/test/java/org/sonar/batch/bootstrapper/BootstrapClassLoaderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch-bootstrapper/src/test/java/org/sonar/batch/bootstrapper/BootstrapperTest.java b/sonar-batch-bootstrapper/src/test/java/org/sonar/batch/bootstrapper/BootstrapperTest.java index 945940a4873..698db7d9de4 100644 --- a/sonar-batch-bootstrapper/src/test/java/org/sonar/batch/bootstrapper/BootstrapperTest.java +++ b/sonar-batch-bootstrapper/src/test/java/org/sonar/batch/bootstrapper/BootstrapperTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/AbstractMavenPluginExecutor.java b/sonar-batch/src/main/java/org/sonar/batch/AbstractMavenPluginExecutor.java index 413621334a0..85e5614c0d7 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/AbstractMavenPluginExecutor.java +++ b/sonar-batch/src/main/java/org/sonar/batch/AbstractMavenPluginExecutor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/Batch.java b/sonar-batch/src/main/java/org/sonar/batch/Batch.java index df943c51fd5..e95f6ee2927 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/Batch.java +++ b/sonar-batch/src/main/java/org/sonar/batch/Batch.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/CheckProfileProvider.java b/sonar-batch/src/main/java/org/sonar/batch/CheckProfileProvider.java index 3046aa96eb4..cfe58e7aec4 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/CheckProfileProvider.java +++ b/sonar-batch/src/main/java/org/sonar/batch/CheckProfileProvider.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/DecoratorsSelector.java b/sonar-batch/src/main/java/org/sonar/batch/DecoratorsSelector.java index 5aa54d0cfc4..f431e17cae9 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/DecoratorsSelector.java +++ b/sonar-batch/src/main/java/org/sonar/batch/DecoratorsSelector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/DefaultDecoratorContext.java b/sonar-batch/src/main/java/org/sonar/batch/DefaultDecoratorContext.java index fe86e2c5414..5272ab80cb1 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/DefaultDecoratorContext.java +++ b/sonar-batch/src/main/java/org/sonar/batch/DefaultDecoratorContext.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/DefaultResourceCreationLock.java b/sonar-batch/src/main/java/org/sonar/batch/DefaultResourceCreationLock.java index 49e1244c191..5188311250c 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/DefaultResourceCreationLock.java +++ b/sonar-batch/src/main/java/org/sonar/batch/DefaultResourceCreationLock.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/DefaultSensorContext.java b/sonar-batch/src/main/java/org/sonar/batch/DefaultSensorContext.java index 4a4acf8bf32..1689bc4269f 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/DefaultSensorContext.java +++ b/sonar-batch/src/main/java/org/sonar/batch/DefaultSensorContext.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/DefaultTimeMachine.java b/sonar-batch/src/main/java/org/sonar/batch/DefaultTimeMachine.java index a88afd1d37a..6dbec54a2c7 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/DefaultTimeMachine.java +++ b/sonar-batch/src/main/java/org/sonar/batch/DefaultTimeMachine.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/FakeMavenPluginExecutor.java b/sonar-batch/src/main/java/org/sonar/batch/FakeMavenPluginExecutor.java index af983b059d6..a10a74012b0 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/FakeMavenPluginExecutor.java +++ b/sonar-batch/src/main/java/org/sonar/batch/FakeMavenPluginExecutor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/FormulaDecorator.java b/sonar-batch/src/main/java/org/sonar/batch/FormulaDecorator.java index 0c80290fb53..0dadf78842d 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/FormulaDecorator.java +++ b/sonar-batch/src/main/java/org/sonar/batch/FormulaDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/InMemoryPomCreator.java b/sonar-batch/src/main/java/org/sonar/batch/InMemoryPomCreator.java index 1f1f1a3be9d..73c79ad8548 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/InMemoryPomCreator.java +++ b/sonar-batch/src/main/java/org/sonar/batch/InMemoryPomCreator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/MavenPluginExecutor.java b/sonar-batch/src/main/java/org/sonar/batch/MavenPluginExecutor.java index 12404e58534..dd16c99d89e 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/MavenPluginExecutor.java +++ b/sonar-batch/src/main/java/org/sonar/batch/MavenPluginExecutor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/MavenProjectBuilder.java b/sonar-batch/src/main/java/org/sonar/batch/MavenProjectBuilder.java index 7fde1c352b7..208cf78cb3a 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/MavenProjectBuilder.java +++ b/sonar-batch/src/main/java/org/sonar/batch/MavenProjectBuilder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/MavenReactor.java b/sonar-batch/src/main/java/org/sonar/batch/MavenReactor.java index 1f0acf8c19e..fff85d35e34 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/MavenReactor.java +++ b/sonar-batch/src/main/java/org/sonar/batch/MavenReactor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/ProfileProvider.java b/sonar-batch/src/main/java/org/sonar/batch/ProfileProvider.java index 2059f562c69..cb814196efe 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/ProfileProvider.java +++ b/sonar-batch/src/main/java/org/sonar/batch/ProfileProvider.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/ProjectBatch.java b/sonar-batch/src/main/java/org/sonar/batch/ProjectBatch.java index 9f0e0c4ddc3..1cd325a5509 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/ProjectBatch.java +++ b/sonar-batch/src/main/java/org/sonar/batch/ProjectBatch.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/ProjectConfiguration.java b/sonar-batch/src/main/java/org/sonar/batch/ProjectConfiguration.java index 4226a14fe7c..ddae656f1d8 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/ProjectConfiguration.java +++ b/sonar-batch/src/main/java/org/sonar/batch/ProjectConfiguration.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/ProjectTree.java b/sonar-batch/src/main/java/org/sonar/batch/ProjectTree.java index a0601ae3060..4a03586a2e8 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/ProjectTree.java +++ b/sonar-batch/src/main/java/org/sonar/batch/ProjectTree.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/ResourceDatabaseConfiguration.java b/sonar-batch/src/main/java/org/sonar/batch/ResourceDatabaseConfiguration.java index 77359f427e3..6b9fe08d3b1 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/ResourceDatabaseConfiguration.java +++ b/sonar-batch/src/main/java/org/sonar/batch/ResourceDatabaseConfiguration.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/ResourceFilters.java b/sonar-batch/src/main/java/org/sonar/batch/ResourceFilters.java index 395ffd2f38b..eeb15175918 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/ResourceFilters.java +++ b/sonar-batch/src/main/java/org/sonar/batch/ResourceFilters.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/ServerMetadata.java b/sonar-batch/src/main/java/org/sonar/batch/ServerMetadata.java index a88337a0824..b8accd4e6d1 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/ServerMetadata.java +++ b/sonar-batch/src/main/java/org/sonar/batch/ServerMetadata.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/ViolationFilters.java b/sonar-batch/src/main/java/org/sonar/batch/ViolationFilters.java index 784b01ae8b5..9b53416b16e 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/ViolationFilters.java +++ b/sonar-batch/src/main/java/org/sonar/batch/ViolationFilters.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchPluginRepository.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchPluginRepository.java index 7a42b11fe8b..166211ae755 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchPluginRepository.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchPluginRepository.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapClassLoader.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapClassLoader.java index ee91b71c595..e9ec1e8cf7c 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapClassLoader.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapClassLoader.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionDownloader.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionDownloader.java index 292b98c5180..0cb1a95b53c 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionDownloader.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionDownloader.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TempDirectories.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TempDirectories.java index 80ab6940d41..7ae7f4026fb 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TempDirectories.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TempDirectories.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/ProjectDefinition.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/ProjectDefinition.java index 54ea3b5f5e3..f660f7a83e2 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/ProjectDefinition.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/ProjectDefinition.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Reactor.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Reactor.java index 909adedf847..c2e4472be33 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Reactor.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Reactor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/components/PastMeasuresLoader.java b/sonar-batch/src/main/java/org/sonar/batch/components/PastMeasuresLoader.java index eb374de1094..8c9ab0e9fde 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/components/PastMeasuresLoader.java +++ b/sonar-batch/src/main/java/org/sonar/batch/components/PastMeasuresLoader.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshot.java b/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshot.java index 242b0def5dd..00f05439bd7 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshot.java +++ b/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshot.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinder.java b/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinder.java index 85b7c29e80d..ec2a38426d3 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinder.java +++ b/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByDate.java b/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByDate.java index f627cfdcd42..71c95af82b8 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByDate.java +++ b/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByDate.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByDays.java b/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByDays.java index 20cd4bd0a6a..ddb0d59c970 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByDays.java +++ b/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByDays.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysis.java b/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysis.java index 85acf01d449..6993ca0b78d 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysis.java +++ b/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysis.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByVersion.java b/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByVersion.java index 34eafc5a2b4..e81019f9021 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByVersion.java +++ b/sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByVersion.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/components/PastViolationsLoader.java b/sonar-batch/src/main/java/org/sonar/batch/components/PastViolationsLoader.java index e3902a16b6a..805a2b696e3 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/components/PastViolationsLoader.java +++ b/sonar-batch/src/main/java/org/sonar/batch/components/PastViolationsLoader.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/components/TimeMachineConfiguration.java b/sonar-batch/src/main/java/org/sonar/batch/components/TimeMachineConfiguration.java index 136ac380cd7..e5892e9ce33 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/components/TimeMachineConfiguration.java +++ b/sonar-batch/src/main/java/org/sonar/batch/components/TimeMachineConfiguration.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/Bucket.java b/sonar-batch/src/main/java/org/sonar/batch/index/Bucket.java index 72010ede518..ce6fbaed375 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/Bucket.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/Bucket.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/DefaultIndex.java b/sonar-batch/src/main/java/org/sonar/batch/index/DefaultIndex.java index f29551c1e29..296571bc282 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/DefaultIndex.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/DefaultIndex.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/DefaultPersistenceManager.java b/sonar-batch/src/main/java/org/sonar/batch/index/DefaultPersistenceManager.java index f8df73fd119..a89991610e4 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/DefaultPersistenceManager.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/DefaultPersistenceManager.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java b/sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java index 640503ecdd8..0365c6c8b2f 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/DependencyPersister.java b/sonar-batch/src/main/java/org/sonar/batch/index/DependencyPersister.java index 0389ebb4209..2e6ae32a4c9 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/DependencyPersister.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/DependencyPersister.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/EventPersister.java b/sonar-batch/src/main/java/org/sonar/batch/index/EventPersister.java index 5cc2b1aa3e5..74835f2ffab 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/EventPersister.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/EventPersister.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/LinkPersister.java b/sonar-batch/src/main/java/org/sonar/batch/index/LinkPersister.java index 66ec62ce999..3699420acc4 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/LinkPersister.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/LinkPersister.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/MeasurePersister.java b/sonar-batch/src/main/java/org/sonar/batch/index/MeasurePersister.java index ec8ca8c925e..f80e487d868 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/MeasurePersister.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/MeasurePersister.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/PersistenceManager.java b/sonar-batch/src/main/java/org/sonar/batch/index/PersistenceManager.java index caffd0dac07..cef245960c9 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/PersistenceManager.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/PersistenceManager.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/ResourceNotIndexedException.java b/sonar-batch/src/main/java/org/sonar/batch/index/ResourceNotIndexedException.java index 203f4043ff6..e84eee1cae4 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/ResourceNotIndexedException.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/ResourceNotIndexedException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/ResourceNotPersistedException.java b/sonar-batch/src/main/java/org/sonar/batch/index/ResourceNotPersistedException.java index c2f30edd2eb..f43f0ed037f 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/ResourceNotPersistedException.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/ResourceNotPersistedException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/ResourcePersister.java b/sonar-batch/src/main/java/org/sonar/batch/index/ResourcePersister.java index dad3c8f5428..9ddd6da6bb5 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/ResourcePersister.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/ResourcePersister.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/SourcePersister.java b/sonar-batch/src/main/java/org/sonar/batch/index/SourcePersister.java index 1b1857c7fc9..0e8f700237c 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/SourcePersister.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/SourcePersister.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/ViolationPersister.java b/sonar-batch/src/main/java/org/sonar/batch/index/ViolationPersister.java index 13fa2554aeb..0613954e4cc 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/ViolationPersister.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/ViolationPersister.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/phases/DecoratorsExecutor.java b/sonar-batch/src/main/java/org/sonar/batch/phases/DecoratorsExecutor.java index 82b5b6983a1..74b7179b16a 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/phases/DecoratorsExecutor.java +++ b/sonar-batch/src/main/java/org/sonar/batch/phases/DecoratorsExecutor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/phases/MavenPhaseExecutor.java b/sonar-batch/src/main/java/org/sonar/batch/phases/MavenPhaseExecutor.java index 266502c5129..a20548145a3 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/phases/MavenPhaseExecutor.java +++ b/sonar-batch/src/main/java/org/sonar/batch/phases/MavenPhaseExecutor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/phases/MavenPluginsConfigurator.java b/sonar-batch/src/main/java/org/sonar/batch/phases/MavenPluginsConfigurator.java index 58ca8564335..49560b6126e 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/phases/MavenPluginsConfigurator.java +++ b/sonar-batch/src/main/java/org/sonar/batch/phases/MavenPluginsConfigurator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/phases/Phases.java b/sonar-batch/src/main/java/org/sonar/batch/phases/Phases.java index fd5debd5b5c..3ae372ddb16 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/phases/Phases.java +++ b/sonar-batch/src/main/java/org/sonar/batch/phases/Phases.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/phases/PostJobsExecutor.java b/sonar-batch/src/main/java/org/sonar/batch/phases/PostJobsExecutor.java index 93805ca6b5f..9c42b329378 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/phases/PostJobsExecutor.java +++ b/sonar-batch/src/main/java/org/sonar/batch/phases/PostJobsExecutor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/phases/SensorsExecutor.java b/sonar-batch/src/main/java/org/sonar/batch/phases/SensorsExecutor.java index 6c105c0fb17..707015d2d5a 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/phases/SensorsExecutor.java +++ b/sonar-batch/src/main/java/org/sonar/batch/phases/SensorsExecutor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/main/java/org/sonar/batch/phases/UpdateStatusJob.java b/sonar-batch/src/main/java/org/sonar/batch/phases/UpdateStatusJob.java index 5c04142aadc..8f3040d55b4 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/phases/UpdateStatusJob.java +++ b/sonar-batch/src/main/java/org/sonar/batch/phases/UpdateStatusJob.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/AbstractMavenPluginExecutorTest.java b/sonar-batch/src/test/java/org/sonar/batch/AbstractMavenPluginExecutorTest.java index b105143ed97..687ccbbbc6b 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/AbstractMavenPluginExecutorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/AbstractMavenPluginExecutorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/BatchTest.java b/sonar-batch/src/test/java/org/sonar/batch/BatchTest.java index 2bf84aa767c..9de4aa3df64 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/BatchTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/BatchTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/DecoratorsSelectorTest.java b/sonar-batch/src/test/java/org/sonar/batch/DecoratorsSelectorTest.java index 5439d9b12c4..2be1e1fc189 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/DecoratorsSelectorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/DecoratorsSelectorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/DefaultResourceCreationLockTest.java b/sonar-batch/src/test/java/org/sonar/batch/DefaultResourceCreationLockTest.java index 24918b4326e..6aa9e70bc09 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/DefaultResourceCreationLockTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/DefaultResourceCreationLockTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/DefaultSensorContextTest.java b/sonar-batch/src/test/java/org/sonar/batch/DefaultSensorContextTest.java index dba2db3e375..096a7e50801 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/DefaultSensorContextTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/DefaultSensorContextTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/FormulaDecoratorTest.java b/sonar-batch/src/test/java/org/sonar/batch/FormulaDecoratorTest.java index b9e25d6bc4d..2534f697f71 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/FormulaDecoratorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/FormulaDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/InMemoryPomCreatorTest.java b/sonar-batch/src/test/java/org/sonar/batch/InMemoryPomCreatorTest.java index 7ddb33cfef7..e7787f5e05b 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/InMemoryPomCreatorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/InMemoryPomCreatorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/MavenProjectBuilderTest.java b/sonar-batch/src/test/java/org/sonar/batch/MavenProjectBuilderTest.java index a35b692270a..734f4e64424 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/MavenProjectBuilderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/MavenProjectBuilderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/ProfileProviderTest.java b/sonar-batch/src/test/java/org/sonar/batch/ProfileProviderTest.java index bdefef5c6c8..3fd5b097cdf 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/ProfileProviderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/ProfileProviderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/ProjectConfigurationTest.java b/sonar-batch/src/test/java/org/sonar/batch/ProjectConfigurationTest.java index 247f0d09c0d..632fbc8e0ca 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/ProjectConfigurationTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/ProjectConfigurationTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/ProjectTreeTest.java b/sonar-batch/src/test/java/org/sonar/batch/ProjectTreeTest.java index 8030c946b19..ef3b087ffac 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/ProjectTreeTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/ProjectTreeTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/ServerMetadataTest.java b/sonar-batch/src/test/java/org/sonar/batch/ServerMetadataTest.java index 7e4d8d2d6f9..a52d5d829c3 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/ServerMetadataTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/ServerMetadataTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/ViolationFiltersTest.java b/sonar-batch/src/test/java/org/sonar/batch/ViolationFiltersTest.java index 53eb38959b2..4a456bc85d2 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/ViolationFiltersTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/ViolationFiltersTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginRepositoryTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginRepositoryTest.java index 7d5abcac22e..5ee91abceaf 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginRepositoryTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginRepositoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BootstrapClassLoaderTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BootstrapClassLoaderTest.java index 30ab9900ae3..b28a4c33431 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BootstrapClassLoaderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BootstrapClassLoaderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionDownloaderTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionDownloaderTest.java index 3094860d388..ab9a0aad137 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionDownloaderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionDownloaderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/TempDirectoriesTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/TempDirectoriesTest.java index 08128992195..ddc719c2837 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/TempDirectoriesTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/TempDirectoriesTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/components/PastMeasuresLoaderTest.java b/sonar-batch/src/test/java/org/sonar/batch/components/PastMeasuresLoaderTest.java index 1f3301424ed..2b2137eb288 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/components/PastMeasuresLoaderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/components/PastMeasuresLoaderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDateTest.java b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDateTest.java index 2013424d30c..5bc4b328842 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDateTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDateTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDaysTest.java b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDaysTest.java index 06c1673e95f..c4fc0d34063 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDaysTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDaysTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest.java b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest.java index b72947d275e..62a10db48e7 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByVersionTest.java b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByVersionTest.java index 6a6f084b842..29f23920f0d 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByVersionTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByVersionTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderTest.java b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderTest.java index eb59d8d4139..d524ce8f232 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotTest.java b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotTest.java index 4f0fbde6573..b504b0a44b7 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/components/PastViolationsLoaderTest.java b/sonar-batch/src/test/java/org/sonar/batch/components/PastViolationsLoaderTest.java index e37fc09523e..965f4f8d85f 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/components/PastViolationsLoaderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/components/PastViolationsLoaderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/BucketTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/BucketTest.java index 6854db8f52d..bf9ed29317c 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/index/BucketTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/index/BucketTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/DefaultIndexTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/DefaultIndexTest.java index ef88932c7e1..4083aaccb18 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/index/DefaultIndexTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/index/DefaultIndexTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java index ec61785d170..3491738c922 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java index 13a299b38b3..81dd495a9f5 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/SourcePersisterTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/SourcePersisterTest.java index cc92ff24a4c..fc3dc73c41d 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/index/SourcePersisterTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/index/SourcePersisterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/ViolationPersisterTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/ViolationPersisterTest.java index 55f30b32257..7d90a707941 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/index/ViolationPersisterTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/index/ViolationPersisterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/phases/DecoratorsExecutorTest.java b/sonar-batch/src/test/java/org/sonar/batch/phases/DecoratorsExecutorTest.java index 8f9c1bcd582..05cc6574703 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/phases/DecoratorsExecutorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/phases/DecoratorsExecutorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/phases/MavenPhaseExecutorTest.java b/sonar-batch/src/test/java/org/sonar/batch/phases/MavenPhaseExecutorTest.java index 135fed227a4..49effe0b450 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/phases/MavenPhaseExecutorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/phases/MavenPhaseExecutorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/phases/MavenPluginsConfiguratorTest.java b/sonar-batch/src/test/java/org/sonar/batch/phases/MavenPluginsConfiguratorTest.java index 037d30987b7..74e1b67c47f 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/phases/MavenPluginsConfiguratorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/phases/MavenPluginsConfiguratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/phases/PhasesTest.java b/sonar-batch/src/test/java/org/sonar/batch/phases/PhasesTest.java index def743acaf0..d14d30d7ae4 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/phases/PhasesTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/phases/PhasesTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/phases/PostJobsExecutorTest.java b/sonar-batch/src/test/java/org/sonar/batch/phases/PostJobsExecutorTest.java index f9aa127c386..2231bea710a 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/phases/PostJobsExecutorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/phases/PostJobsExecutorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java b/sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java index e6f1e78d657..e6680f5fb3b 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-channel/src/main/java/org/sonar/channel/Channel.java b/sonar-channel/src/main/java/org/sonar/channel/Channel.java index 198ad995f61..b646a023435 100644 --- a/sonar-channel/src/main/java/org/sonar/channel/Channel.java +++ b/sonar-channel/src/main/java/org/sonar/channel/Channel.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-channel/src/main/java/org/sonar/channel/ChannelCodeReaderFilter.java b/sonar-channel/src/main/java/org/sonar/channel/ChannelCodeReaderFilter.java index 59b3f810807..5422def73a3 100644 --- a/sonar-channel/src/main/java/org/sonar/channel/ChannelCodeReaderFilter.java +++ b/sonar-channel/src/main/java/org/sonar/channel/ChannelCodeReaderFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-channel/src/main/java/org/sonar/channel/ChannelDispatcher.java b/sonar-channel/src/main/java/org/sonar/channel/ChannelDispatcher.java index 6ebb0507373..aaab3cf97c8 100644 --- a/sonar-channel/src/main/java/org/sonar/channel/ChannelDispatcher.java +++ b/sonar-channel/src/main/java/org/sonar/channel/ChannelDispatcher.java @@ -1,70 +1,70 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-
-package org.sonar.channel;
-
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ChannelDispatcher<OUTPUT> extends Channel<OUTPUT> {
-
- private static final Logger logger = LoggerFactory.getLogger(ChannelDispatcher.class);
- private final boolean failIfNoChannelToConsumeOneCharacter;
-
- @SuppressWarnings("rawtypes")
- private final Channel[] channels;
-
- @SuppressWarnings("rawtypes")
- public ChannelDispatcher(List<Channel> tokenizers) {
- this(tokenizers, false);
- }
-
- @SuppressWarnings("rawtypes")
- public ChannelDispatcher(List<Channel> tokenizers, boolean failIfNoChannelToConsumeOneCharacter) {
- this.channels = tokenizers.toArray(new Channel[0]); // NOSONAR, lack of performance is not an issue here
- this.failIfNoChannelToConsumeOneCharacter = failIfNoChannelToConsumeOneCharacter;
- }
-
- public boolean consume(CodeReader code, OUTPUT output) {
- int nextChar = code.peek();
- while (nextChar != -1) {
- boolean channelConsumed = false;
- for (Channel<OUTPUT> channel : channels) {
- if (channel.consume(code, output)) {
- channelConsumed = true;
- break;
- }
- }
- if ( !channelConsumed) {
- String message = "None of the channel has been able to handle character '" + (char) code.peek() + "' (decimal value " + code.peek()
- + ") at line " + code.getLinePosition() + ", column " + code.getColumnPosition();
- if (failIfNoChannelToConsumeOneCharacter) {
- throw new IllegalStateException(message);
- }
- logger.debug(message);
- code.pop();
- }
- nextChar = code.peek();
- }
- return true;
- }
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ + +package org.sonar.channel; + +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ChannelDispatcher<OUTPUT> extends Channel<OUTPUT> { + + private static final Logger logger = LoggerFactory.getLogger(ChannelDispatcher.class); + private final boolean failIfNoChannelToConsumeOneCharacter; + + @SuppressWarnings("rawtypes") + private final Channel[] channels; + + @SuppressWarnings("rawtypes") + public ChannelDispatcher(List<Channel> tokenizers) { + this(tokenizers, false); + } + + @SuppressWarnings("rawtypes") + public ChannelDispatcher(List<Channel> tokenizers, boolean failIfNoChannelToConsumeOneCharacter) { + this.channels = tokenizers.toArray(new Channel[0]); // NOSONAR, lack of performance is not an issue here + this.failIfNoChannelToConsumeOneCharacter = failIfNoChannelToConsumeOneCharacter; + } + + public boolean consume(CodeReader code, OUTPUT output) { + int nextChar = code.peek(); + while (nextChar != -1) { + boolean channelConsumed = false; + for (Channel<OUTPUT> channel : channels) { + if (channel.consume(code, output)) { + channelConsumed = true; + break; + } + } + if ( !channelConsumed) { + String message = "None of the channel has been able to handle character '" + (char) code.peek() + "' (decimal value " + code.peek() + + ") at line " + code.getLinePosition() + ", column " + code.getColumnPosition(); + if (failIfNoChannelToConsumeOneCharacter) { + throw new IllegalStateException(message); + } + logger.debug(message); + code.pop(); + } + nextChar = code.peek(); + } + return true; + } }
\ No newline at end of file diff --git a/sonar-channel/src/main/java/org/sonar/channel/ChannelException.java b/sonar-channel/src/main/java/org/sonar/channel/ChannelException.java index 1b1f4c9f3d0..fc43af06b04 100644 --- a/sonar-channel/src/main/java/org/sonar/channel/ChannelException.java +++ b/sonar-channel/src/main/java/org/sonar/channel/ChannelException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-channel/src/main/java/org/sonar/channel/CodeBuffer.java b/sonar-channel/src/main/java/org/sonar/channel/CodeBuffer.java index 0b5a72822ba..5515e7eb284 100644 --- a/sonar-channel/src/main/java/org/sonar/channel/CodeBuffer.java +++ b/sonar-channel/src/main/java/org/sonar/channel/CodeBuffer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-channel/src/main/java/org/sonar/channel/CodeReader.java b/sonar-channel/src/main/java/org/sonar/channel/CodeReader.java index 73a2172fbeb..2c93f35fc0b 100644 --- a/sonar-channel/src/main/java/org/sonar/channel/CodeReader.java +++ b/sonar-channel/src/main/java/org/sonar/channel/CodeReader.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-channel/src/main/java/org/sonar/channel/CodeReaderConfiguration.java b/sonar-channel/src/main/java/org/sonar/channel/CodeReaderConfiguration.java index 4976a0ea6ba..bd543207ea9 100644 --- a/sonar-channel/src/main/java/org/sonar/channel/CodeReaderConfiguration.java +++ b/sonar-channel/src/main/java/org/sonar/channel/CodeReaderConfiguration.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-channel/src/main/java/org/sonar/channel/CodeReaderFilter.java b/sonar-channel/src/main/java/org/sonar/channel/CodeReaderFilter.java index 65c2c1db204..76030df244f 100644 --- a/sonar-channel/src/main/java/org/sonar/channel/CodeReaderFilter.java +++ b/sonar-channel/src/main/java/org/sonar/channel/CodeReaderFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-channel/src/main/java/org/sonar/channel/EndMatcher.java b/sonar-channel/src/main/java/org/sonar/channel/EndMatcher.java index e74d2b76643..c506b9f9dee 100644 --- a/sonar-channel/src/main/java/org/sonar/channel/EndMatcher.java +++ b/sonar-channel/src/main/java/org/sonar/channel/EndMatcher.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-channel/src/test/java/org/sonar/channel/CodeBufferTest.java b/sonar-channel/src/test/java/org/sonar/channel/CodeBufferTest.java index 840a7f46f03..b028184c7c5 100644 --- a/sonar-channel/src/test/java/org/sonar/channel/CodeBufferTest.java +++ b/sonar-channel/src/test/java/org/sonar/channel/CodeBufferTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-channel/src/test/java/org/sonar/channel/CodeReaderTest.java b/sonar-channel/src/test/java/org/sonar/channel/CodeReaderTest.java index 0064443fd05..a748cfa6f83 100644 --- a/sonar-channel/src/test/java/org/sonar/channel/CodeReaderTest.java +++ b/sonar-channel/src/test/java/org/sonar/channel/CodeReaderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-check-api/src/main/java/org/sonar/check/AnnotationIntrospector.java b/sonar-check-api/src/main/java/org/sonar/check/AnnotationIntrospector.java index d368a616240..4e2bf0852c6 100644 --- a/sonar-check-api/src/main/java/org/sonar/check/AnnotationIntrospector.java +++ b/sonar-check-api/src/main/java/org/sonar/check/AnnotationIntrospector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-check-api/src/main/java/org/sonar/check/BelongsToProfile.java b/sonar-check-api/src/main/java/org/sonar/check/BelongsToProfile.java index a79a64817f8..4bf20a305d4 100644 --- a/sonar-check-api/src/main/java/org/sonar/check/BelongsToProfile.java +++ b/sonar-check-api/src/main/java/org/sonar/check/BelongsToProfile.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-check-api/src/main/java/org/sonar/check/BelongsToProfiles.java b/sonar-check-api/src/main/java/org/sonar/check/BelongsToProfiles.java index 16ada04cce8..dae56836d13 100644 --- a/sonar-check-api/src/main/java/org/sonar/check/BelongsToProfiles.java +++ b/sonar-check-api/src/main/java/org/sonar/check/BelongsToProfiles.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-check-api/src/main/java/org/sonar/check/Cardinality.java b/sonar-check-api/src/main/java/org/sonar/check/Cardinality.java index deaa4f3bfaf..eb21d9c1995 100644 --- a/sonar-check-api/src/main/java/org/sonar/check/Cardinality.java +++ b/sonar-check-api/src/main/java/org/sonar/check/Cardinality.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-check-api/src/main/java/org/sonar/check/Check.java b/sonar-check-api/src/main/java/org/sonar/check/Check.java index 274192d5dcc..cc0e434ce54 100644 --- a/sonar-check-api/src/main/java/org/sonar/check/Check.java +++ b/sonar-check-api/src/main/java/org/sonar/check/Check.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-check-api/src/main/java/org/sonar/check/CheckProperty.java b/sonar-check-api/src/main/java/org/sonar/check/CheckProperty.java index 935e8e8592d..8479948680f 100644 --- a/sonar-check-api/src/main/java/org/sonar/check/CheckProperty.java +++ b/sonar-check-api/src/main/java/org/sonar/check/CheckProperty.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-check-api/src/main/java/org/sonar/check/IsoCategory.java b/sonar-check-api/src/main/java/org/sonar/check/IsoCategory.java index 4d1aa0d7d31..229e6e1f2ea 100644 --- a/sonar-check-api/src/main/java/org/sonar/check/IsoCategory.java +++ b/sonar-check-api/src/main/java/org/sonar/check/IsoCategory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-check-api/src/main/java/org/sonar/check/Message.java b/sonar-check-api/src/main/java/org/sonar/check/Message.java index 8f92f3d4765..41ba1baf1e2 100644 --- a/sonar-check-api/src/main/java/org/sonar/check/Message.java +++ b/sonar-check-api/src/main/java/org/sonar/check/Message.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-check-api/src/main/java/org/sonar/check/Priority.java b/sonar-check-api/src/main/java/org/sonar/check/Priority.java index bdeb121b3a5..b3acde75945 100644 --- a/sonar-check-api/src/main/java/org/sonar/check/Priority.java +++ b/sonar-check-api/src/main/java/org/sonar/check/Priority.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-check-api/src/main/java/org/sonar/check/Rule.java b/sonar-check-api/src/main/java/org/sonar/check/Rule.java index 905c59b4099..7f730e7e27b 100644 --- a/sonar-check-api/src/main/java/org/sonar/check/Rule.java +++ b/sonar-check-api/src/main/java/org/sonar/check/Rule.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-check-api/src/main/java/org/sonar/check/RuleProperty.java b/sonar-check-api/src/main/java/org/sonar/check/RuleProperty.java index fc545a24163..f307430d377 100644 --- a/sonar-check-api/src/main/java/org/sonar/check/RuleProperty.java +++ b/sonar-check-api/src/main/java/org/sonar/check/RuleProperty.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-check-api/src/test/java/org/sonar/check/AnnotationIntrospectorTest.java b/sonar-check-api/src/test/java/org/sonar/check/AnnotationIntrospectorTest.java index d0ae45c084e..9028de7c17f 100644 --- a/sonar-check-api/src/test/java/org/sonar/check/AnnotationIntrospectorTest.java +++ b/sonar-check-api/src/test/java/org/sonar/check/AnnotationIntrospectorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-check-api/src/test/java/org/sonar/check/CheckTest.java b/sonar-check-api/src/test/java/org/sonar/check/CheckTest.java index a1051e09c70..8bc37539516 100644 --- a/sonar-check-api/src/test/java/org/sonar/check/CheckTest.java +++ b/sonar-check-api/src/test/java/org/sonar/check/CheckTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-check-api/src/test/java/org/sonar/check/FakeCheck.java b/sonar-check-api/src/test/java/org/sonar/check/FakeCheck.java index 46f8e80d390..56d8a91f1dc 100644 --- a/sonar-check-api/src/test/java/org/sonar/check/FakeCheck.java +++ b/sonar-check-api/src/test/java/org/sonar/check/FakeCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/CDocTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/CDocTokenizer.java index ce146f9ec74..b01d1c71872 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/CDocTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/CDocTokenizer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizer.java index e54470b977d..e1d309cb66b 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/CodeColorizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/CodeColorizer.java index a348fa81cff..83000611702 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/CodeColorizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/CodeColorizer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/CppDocTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/CppDocTokenizer.java index d965b6c652f..c472a72e802 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/CppDocTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/CppDocTokenizer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/GroovyKeywords.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/GroovyKeywords.java index bc97ba94267..c7d57a8aa40 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/GroovyKeywords.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/GroovyKeywords.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/GroovyTokenizers.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/GroovyTokenizers.java index 4e86ed7eec0..4874ba794e8 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/GroovyTokenizers.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/GroovyTokenizers.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlCodeBuilder.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlCodeBuilder.java index ea530abc037..51c0302900c 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlCodeBuilder.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlCodeBuilder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlDecorator.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlDecorator.java index 2d65143c106..611a57d1a4c 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlDecorator.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlOptions.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlOptions.java index f26a710e80b..8425724fb70 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlOptions.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlOptions.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlRenderer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlRenderer.java index 5f11b867584..ce9dfb5e0c8 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlRenderer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlRenderer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/InlineDocTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/InlineDocTokenizer.java index ad12bf829c3..0d6d70fa481 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/InlineDocTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/InlineDocTokenizer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaAnnotationTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaAnnotationTokenizer.java index 346855eed46..554e0613fac 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaAnnotationTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaAnnotationTokenizer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaConstantTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaConstantTokenizer.java index 17fd02cf151..4fe0445a5d4 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaConstantTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaConstantTokenizer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaKeywords.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaKeywords.java index b3ce2bbfed1..34c9ae359a8 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaKeywords.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaKeywords.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaTokenizers.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaTokenizers.java index e5bc1b5af1c..0186a12effb 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaTokenizers.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaTokenizers.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/JavadocTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/JavadocTokenizer.java index ccf39096475..64e6387b2ca 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/JavadocTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/JavadocTokenizer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/KeywordsTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/KeywordsTokenizer.java index 9d4dd3239d7..3152b41161f 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/KeywordsTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/KeywordsTokenizer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/LiteralTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/LiteralTokenizer.java index 2c0c6c93468..25c45dae1f8 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/LiteralTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/LiteralTokenizer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/MultilinesDocTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/MultilinesDocTokenizer.java index 8fb767d623f..b09e9553f4d 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/MultilinesDocTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/MultilinesDocTokenizer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/NotThreadSafeTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/NotThreadSafeTokenizer.java index 94eb919dcc7..4233a16f68e 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/NotThreadSafeTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/NotThreadSafeTokenizer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/RegexpTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/RegexpTokenizer.java index d0cb456e0c0..681ff71244d 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/RegexpTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/RegexpTokenizer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/Renderer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/Renderer.java index eaf572caecc..ac0d0e49a21 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/Renderer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/Renderer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/StringTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/StringTokenizer.java index 7830575ea3f..17e188f8fa0 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/StringTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/StringTokenizer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/SynhtaxHighlightingException.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/SynhtaxHighlightingException.java index e7cdfa79639..a0e3492cf83 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/SynhtaxHighlightingException.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/SynhtaxHighlightingException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/Tokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/Tokenizer.java index ee01df95b5b..103c1866897 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/Tokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/Tokenizer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/TokenizerDispatcher.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/TokenizerDispatcher.java index 60c2b3be737..9685819f46b 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/TokenizerDispatcher.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/TokenizerDispatcher.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/CDocTokenizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/CDocTokenizerTest.java index 31b7e316de4..d3e672e0b44 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/CDocTokenizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/CDocTokenizerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizerTest.java index 8f6d7412b91..f4f55e9938f 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/CodeColorizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/CodeColorizerTest.java index 67f7ee7cc28..ee2d73617ea 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/CodeColorizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/CodeColorizerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/CppTokenizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/CppTokenizerTest.java index 8547a69a2bc..85bd5d0993c 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/CppTokenizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/CppTokenizerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlCodeBuilderTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlCodeBuilderTest.java index 5c64e5e6e62..f76b1871411 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlCodeBuilderTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlCodeBuilderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlDecoratorTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlDecoratorTest.java index 6effeaa3698..c5b1d1283a9 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlDecoratorTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlRendererTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlRendererTest.java index a3c5e9b8c77..66e4a1ef937 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlRendererTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlRendererTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaAnnotationTokenizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaAnnotationTokenizerTest.java index eb1fe8f0a0d..4dc8f597eb6 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaAnnotationTokenizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaAnnotationTokenizerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaConstantTokenizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaConstantTokenizerTest.java index 0c45b78734d..a8f6b5e5245 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaConstantTokenizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaConstantTokenizerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaKeywordsTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaKeywordsTest.java index 2bd6e05484f..2a7f24b08af 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaKeywordsTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaKeywordsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaTokenizersTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaTokenizersTest.java index dcf9e929627..a1b66de9735 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaTokenizersTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaTokenizersTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/JavadocTokenizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/JavadocTokenizerTest.java index 08a560e0585..678d3ef3553 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/JavadocTokenizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/JavadocTokenizerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/KeywordsTokenizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/KeywordsTokenizerTest.java index 5a5968f59d8..17098b63975 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/KeywordsTokenizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/KeywordsTokenizerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/LiteralTokenizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/LiteralTokenizerTest.java index cb975763cc2..6e5bf81eb7a 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/LiteralTokenizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/LiteralTokenizerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/MultilinesDocTokenizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/MultilinesDocTokenizerTest.java index 32a6f65d1d6..3015ae39c72 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/MultilinesDocTokenizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/MultilinesDocTokenizerTest.java @@ -1,80 +1,80 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-
-package org.sonar.colorizer;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.sonar.channel.CodeReader;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-public class MultilinesDocTokenizerTest {
-
- private HtmlCodeBuilder codeBuilder;
-
- @Before
- public void init() {
- codeBuilder = new HtmlCodeBuilder();
- }
-
- @Test
- public void testStandardComment() {
- MultilinesDocTokenizer tokenizer = new MultiLineDocTokenizerImpl("{[||", "");
- assertThat(tokenizer.hasNextToken(new CodeReader("{[|| And here is strange multi-line comment"), new HtmlCodeBuilder()), is(true));
- assertThat(tokenizer.hasNextToken(new CodeReader("// this is not a strange multi-line comment"), new HtmlCodeBuilder()), is(false));
- }
-
- @Test
- public void testLongStartToken() {
- MultilinesDocTokenizer tokenizer = new MultiLineDocTokenizerImpl("/***", "**/");
- assertTrue(tokenizer.consume(new CodeReader("/*** multi-line comment**/ private part"), codeBuilder));
- assertEquals("/*** multi-line comment**/", codeBuilder.toString());
- }
-
- @Test
- public void testStartTokenEndTokenOverlapping() {
- MultilinesDocTokenizer tokenizer = new MultiLineDocTokenizerImpl("/*", "*/");
- assertTrue(tokenizer.consume(new CodeReader("/*// multi-line comment*/ private part"), codeBuilder));
- assertEquals("/*// multi-line comment*/", codeBuilder.toString());
- }
-
- @Test
- public void testMultilinesComment() {
- CodeReader reader = new CodeReader("/* multi-line comment\n*/ private part");
- MultilinesDocTokenizer tokenizer = new MultiLineDocTokenizerImpl("/*", "*/");
- assertTrue(tokenizer.consume(reader, codeBuilder));
- assertEquals("/* multi-line comment", codeBuilder.toString());
- reader.pop();
- assertTrue(tokenizer.consume(reader, codeBuilder));
- assertEquals("/* multi-line comment*/", codeBuilder.toString());
- }
-
- public class MultiLineDocTokenizerImpl extends MultilinesDocTokenizer {
-
- public MultiLineDocTokenizerImpl(String startToken, String endToken) {
- super(startToken, endToken, "", "");
- }
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ + +package org.sonar.colorizer; + +import org.junit.Before; +import org.junit.Test; +import org.sonar.channel.CodeReader; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +public class MultilinesDocTokenizerTest { + + private HtmlCodeBuilder codeBuilder; + + @Before + public void init() { + codeBuilder = new HtmlCodeBuilder(); + } + + @Test + public void testStandardComment() { + MultilinesDocTokenizer tokenizer = new MultiLineDocTokenizerImpl("{[||", ""); + assertThat(tokenizer.hasNextToken(new CodeReader("{[|| And here is strange multi-line comment"), new HtmlCodeBuilder()), is(true)); + assertThat(tokenizer.hasNextToken(new CodeReader("// this is not a strange multi-line comment"), new HtmlCodeBuilder()), is(false)); + } + + @Test + public void testLongStartToken() { + MultilinesDocTokenizer tokenizer = new MultiLineDocTokenizerImpl("/***", "**/"); + assertTrue(tokenizer.consume(new CodeReader("/*** multi-line comment**/ private part"), codeBuilder)); + assertEquals("/*** multi-line comment**/", codeBuilder.toString()); + } + + @Test + public void testStartTokenEndTokenOverlapping() { + MultilinesDocTokenizer tokenizer = new MultiLineDocTokenizerImpl("/*", "*/"); + assertTrue(tokenizer.consume(new CodeReader("/*// multi-line comment*/ private part"), codeBuilder)); + assertEquals("/*// multi-line comment*/", codeBuilder.toString()); + } + + @Test + public void testMultilinesComment() { + CodeReader reader = new CodeReader("/* multi-line comment\n*/ private part"); + MultilinesDocTokenizer tokenizer = new MultiLineDocTokenizerImpl("/*", "*/"); + assertTrue(tokenizer.consume(reader, codeBuilder)); + assertEquals("/* multi-line comment", codeBuilder.toString()); + reader.pop(); + assertTrue(tokenizer.consume(reader, codeBuilder)); + assertEquals("/* multi-line comment*/", codeBuilder.toString()); + } + + public class MultiLineDocTokenizerImpl extends MultilinesDocTokenizer { + + public MultiLineDocTokenizerImpl(String startToken, String endToken) { + super(startToken, endToken, "", ""); + } + } + +} diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/RegexpTokenizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/RegexpTokenizerTest.java index bbcb5c360e1..186b8126a85 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/RegexpTokenizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/RegexpTokenizerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/SyntaxHighlighterTestingHarness.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/SyntaxHighlighterTestingHarness.java index 303e731b49d..8f84ea738fa 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/SyntaxHighlighterTestingHarness.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/SyntaxHighlighterTestingHarness.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/TokenizerDispatcherTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/TokenizerDispatcherTest.java index c551b289e03..ae43db41a4f 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/TokenizerDispatcherTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/TokenizerDispatcherTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/UserGuideTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/UserGuideTest.java index 681e810c127..7385be2e098 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/UserGuideTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/UserGuideTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core-maven-plugin/src/main/java/org/sonar/maven2/BatchMojo.java b/sonar-core-maven-plugin/src/main/java/org/sonar/maven2/BatchMojo.java index e2f6e30d0dc..cbb50901388 100644 --- a/sonar-core-maven-plugin/src/main/java/org/sonar/maven2/BatchMojo.java +++ b/sonar-core-maven-plugin/src/main/java/org/sonar/maven2/BatchMojo.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core-maven-plugin/src/main/java/org/sonar/maven2/Maven2PluginExecutor.java b/sonar-core-maven-plugin/src/main/java/org/sonar/maven2/Maven2PluginExecutor.java index 3e0099a4a94..ba4afc7120d 100644 --- a/sonar-core-maven-plugin/src/main/java/org/sonar/maven2/Maven2PluginExecutor.java +++ b/sonar-core-maven-plugin/src/main/java/org/sonar/maven2/Maven2PluginExecutor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/api/database/configuration/DatabaseConfiguration.java b/sonar-core/src/main/java/org/sonar/api/database/configuration/DatabaseConfiguration.java index cd945c5425b..70b49625d69 100644 --- a/sonar-core/src/main/java/org/sonar/api/database/configuration/DatabaseConfiguration.java +++ b/sonar-core/src/main/java/org/sonar/api/database/configuration/DatabaseConfiguration.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/api/database/configuration/Property.java b/sonar-core/src/main/java/org/sonar/api/database/configuration/Property.java index efafbcc508d..f464c73adb6 100644 --- a/sonar-core/src/main/java/org/sonar/api/database/configuration/Property.java +++ b/sonar-core/src/main/java/org/sonar/api/database/configuration/Property.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/api/database/configuration/ResourceDatabaseConfiguration.java b/sonar-core/src/main/java/org/sonar/api/database/configuration/ResourceDatabaseConfiguration.java index 4cead063e31..d53ea7f6f61 100644 --- a/sonar-core/src/main/java/org/sonar/api/database/configuration/ResourceDatabaseConfiguration.java +++ b/sonar-core/src/main/java/org/sonar/api/database/configuration/ResourceDatabaseConfiguration.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/core/classloaders/ClassLoadersCollection.java b/sonar-core/src/main/java/org/sonar/core/classloaders/ClassLoadersCollection.java index ac3b0f6afab..9df43699ec8 100644 --- a/sonar-core/src/main/java/org/sonar/core/classloaders/ClassLoadersCollection.java +++ b/sonar-core/src/main/java/org/sonar/core/classloaders/ClassLoadersCollection.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/core/classloaders/ResourcesClassLoader.java b/sonar-core/src/main/java/org/sonar/core/classloaders/ResourcesClassLoader.java index 2944b8547e5..8e871d084c2 100644 --- a/sonar-core/src/main/java/org/sonar/core/classloaders/ResourcesClassLoader.java +++ b/sonar-core/src/main/java/org/sonar/core/classloaders/ResourcesClassLoader.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/core/components/CacheMetricFinder.java b/sonar-core/src/main/java/org/sonar/core/components/CacheMetricFinder.java index 7b42df06bb7..6e2ab843b58 100644 --- a/sonar-core/src/main/java/org/sonar/core/components/CacheMetricFinder.java +++ b/sonar-core/src/main/java/org/sonar/core/components/CacheMetricFinder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/core/components/CacheRuleFinder.java b/sonar-core/src/main/java/org/sonar/core/components/CacheRuleFinder.java index 1e0b747bb61..cf31ad3a525 100644 --- a/sonar-core/src/main/java/org/sonar/core/components/CacheRuleFinder.java +++ b/sonar-core/src/main/java/org/sonar/core/components/CacheRuleFinder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/core/components/DefaultMetricFinder.java b/sonar-core/src/main/java/org/sonar/core/components/DefaultMetricFinder.java index 12eaf9c68c5..e3165f32915 100644 --- a/sonar-core/src/main/java/org/sonar/core/components/DefaultMetricFinder.java +++ b/sonar-core/src/main/java/org/sonar/core/components/DefaultMetricFinder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/core/components/DefaultModelFinder.java b/sonar-core/src/main/java/org/sonar/core/components/DefaultModelFinder.java index a7a04c7cf24..cbddb421088 100644 --- a/sonar-core/src/main/java/org/sonar/core/components/DefaultModelFinder.java +++ b/sonar-core/src/main/java/org/sonar/core/components/DefaultModelFinder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/core/components/DefaultRuleFinder.java b/sonar-core/src/main/java/org/sonar/core/components/DefaultRuleFinder.java index 3c0d50e7bcd..2b0318c14b0 100644 --- a/sonar-core/src/main/java/org/sonar/core/components/DefaultRuleFinder.java +++ b/sonar-core/src/main/java/org/sonar/core/components/DefaultRuleFinder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/core/plugin/AbstractPluginRepository.java b/sonar-core/src/main/java/org/sonar/core/plugin/AbstractPluginRepository.java index a1e51e95d9a..0d4f65e89f4 100644 --- a/sonar-core/src/main/java/org/sonar/core/plugin/AbstractPluginRepository.java +++ b/sonar-core/src/main/java/org/sonar/core/plugin/AbstractPluginRepository.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/core/plugin/JpaPlugin.java b/sonar-core/src/main/java/org/sonar/core/plugin/JpaPlugin.java index 22b6772d874..a842173f3a2 100644 --- a/sonar-core/src/main/java/org/sonar/core/plugin/JpaPlugin.java +++ b/sonar-core/src/main/java/org/sonar/core/plugin/JpaPlugin.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/core/plugin/JpaPluginDao.java b/sonar-core/src/main/java/org/sonar/core/plugin/JpaPluginDao.java index 1fe44ab9e7b..2f7f241cf5f 100644 --- a/sonar-core/src/main/java/org/sonar/core/plugin/JpaPluginDao.java +++ b/sonar-core/src/main/java/org/sonar/core/plugin/JpaPluginDao.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/core/plugin/JpaPluginFile.java b/sonar-core/src/main/java/org/sonar/core/plugin/JpaPluginFile.java index 03c4934e4aa..4deef0f3c64 100644 --- a/sonar-core/src/main/java/org/sonar/core/plugin/JpaPluginFile.java +++ b/sonar-core/src/main/java/org/sonar/core/plugin/JpaPluginFile.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/dao/AsyncMeasuresDao.java b/sonar-core/src/main/java/org/sonar/jpa/dao/AsyncMeasuresDao.java index 4c8c71b0b72..5f09d281a97 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dao/AsyncMeasuresDao.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dao/AsyncMeasuresDao.java @@ -1,196 +1,196 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.jpa.dao;
-
-import org.sonar.api.database.DatabaseSession;
-import org.sonar.api.database.model.AsyncMeasureSnapshot;
-import org.sonar.api.database.model.MeasureModel;
-import org.sonar.api.database.model.ResourceModel;
-import org.sonar.api.database.model.Snapshot;
-
-import javax.persistence.NoResultException;
-import javax.persistence.Query;
-import java.util.Date;
-import java.util.List;
-
-public class AsyncMeasuresDao extends BaseDao {
-
- public AsyncMeasuresDao(DatabaseSession session) {
- super(session);
- }
-
- public MeasureModel getAsyncMeasure(Long asyncMeasureId) {
- return getSession().getEntityManager().find(MeasureModel.class, asyncMeasureId);
- }
-
- public void deleteAsyncMeasure(MeasureModel asyncMeasure) {
- deleteAsyncMeasureSnapshots(asyncMeasure.getId());
- getSession().remove(asyncMeasure);
- }
-
- public Snapshot getPreviousSnapshot(Snapshot s) {
- try {
- return (Snapshot) getSession().createQuery(
- "SELECT s FROM Snapshot s " +
- "WHERE s.createdAt<:date " +
- "AND s.scope=:scope " +
- "AND s.resourceId=:resourceId " +
- "ORDER BY s.createdAt DESC")
- .setParameter("date", s.getCreatedAt())
- .setParameter("scope", s.getScope())
- .setParameter("resourceId", s.getResourceId())
- .setMaxResults(1)
- .getSingleResult();
- } catch (NoResultException ex) {
- return null;
- }
- }
-
- public List<Snapshot> getNextSnapshotsUntilDate(MeasureModel measure, Date date) {
- Query query = getSession().createQuery(
- "SELECT s FROM Snapshot s " +
- "WHERE s.resourceId=:projectId " +
- "AND s.createdAt>=:beginDate " +
- (date != null ? "AND s.createdAt<:endDate " : "") +
- "AND s.scope=:scope " +
- "ORDER BY s.createdAt ASC ")
- .setParameter("projectId", measure.getProjectId())
- .setParameter("beginDate", measure.getMeasureDate())
- .setParameter("scope", ResourceModel.SCOPE_PROJECT);
- if (date != null) {
- query.setParameter("endDate", date);
- }
- return query.getResultList();
- }
-
- public AsyncMeasureSnapshot createAsyncMeasureSnapshot(Long asyncMeasureId, Integer snapshotId, Date AsyncMeasureDate, Date snapshotDate, Integer metricId, Integer projectId) {
- AsyncMeasureSnapshot asyncMeasureSnapshot = new AsyncMeasureSnapshot(asyncMeasureId, snapshotId, AsyncMeasureDate, snapshotDate, metricId, projectId);
- getSession().save(asyncMeasureSnapshot);
- return asyncMeasureSnapshot;
- }
-
- public void updateAsyncMeasureSnapshot(AsyncMeasureSnapshot asyncMeasureSnapshot, Snapshot snapshot) {
- if (snapshot != null) {
- asyncMeasureSnapshot.setSnapshotId(snapshot.getId());
- asyncMeasureSnapshot.setSnapshotDate(snapshot.getCreatedAt());
- } else {
- asyncMeasureSnapshot.setSnapshotId(null);
- asyncMeasureSnapshot.setSnapshotDate(null);
- }
- getSession().merge(asyncMeasureSnapshot);
- }
-
- public void removeSnapshotFromAsyncMeasureSnapshot(AsyncMeasureSnapshot asyncMeasureSnapshot) {
- asyncMeasureSnapshot.setSnapshotId(null);
- asyncMeasureSnapshot.setSnapshotDate(null);
- getSession().merge(asyncMeasureSnapshot);
- }
-
-
- public AsyncMeasureSnapshot getNextAsyncMeasureSnapshot(Integer projetcId, Integer metricId, Date date) {
- try {
- return (AsyncMeasureSnapshot) getSession().createQuery(
- "SELECT ams FROM AsyncMeasureSnapshot ams " +
- "WHERE ams.projectId=:projectId " +
- "AND ams.metricId=:metricId " +
- "AND ams.measureDate>:date " +
- "ORDER BY ams.measureDate ASC")
- .setParameter("projectId", projetcId)
- .setParameter("metricId", metricId)
- .setParameter("date", date)
- .setMaxResults(1)
- .getSingleResult();
- } catch (NoResultException ex) {
- return null;
- }
- }
-
- public List<AsyncMeasureSnapshot> getNextAsyncMeasureSnapshotsUntilDate(MeasureModel asyncMeasure, Date endDate) {
- Query query = getSession().createQuery(
- "SELECT ams FROM AsyncMeasureSnapshot ams " +
- "WHERE ams.projectId=:projectId " +
- "AND ams.metricId=:metricId " +
- (endDate != null ? "AND ams.measureDate<:endDate " : "") +
- "AND ams.snapshotDate>=:measureDate " +
- "ORDER BY ams.snapshotDate ASC ")
- .setParameter("projectId", asyncMeasure.getProjectId())
- .setParameter("metricId", asyncMeasure.getMetricId())
- .setParameter("measureDate", asyncMeasure.getMeasureDate());
- if (endDate != null) {
- query.setParameter("endDate", endDate);
- }
- return query.getResultList();
- }
-
- public List<AsyncMeasureSnapshot> getPreviousAsyncMeasureSnapshots(Integer projectId, Date beginDate, Date endDate) {
- Query query = getSession().createQuery(
- "SELECT ams FROM AsyncMeasureSnapshot ams " +
- "WHERE ams.projectId=:projectId " +
- "AND ams.measureDate<=:endDate " +
- (beginDate != null ? "AND ams.measureDate>:beginDate " : "") +
- "AND ams.snapshotId IS NULL " +
- "ORDER BY ams.measureDate ASC")
- .setParameter("projectId", projectId)
- .setParameter("endDate", endDate);
- if (beginDate != null) {
- query.setParameter("beginDate", beginDate);
- }
- return query.getResultList();
- }
-
- public List<AsyncMeasureSnapshot> getAsyncMeasureSnapshotsFromSnapshotId(Integer snapshotId, List<Integer> metricIdsToExclude) {
- Query query = getSession().createQuery(
- "SELECT ams FROM AsyncMeasureSnapshot ams " +
- "WHERE ams.snapshotId=:snapshotId " +
- (!metricIdsToExclude.isEmpty() ? "AND ams.metricId NOT IN (:metricIdsToExclude) " : "") +
- "ORDER BY ams.measureDate ASC")
- .setParameter("snapshotId", snapshotId);
- if (!metricIdsToExclude.isEmpty()) {
- query.setParameter("metricIdsToExclude", metricIdsToExclude);
- }
- return query.getResultList();
- }
-
- public AsyncMeasureSnapshot getLastAsyncMeasureSnapshot(Integer projetcId, Integer metricId, Date date) {
- try {
- return (AsyncMeasureSnapshot) getSession().createQuery(
- "SELECT ams FROM AsyncMeasureSnapshot ams " +
- "WHERE ams.projectId=:projectId " +
- "AND ams.metricId=:metricId " +
- "AND ams.measureDate<:date " +
- "ORDER BY ams.measureDate DESC")
- .setParameter("projectId", projetcId)
- .setParameter("metricId", metricId)
- .setParameter("date", date)
- .setMaxResults(1)
- .getSingleResult();
- } catch (NoResultException ex) {
- return null;
- }
- }
-
- public void deleteAsyncMeasureSnapshots(Long asyncMeasureId) {
- getSession().createQuery(
- "DELETE FROM AsyncMeasureSnapshot ams WHERE ams.measureId=:measureId")
- .setParameter("measureId", asyncMeasureId)
- .executeUpdate();
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.jpa.dao; + +import org.sonar.api.database.DatabaseSession; +import org.sonar.api.database.model.AsyncMeasureSnapshot; +import org.sonar.api.database.model.MeasureModel; +import org.sonar.api.database.model.ResourceModel; +import org.sonar.api.database.model.Snapshot; + +import javax.persistence.NoResultException; +import javax.persistence.Query; +import java.util.Date; +import java.util.List; + +public class AsyncMeasuresDao extends BaseDao { + + public AsyncMeasuresDao(DatabaseSession session) { + super(session); + } + + public MeasureModel getAsyncMeasure(Long asyncMeasureId) { + return getSession().getEntityManager().find(MeasureModel.class, asyncMeasureId); + } + + public void deleteAsyncMeasure(MeasureModel asyncMeasure) { + deleteAsyncMeasureSnapshots(asyncMeasure.getId()); + getSession().remove(asyncMeasure); + } + + public Snapshot getPreviousSnapshot(Snapshot s) { + try { + return (Snapshot) getSession().createQuery( + "SELECT s FROM Snapshot s " + + "WHERE s.createdAt<:date " + + "AND s.scope=:scope " + + "AND s.resourceId=:resourceId " + + "ORDER BY s.createdAt DESC") + .setParameter("date", s.getCreatedAt()) + .setParameter("scope", s.getScope()) + .setParameter("resourceId", s.getResourceId()) + .setMaxResults(1) + .getSingleResult(); + } catch (NoResultException ex) { + return null; + } + } + + public List<Snapshot> getNextSnapshotsUntilDate(MeasureModel measure, Date date) { + Query query = getSession().createQuery( + "SELECT s FROM Snapshot s " + + "WHERE s.resourceId=:projectId " + + "AND s.createdAt>=:beginDate " + + (date != null ? "AND s.createdAt<:endDate " : "") + + "AND s.scope=:scope " + + "ORDER BY s.createdAt ASC ") + .setParameter("projectId", measure.getProjectId()) + .setParameter("beginDate", measure.getMeasureDate()) + .setParameter("scope", ResourceModel.SCOPE_PROJECT); + if (date != null) { + query.setParameter("endDate", date); + } + return query.getResultList(); + } + + public AsyncMeasureSnapshot createAsyncMeasureSnapshot(Long asyncMeasureId, Integer snapshotId, Date AsyncMeasureDate, Date snapshotDate, Integer metricId, Integer projectId) { + AsyncMeasureSnapshot asyncMeasureSnapshot = new AsyncMeasureSnapshot(asyncMeasureId, snapshotId, AsyncMeasureDate, snapshotDate, metricId, projectId); + getSession().save(asyncMeasureSnapshot); + return asyncMeasureSnapshot; + } + + public void updateAsyncMeasureSnapshot(AsyncMeasureSnapshot asyncMeasureSnapshot, Snapshot snapshot) { + if (snapshot != null) { + asyncMeasureSnapshot.setSnapshotId(snapshot.getId()); + asyncMeasureSnapshot.setSnapshotDate(snapshot.getCreatedAt()); + } else { + asyncMeasureSnapshot.setSnapshotId(null); + asyncMeasureSnapshot.setSnapshotDate(null); + } + getSession().merge(asyncMeasureSnapshot); + } + + public void removeSnapshotFromAsyncMeasureSnapshot(AsyncMeasureSnapshot asyncMeasureSnapshot) { + asyncMeasureSnapshot.setSnapshotId(null); + asyncMeasureSnapshot.setSnapshotDate(null); + getSession().merge(asyncMeasureSnapshot); + } + + + public AsyncMeasureSnapshot getNextAsyncMeasureSnapshot(Integer projetcId, Integer metricId, Date date) { + try { + return (AsyncMeasureSnapshot) getSession().createQuery( + "SELECT ams FROM AsyncMeasureSnapshot ams " + + "WHERE ams.projectId=:projectId " + + "AND ams.metricId=:metricId " + + "AND ams.measureDate>:date " + + "ORDER BY ams.measureDate ASC") + .setParameter("projectId", projetcId) + .setParameter("metricId", metricId) + .setParameter("date", date) + .setMaxResults(1) + .getSingleResult(); + } catch (NoResultException ex) { + return null; + } + } + + public List<AsyncMeasureSnapshot> getNextAsyncMeasureSnapshotsUntilDate(MeasureModel asyncMeasure, Date endDate) { + Query query = getSession().createQuery( + "SELECT ams FROM AsyncMeasureSnapshot ams " + + "WHERE ams.projectId=:projectId " + + "AND ams.metricId=:metricId " + + (endDate != null ? "AND ams.measureDate<:endDate " : "") + + "AND ams.snapshotDate>=:measureDate " + + "ORDER BY ams.snapshotDate ASC ") + .setParameter("projectId", asyncMeasure.getProjectId()) + .setParameter("metricId", asyncMeasure.getMetricId()) + .setParameter("measureDate", asyncMeasure.getMeasureDate()); + if (endDate != null) { + query.setParameter("endDate", endDate); + } + return query.getResultList(); + } + + public List<AsyncMeasureSnapshot> getPreviousAsyncMeasureSnapshots(Integer projectId, Date beginDate, Date endDate) { + Query query = getSession().createQuery( + "SELECT ams FROM AsyncMeasureSnapshot ams " + + "WHERE ams.projectId=:projectId " + + "AND ams.measureDate<=:endDate " + + (beginDate != null ? "AND ams.measureDate>:beginDate " : "") + + "AND ams.snapshotId IS NULL " + + "ORDER BY ams.measureDate ASC") + .setParameter("projectId", projectId) + .setParameter("endDate", endDate); + if (beginDate != null) { + query.setParameter("beginDate", beginDate); + } + return query.getResultList(); + } + + public List<AsyncMeasureSnapshot> getAsyncMeasureSnapshotsFromSnapshotId(Integer snapshotId, List<Integer> metricIdsToExclude) { + Query query = getSession().createQuery( + "SELECT ams FROM AsyncMeasureSnapshot ams " + + "WHERE ams.snapshotId=:snapshotId " + + (!metricIdsToExclude.isEmpty() ? "AND ams.metricId NOT IN (:metricIdsToExclude) " : "") + + "ORDER BY ams.measureDate ASC") + .setParameter("snapshotId", snapshotId); + if (!metricIdsToExclude.isEmpty()) { + query.setParameter("metricIdsToExclude", metricIdsToExclude); + } + return query.getResultList(); + } + + public AsyncMeasureSnapshot getLastAsyncMeasureSnapshot(Integer projetcId, Integer metricId, Date date) { + try { + return (AsyncMeasureSnapshot) getSession().createQuery( + "SELECT ams FROM AsyncMeasureSnapshot ams " + + "WHERE ams.projectId=:projectId " + + "AND ams.metricId=:metricId " + + "AND ams.measureDate<:date " + + "ORDER BY ams.measureDate DESC") + .setParameter("projectId", projetcId) + .setParameter("metricId", metricId) + .setParameter("date", date) + .setMaxResults(1) + .getSingleResult(); + } catch (NoResultException ex) { + return null; + } + } + + public void deleteAsyncMeasureSnapshots(Long asyncMeasureId) { + getSession().createQuery( + "DELETE FROM AsyncMeasureSnapshot ams WHERE ams.measureId=:measureId") + .setParameter("measureId", asyncMeasureId) + .executeUpdate(); + } + +} diff --git a/sonar-core/src/main/java/org/sonar/jpa/dao/AsyncMeasuresService.java b/sonar-core/src/main/java/org/sonar/jpa/dao/AsyncMeasuresService.java index 26b1926b901..e985ee3c614 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dao/AsyncMeasuresService.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dao/AsyncMeasuresService.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/dao/BaseDao.java b/sonar-core/src/main/java/org/sonar/jpa/dao/BaseDao.java index 3c5f441bf43..f493c31795a 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dao/BaseDao.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dao/BaseDao.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/dao/DaoFacade.java b/sonar-core/src/main/java/org/sonar/jpa/dao/DaoFacade.java index 078b5c65396..fad86b13ce3 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dao/DaoFacade.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dao/DaoFacade.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/dao/MeasuresDao.java b/sonar-core/src/main/java/org/sonar/jpa/dao/MeasuresDao.java index 77303c1c9ba..6501e981a32 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dao/MeasuresDao.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dao/MeasuresDao.java @@ -1,120 +1,120 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.jpa.dao;
-
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.collections.Predicate;
-import org.sonar.api.database.DatabaseSession;
-import org.sonar.api.measures.Metric;
-
-import java.util.*;
-
-public class MeasuresDao extends BaseDao {
-
- private final Map<String, Metric> metricsByName = new HashMap<String, Metric>();
-
- public MeasuresDao(DatabaseSession session) {
- super(session);
- }
-
- public Metric getMetric(Metric metric) {
- return getMetricsByName().get(metric.getKey());
- }
-
- public List<Metric> getMetrics(List<Metric> metrics) {
- List<Metric> result = new ArrayList<Metric>();
- for (Metric metric : metrics) {
- result.add(getMetric(metric));
- }
- return result;
- }
-
- public Metric getMetric(String metricName) {
- return getMetricsByName().get(metricName);
- }
-
- public Collection<Metric> getMetrics() {
- return getMetricsByName().values();
- }
-
- public Collection<Metric> getEnabledMetrics() {
- return CollectionUtils.select(getMetricsByName().values(), new Predicate() {
- public boolean evaluate(Object o) {
- return ((Metric) o).getEnabled();
- }
- });
- }
-
- public Collection<Metric> getUserDefinedMetrics() {
- return CollectionUtils.select(getMetricsByName().values(), new Predicate() {
- public boolean evaluate(Object o) {
- Metric m = (Metric) o;
- return (m.getEnabled() && m.getOrigin() != Metric.Origin.JAV);
- }
- });
- }
-
- public void disableAutomaticMetrics() {
- getSession().createQuery("update " + Metric.class.getSimpleName() + " m set m.enabled=false where m.userManaged=false").executeUpdate();
- getSession().commit();
- metricsByName.clear();
- }
-
- public void registerMetrics(Collection<Metric> metrics) {
- if (metrics != null) {
- for (Metric metric : metrics) {
- metric.setEnabled(Boolean.TRUE);
- persistMetric(metric);
- }
- getSession().commit();
- }
- }
-
- public void persistMetric(Metric metric) {
- Metric dbMetric = getMetric(metric);
- if (dbMetric != null) {
- dbMetric.merge(metric);
- getSession().getEntityManager().merge(dbMetric);
-
- } else {
- getSession().getEntityManager().persist(metric);
- }
-
- metricsByName.clear();
- }
-
- public void disabledMetrics(Collection<Metric> metrics) {
- for (Metric metric : metrics) {
- metric.setEnabled(Boolean.FALSE);
- getSession().getEntityManager().persist(metric);
- metricsByName.put(metric.getName(), metric);
- }
- }
-
- private Map<String, Metric> getMetricsByName() {
- if (metricsByName.isEmpty()) {
- List<Metric> metrics = getSession().getResults(Metric.class);
- for (Metric metric : metrics) {
- metricsByName.put(metric.getKey(), metric);
- }
- }
- return metricsByName;
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.jpa.dao; + +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections.Predicate; +import org.sonar.api.database.DatabaseSession; +import org.sonar.api.measures.Metric; + +import java.util.*; + +public class MeasuresDao extends BaseDao { + + private final Map<String, Metric> metricsByName = new HashMap<String, Metric>(); + + public MeasuresDao(DatabaseSession session) { + super(session); + } + + public Metric getMetric(Metric metric) { + return getMetricsByName().get(metric.getKey()); + } + + public List<Metric> getMetrics(List<Metric> metrics) { + List<Metric> result = new ArrayList<Metric>(); + for (Metric metric : metrics) { + result.add(getMetric(metric)); + } + return result; + } + + public Metric getMetric(String metricName) { + return getMetricsByName().get(metricName); + } + + public Collection<Metric> getMetrics() { + return getMetricsByName().values(); + } + + public Collection<Metric> getEnabledMetrics() { + return CollectionUtils.select(getMetricsByName().values(), new Predicate() { + public boolean evaluate(Object o) { + return ((Metric) o).getEnabled(); + } + }); + } + + public Collection<Metric> getUserDefinedMetrics() { + return CollectionUtils.select(getMetricsByName().values(), new Predicate() { + public boolean evaluate(Object o) { + Metric m = (Metric) o; + return (m.getEnabled() && m.getOrigin() != Metric.Origin.JAV); + } + }); + } + + public void disableAutomaticMetrics() { + getSession().createQuery("update " + Metric.class.getSimpleName() + " m set m.enabled=false where m.userManaged=false").executeUpdate(); + getSession().commit(); + metricsByName.clear(); + } + + public void registerMetrics(Collection<Metric> metrics) { + if (metrics != null) { + for (Metric metric : metrics) { + metric.setEnabled(Boolean.TRUE); + persistMetric(metric); + } + getSession().commit(); + } + } + + public void persistMetric(Metric metric) { + Metric dbMetric = getMetric(metric); + if (dbMetric != null) { + dbMetric.merge(metric); + getSession().getEntityManager().merge(dbMetric); + + } else { + getSession().getEntityManager().persist(metric); + } + + metricsByName.clear(); + } + + public void disabledMetrics(Collection<Metric> metrics) { + for (Metric metric : metrics) { + metric.setEnabled(Boolean.FALSE); + getSession().getEntityManager().persist(metric); + metricsByName.put(metric.getName(), metric); + } + } + + private Map<String, Metric> getMetricsByName() { + if (metricsByName.isEmpty()) { + List<Metric> metrics = getSession().getResults(Metric.class); + for (Metric metric : metrics) { + metricsByName.put(metric.getKey(), metric); + } + } + return metricsByName; + } +} diff --git a/sonar-core/src/main/java/org/sonar/jpa/dao/ProfilesDao.java b/sonar-core/src/main/java/org/sonar/jpa/dao/ProfilesDao.java index ba1eb21cf80..86ea45a7aa9 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dao/ProfilesDao.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dao/ProfilesDao.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/dao/RulesDao.java b/sonar-core/src/main/java/org/sonar/jpa/dao/RulesDao.java index b90e8afe852..4870ad168e7 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dao/RulesDao.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dao/RulesDao.java @@ -1,65 +1,65 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.jpa.dao;
-
-import org.sonar.api.database.DatabaseSession;
-import org.sonar.api.database.model.RuleFailureModel;
-import org.sonar.api.database.model.Snapshot;
-import org.sonar.api.profiles.RulesProfile;
-import org.sonar.api.rules.ActiveRule;
-import org.sonar.api.rules.ActiveRuleParam;
-import org.sonar.api.rules.Rule;
-import org.sonar.api.rules.RuleParam;
-
-import java.util.Iterator;
-import java.util.List;
-
-public class RulesDao extends BaseDao {
-
- public RulesDao(DatabaseSession session) {
- super(session);
- }
-
- public List<Rule> getRules() {
- return getSession().getResults(Rule.class, "enabled", true);
- }
-
- public List<Rule> getRulesByRepository(String repositoryKey) {
- return getSession().getResults(Rule.class, "pluginName", repositoryKey, "enabled", true);
- }
-
- /**
- * @deprecated since 2.5 use {@link #getRulesByRepository(String)} instead.
- */
- @Deprecated
- public List<Rule> getRulesByPlugin(String pluginKey) {
- return getRulesByRepository(pluginKey);
- }
-
- public Rule getRuleByKey(String repositoryKey, String ruleKey) {
- return getSession().getSingleResult(Rule.class, "key", ruleKey, "pluginName", repositoryKey, "enabled", true);
- }
-
-
- public RuleParam getRuleParam(Rule rule, String paramKey) {
- return getSession().getSingleResult(RuleParam.class, "rule", rule, "key", paramKey);
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.jpa.dao; + +import org.sonar.api.database.DatabaseSession; +import org.sonar.api.database.model.RuleFailureModel; +import org.sonar.api.database.model.Snapshot; +import org.sonar.api.profiles.RulesProfile; +import org.sonar.api.rules.ActiveRule; +import org.sonar.api.rules.ActiveRuleParam; +import org.sonar.api.rules.Rule; +import org.sonar.api.rules.RuleParam; + +import java.util.Iterator; +import java.util.List; + +public class RulesDao extends BaseDao { + + public RulesDao(DatabaseSession session) { + super(session); + } + + public List<Rule> getRules() { + return getSession().getResults(Rule.class, "enabled", true); + } + + public List<Rule> getRulesByRepository(String repositoryKey) { + return getSession().getResults(Rule.class, "pluginName", repositoryKey, "enabled", true); + } + + /** + * @deprecated since 2.5 use {@link #getRulesByRepository(String)} instead. + */ + @Deprecated + public List<Rule> getRulesByPlugin(String pluginKey) { + return getRulesByRepository(pluginKey); + } + + public Rule getRuleByKey(String repositoryKey, String ruleKey) { + return getSession().getSingleResult(Rule.class, "key", ruleKey, "pluginName", repositoryKey, "enabled", true); + } + + + public RuleParam getRuleParam(Rule rule, String paramKey) { + return getSession().getSingleResult(RuleParam.class, "rule", rule, "key", paramKey); + } + +} diff --git a/sonar-core/src/main/java/org/sonar/jpa/dialect/Derby.java b/sonar-core/src/main/java/org/sonar/jpa/dialect/Derby.java index ec54f8f059a..b0c0ec5614d 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dialect/Derby.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dialect/Derby.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/dialect/Dialect.java b/sonar-core/src/main/java/org/sonar/jpa/dialect/Dialect.java index 0f860ae4e32..8a265b59430 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dialect/Dialect.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dialect/Dialect.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/dialect/DialectRepository.java b/sonar-core/src/main/java/org/sonar/jpa/dialect/DialectRepository.java index e05c3b92329..48d06331084 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dialect/DialectRepository.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dialect/DialectRepository.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/dialect/HsqlDb.java b/sonar-core/src/main/java/org/sonar/jpa/dialect/HsqlDb.java index b6bb3a68392..b8440a7efa3 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dialect/HsqlDb.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dialect/HsqlDb.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/dialect/MsSql.java b/sonar-core/src/main/java/org/sonar/jpa/dialect/MsSql.java index f59c2ee4240..8e480719c2a 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dialect/MsSql.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dialect/MsSql.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/dialect/MySql.java b/sonar-core/src/main/java/org/sonar/jpa/dialect/MySql.java index 180dec0b1ee..694e1335793 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dialect/MySql.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dialect/MySql.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/dialect/Oracle.java b/sonar-core/src/main/java/org/sonar/jpa/dialect/Oracle.java index ebec6753619..990e617e1d0 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dialect/Oracle.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dialect/Oracle.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/dialect/OracleSequenceGenerator.java b/sonar-core/src/main/java/org/sonar/jpa/dialect/OracleSequenceGenerator.java index 7fa1abfa2d1..b62af9d9b45 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dialect/OracleSequenceGenerator.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dialect/OracleSequenceGenerator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/dialect/PostgreSQLSequenceGenerator.java b/sonar-core/src/main/java/org/sonar/jpa/dialect/PostgreSQLSequenceGenerator.java index 12094ba0745..a04390c2b3e 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dialect/PostgreSQLSequenceGenerator.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dialect/PostgreSQLSequenceGenerator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/dialect/PostgreSql.java b/sonar-core/src/main/java/org/sonar/jpa/dialect/PostgreSql.java index 7d7318e51eb..b7741722b9d 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dialect/PostgreSql.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dialect/PostgreSql.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java b/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java index 921cbcab6d3..f4c958a1452 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java +++ b/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseBatch.java b/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseBatch.java index 6f90114d5a8..28dd8140c9b 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseBatch.java +++ b/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseBatch.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java b/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java index 9ea59cd7b89..3dcc9908278 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java +++ b/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseBatch.java b/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseBatch.java index 8612b5c3f03..d2298d8d8ab 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseBatch.java +++ b/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseBatch.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseConnector.java b/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseConnector.java index 93aa1191504..72abcf6755a 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseConnector.java +++ b/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseConnector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseException.java b/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseException.java index 46ec6d5cf26..e8ae03ef336 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseException.java +++ b/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseSessionFactory.java b/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseSessionFactory.java index 8257f4c5cb2..06feec22d5e 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseSessionFactory.java +++ b/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseSessionFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseSessionProvider.java b/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseSessionProvider.java index 8ea912e1b79..8236ca120d2 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseSessionProvider.java +++ b/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseSessionProvider.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/session/DriverDatabaseConnector.java b/sonar-core/src/main/java/org/sonar/jpa/session/DriverDatabaseConnector.java index 151284a4d67..d30892f14b4 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/session/DriverDatabaseConnector.java +++ b/sonar-core/src/main/java/org/sonar/jpa/session/DriverDatabaseConnector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/session/JpaDatabaseSession.java b/sonar-core/src/main/java/org/sonar/jpa/session/JpaDatabaseSession.java index 5a350117670..b407bacfe2a 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/session/JpaDatabaseSession.java +++ b/sonar-core/src/main/java/org/sonar/jpa/session/JpaDatabaseSession.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/session/MemoryDatabaseConnector.java b/sonar-core/src/main/java/org/sonar/jpa/session/MemoryDatabaseConnector.java index 5d00ddb02df..5e9cfa2f09f 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/session/MemoryDatabaseConnector.java +++ b/sonar-core/src/main/java/org/sonar/jpa/session/MemoryDatabaseConnector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/main/java/org/sonar/jpa/session/ThreadLocalDatabaseSessionFactory.java b/sonar-core/src/main/java/org/sonar/jpa/session/ThreadLocalDatabaseSessionFactory.java index 8bd845565b2..66a0581b319 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/session/ThreadLocalDatabaseSessionFactory.java +++ b/sonar-core/src/main/java/org/sonar/jpa/session/ThreadLocalDatabaseSessionFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/api/database/configuration/DatabaseConfigurationTest.java b/sonar-core/src/test/java/org/sonar/api/database/configuration/DatabaseConfigurationTest.java index 26a54faedff..74c8b41a491 100644 --- a/sonar-core/src/test/java/org/sonar/api/database/configuration/DatabaseConfigurationTest.java +++ b/sonar-core/src/test/java/org/sonar/api/database/configuration/DatabaseConfigurationTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/api/database/configuration/ResourceDatabaseConfigurationTest.java b/sonar-core/src/test/java/org/sonar/api/database/configuration/ResourceDatabaseConfigurationTest.java index a856d0729fd..c7739d0a278 100644 --- a/sonar-core/src/test/java/org/sonar/api/database/configuration/ResourceDatabaseConfigurationTest.java +++ b/sonar-core/src/test/java/org/sonar/api/database/configuration/ResourceDatabaseConfigurationTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/core/classloaders/ClassLoadersCollectionTest.java b/sonar-core/src/test/java/org/sonar/core/classloaders/ClassLoadersCollectionTest.java index bf5876dec33..0f69e2624b0 100644 --- a/sonar-core/src/test/java/org/sonar/core/classloaders/ClassLoadersCollectionTest.java +++ b/sonar-core/src/test/java/org/sonar/core/classloaders/ClassLoadersCollectionTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/core/classloaders/ResourcesClassLoaderTest.java b/sonar-core/src/test/java/org/sonar/core/classloaders/ResourcesClassLoaderTest.java index 001ca44f690..675567e85b7 100644 --- a/sonar-core/src/test/java/org/sonar/core/classloaders/ResourcesClassLoaderTest.java +++ b/sonar-core/src/test/java/org/sonar/core/classloaders/ResourcesClassLoaderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/core/components/CacheMetricFinderTest.java b/sonar-core/src/test/java/org/sonar/core/components/CacheMetricFinderTest.java index a67fd0cf713..813740c7e6c 100644 --- a/sonar-core/src/test/java/org/sonar/core/components/CacheMetricFinderTest.java +++ b/sonar-core/src/test/java/org/sonar/core/components/CacheMetricFinderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/core/components/CacheRuleFinderTest.java b/sonar-core/src/test/java/org/sonar/core/components/CacheRuleFinderTest.java index 0eb9d239161..33d76615ad0 100644 --- a/sonar-core/src/test/java/org/sonar/core/components/CacheRuleFinderTest.java +++ b/sonar-core/src/test/java/org/sonar/core/components/CacheRuleFinderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/core/components/DefaultMetricFinderTest.java b/sonar-core/src/test/java/org/sonar/core/components/DefaultMetricFinderTest.java index 9a6cec853c5..cfb615d5da5 100644 --- a/sonar-core/src/test/java/org/sonar/core/components/DefaultMetricFinderTest.java +++ b/sonar-core/src/test/java/org/sonar/core/components/DefaultMetricFinderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/core/components/DefaultModelFinderTest.java b/sonar-core/src/test/java/org/sonar/core/components/DefaultModelFinderTest.java index 222bf4053ed..0b96ed82e26 100644 --- a/sonar-core/src/test/java/org/sonar/core/components/DefaultModelFinderTest.java +++ b/sonar-core/src/test/java/org/sonar/core/components/DefaultModelFinderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/core/components/DefaultRuleFinderTest.java b/sonar-core/src/test/java/org/sonar/core/components/DefaultRuleFinderTest.java index 7d2c2b8176a..0d5ce6b71b9 100644 --- a/sonar-core/src/test/java/org/sonar/core/components/DefaultRuleFinderTest.java +++ b/sonar-core/src/test/java/org/sonar/core/components/DefaultRuleFinderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/core/components/ModelTest.java b/sonar-core/src/test/java/org/sonar/core/components/ModelTest.java index b614dfbe8d2..5e45216c2ca 100644 --- a/sonar-core/src/test/java/org/sonar/core/components/ModelTest.java +++ b/sonar-core/src/test/java/org/sonar/core/components/ModelTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/core/plugin/AbstractPluginRepositoryTest.java b/sonar-core/src/test/java/org/sonar/core/plugin/AbstractPluginRepositoryTest.java index 6e1aa0d93de..475e469851e 100644 --- a/sonar-core/src/test/java/org/sonar/core/plugin/AbstractPluginRepositoryTest.java +++ b/sonar-core/src/test/java/org/sonar/core/plugin/AbstractPluginRepositoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/core/plugin/JpaPluginDaoTest.java b/sonar-core/src/test/java/org/sonar/core/plugin/JpaPluginDaoTest.java index 878c492c89b..48492ca30fe 100644 --- a/sonar-core/src/test/java/org/sonar/core/plugin/JpaPluginDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/plugin/JpaPluginDaoTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/core/plugin/JpaPluginTest.java b/sonar-core/src/test/java/org/sonar/core/plugin/JpaPluginTest.java index 6a6d3cad2ca..0698e5c9bd1 100644 --- a/sonar-core/src/test/java/org/sonar/core/plugin/JpaPluginTest.java +++ b/sonar-core/src/test/java/org/sonar/core/plugin/JpaPluginTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/jpa/dao/AsyncMeasuresDaoTest.java b/sonar-core/src/test/java/org/sonar/jpa/dao/AsyncMeasuresDaoTest.java index 3c70c3fd62c..ea86260a583 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/dao/AsyncMeasuresDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/dao/AsyncMeasuresDaoTest.java @@ -1,165 +1,165 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.jpa.dao;
-
-import org.junit.Test;
-import org.sonar.api.database.model.AsyncMeasureSnapshot;
-import org.sonar.api.database.model.MeasureModel;
-import org.sonar.api.database.model.ResourceModel;
-import org.sonar.api.database.model.Snapshot;
-import org.sonar.jpa.test.AbstractDbUnitTestCase;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class AsyncMeasuresDaoTest extends AbstractDbUnitTestCase {
-
- private static final int PROJECT_ID = 1;
- private static final int METRIC_ID = 1;
-
- @Test
- public void testGetNextAsyncMeasureSnapshot() {
- setupData("sharedFixture", "testGetNextAsyncMeasureSnapshot");
-
- AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
- AsyncMeasureSnapshot asyncMeasure = asyncMeasuresDao.getNextAsyncMeasureSnapshot(
- PROJECT_ID, METRIC_ID, stringToDate("2008-12-04 08:00:00.00"));
-
- assertThat(asyncMeasure.getId(), is(3));
- }
-
- @Test
- public void testGetNextSnapshotsUntilDate() {
- setupData("sharedFixture", "testGetNextSnapshotsUntilDate");
-
- AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
- MeasureModel asyncMeasure = getSession().getEntityManager().find(MeasureModel.class, 1l);
- List<Snapshot> snapshotIds = asyncMeasuresDao.getNextSnapshotsUntilDate(
- asyncMeasure, stringToDate("2008-12-06 12:00:00.00"));
-
- assertThat(snapshotIds.size(), is(2));
- assertThat(snapshotIds.get(0).getId(), is(2));
- assertThat(snapshotIds.get(1).getId(), is(4));
- }
-
- @Test
- public void testGetPreviousSnapshot() {
- setupData("sharedFixture", "testGetPreviousSnapshot");
- AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
- Snapshot s = new Snapshot();
- s.setCreatedAt(stringToDate("2008-12-04 08:00:00.00"));
- s.setScope(ResourceModel.SCOPE_PROJECT);
- ResourceModel resource1 = getSession().getEntity(ResourceModel.class, 1);
- ResourceModel resource2 = getSession().getEntity(ResourceModel.class, 2);
-
- s.setResource(resource1);
- assertThat(asyncMeasuresDao.getPreviousSnapshot(s).getId(), is(1));
-
- s.setResource(resource2);
- assertThat(asyncMeasuresDao.getPreviousSnapshot(s).getId(), is(5));
- }
-
- @Test
- public void testGetNextAsyncMeasureSnapshotsUntilDate() {
- setupData("sharedFixture", "testGetNextAsyncMeasureSnapshotsUntilDate");
-
- AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
- MeasureModel asyncMeasure = getSession().getEntityManager().find(MeasureModel.class, 3l);
- List<AsyncMeasureSnapshot> asyncMeasureSnapshots = asyncMeasuresDao.getNextAsyncMeasureSnapshotsUntilDate(
- asyncMeasure, stringToDate("2008-12-06 08:00:00.00"));
-
- assertThat(asyncMeasureSnapshots.size(), is(2));
- assertThat(asyncMeasureSnapshots.get(0).getId(), is(2));
- assertThat(asyncMeasureSnapshots.get(1).getId(), is(3));
- }
-
- @Test
- public void testDeleteAsyncMeasure() {
- setupData("sharedFixture", "testDeleteAsyncMeasure");
-
- AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
- MeasureModel asyncMeasure = getSession().getEntityManager().find(MeasureModel.class, 1l);
- asyncMeasuresDao.deleteAsyncMeasure(asyncMeasure);
-
- getSession().commit();
- checkTables("testDeleteAsyncMeasure", "project_measures", "async_measure_snapshots");
- }
-
- @Test
- public void testGetAsyncMeasureSnapshotsFromSnapshotId() {
- setupData("sharedFixture", "testGetAsyncMeasureSnapshotsFromSnapshotId");
-
- AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
- Integer snapshotId = 1;
- List<AsyncMeasureSnapshot> asyncMeasureSnapshots = asyncMeasuresDao.getAsyncMeasureSnapshotsFromSnapshotId(
- snapshotId, Arrays.asList(1));
- assertThat(asyncMeasureSnapshots.size(), is(1));
- assertThat(asyncMeasureSnapshots.get(0).getId(), is(2));
- }
-
- @Test
- public void testGetLastAsyncMeasureSnapshot() {
- setupData("sharedFixture", "testGetLastAsyncMeasureSnapshot");
-
- AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
- AsyncMeasureSnapshot asyncMeasureSnapshot = asyncMeasuresDao.getLastAsyncMeasureSnapshot(
- PROJECT_ID, METRIC_ID, stringToDate("2008-12-04 12:00:00.00"));
- assertThat(asyncMeasureSnapshot.getId(), is(2));
- }
-
- @Test
- public void testDeleteAsyncMeasureSnapshots() {
- setupData("sharedFixture", "testDeleteAsyncMeasureSnapshots");
-
- AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
- asyncMeasuresDao.deleteAsyncMeasureSnapshots(1l);
-
- checkTables("testDeleteAsyncMeasureSnapshots", "async_measure_snapshots");
- }
-
- @Test
- public void testGetPreviousAsyncMeasureSnapshots() {
- setupData("sharedFixture", "testGetPreviousAsyncMeasureSnapshots");
-
- AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
- List<AsyncMeasureSnapshot> asyncMeasureSnapshots = asyncMeasuresDao.getPreviousAsyncMeasureSnapshots(
- PROJECT_ID, stringToDate("2008-12-04 08:00:00.00"), stringToDate("2008-12-08 08:00:00.00"));
- assertThat(asyncMeasureSnapshots.size(), is(2));
- assertThat(asyncMeasureSnapshots.get(0).getId(), is(5));
- assertThat(asyncMeasureSnapshots.get(1).getId(), is(6));
- }
-
-
- private static Date stringToDate(String sDate) {
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SS");
- try {
- return sdf.parse(sDate);
- } catch (ParseException e) {
- throw new RuntimeException("Bad date format.");
- }
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.jpa.dao; + +import org.junit.Test; +import org.sonar.api.database.model.AsyncMeasureSnapshot; +import org.sonar.api.database.model.MeasureModel; +import org.sonar.api.database.model.ResourceModel; +import org.sonar.api.database.model.Snapshot; +import org.sonar.jpa.test.AbstractDbUnitTestCase; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Date; +import java.util.List; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +public class AsyncMeasuresDaoTest extends AbstractDbUnitTestCase { + + private static final int PROJECT_ID = 1; + private static final int METRIC_ID = 1; + + @Test + public void testGetNextAsyncMeasureSnapshot() { + setupData("sharedFixture", "testGetNextAsyncMeasureSnapshot"); + + AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession()); + AsyncMeasureSnapshot asyncMeasure = asyncMeasuresDao.getNextAsyncMeasureSnapshot( + PROJECT_ID, METRIC_ID, stringToDate("2008-12-04 08:00:00.00")); + + assertThat(asyncMeasure.getId(), is(3)); + } + + @Test + public void testGetNextSnapshotsUntilDate() { + setupData("sharedFixture", "testGetNextSnapshotsUntilDate"); + + AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession()); + MeasureModel asyncMeasure = getSession().getEntityManager().find(MeasureModel.class, 1l); + List<Snapshot> snapshotIds = asyncMeasuresDao.getNextSnapshotsUntilDate( + asyncMeasure, stringToDate("2008-12-06 12:00:00.00")); + + assertThat(snapshotIds.size(), is(2)); + assertThat(snapshotIds.get(0).getId(), is(2)); + assertThat(snapshotIds.get(1).getId(), is(4)); + } + + @Test + public void testGetPreviousSnapshot() { + setupData("sharedFixture", "testGetPreviousSnapshot"); + AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession()); + Snapshot s = new Snapshot(); + s.setCreatedAt(stringToDate("2008-12-04 08:00:00.00")); + s.setScope(ResourceModel.SCOPE_PROJECT); + ResourceModel resource1 = getSession().getEntity(ResourceModel.class, 1); + ResourceModel resource2 = getSession().getEntity(ResourceModel.class, 2); + + s.setResource(resource1); + assertThat(asyncMeasuresDao.getPreviousSnapshot(s).getId(), is(1)); + + s.setResource(resource2); + assertThat(asyncMeasuresDao.getPreviousSnapshot(s).getId(), is(5)); + } + + @Test + public void testGetNextAsyncMeasureSnapshotsUntilDate() { + setupData("sharedFixture", "testGetNextAsyncMeasureSnapshotsUntilDate"); + + AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession()); + MeasureModel asyncMeasure = getSession().getEntityManager().find(MeasureModel.class, 3l); + List<AsyncMeasureSnapshot> asyncMeasureSnapshots = asyncMeasuresDao.getNextAsyncMeasureSnapshotsUntilDate( + asyncMeasure, stringToDate("2008-12-06 08:00:00.00")); + + assertThat(asyncMeasureSnapshots.size(), is(2)); + assertThat(asyncMeasureSnapshots.get(0).getId(), is(2)); + assertThat(asyncMeasureSnapshots.get(1).getId(), is(3)); + } + + @Test + public void testDeleteAsyncMeasure() { + setupData("sharedFixture", "testDeleteAsyncMeasure"); + + AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession()); + MeasureModel asyncMeasure = getSession().getEntityManager().find(MeasureModel.class, 1l); + asyncMeasuresDao.deleteAsyncMeasure(asyncMeasure); + + getSession().commit(); + checkTables("testDeleteAsyncMeasure", "project_measures", "async_measure_snapshots"); + } + + @Test + public void testGetAsyncMeasureSnapshotsFromSnapshotId() { + setupData("sharedFixture", "testGetAsyncMeasureSnapshotsFromSnapshotId"); + + AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession()); + Integer snapshotId = 1; + List<AsyncMeasureSnapshot> asyncMeasureSnapshots = asyncMeasuresDao.getAsyncMeasureSnapshotsFromSnapshotId( + snapshotId, Arrays.asList(1)); + assertThat(asyncMeasureSnapshots.size(), is(1)); + assertThat(asyncMeasureSnapshots.get(0).getId(), is(2)); + } + + @Test + public void testGetLastAsyncMeasureSnapshot() { + setupData("sharedFixture", "testGetLastAsyncMeasureSnapshot"); + + AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession()); + AsyncMeasureSnapshot asyncMeasureSnapshot = asyncMeasuresDao.getLastAsyncMeasureSnapshot( + PROJECT_ID, METRIC_ID, stringToDate("2008-12-04 12:00:00.00")); + assertThat(asyncMeasureSnapshot.getId(), is(2)); + } + + @Test + public void testDeleteAsyncMeasureSnapshots() { + setupData("sharedFixture", "testDeleteAsyncMeasureSnapshots"); + + AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession()); + asyncMeasuresDao.deleteAsyncMeasureSnapshots(1l); + + checkTables("testDeleteAsyncMeasureSnapshots", "async_measure_snapshots"); + } + + @Test + public void testGetPreviousAsyncMeasureSnapshots() { + setupData("sharedFixture", "testGetPreviousAsyncMeasureSnapshots"); + + AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession()); + List<AsyncMeasureSnapshot> asyncMeasureSnapshots = asyncMeasuresDao.getPreviousAsyncMeasureSnapshots( + PROJECT_ID, stringToDate("2008-12-04 08:00:00.00"), stringToDate("2008-12-08 08:00:00.00")); + assertThat(asyncMeasureSnapshots.size(), is(2)); + assertThat(asyncMeasureSnapshots.get(0).getId(), is(5)); + assertThat(asyncMeasureSnapshots.get(1).getId(), is(6)); + } + + + private static Date stringToDate(String sDate) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SS"); + try { + return sdf.parse(sDate); + } catch (ParseException e) { + throw new RuntimeException("Bad date format."); + } + } + +} diff --git a/sonar-core/src/test/java/org/sonar/jpa/dao/AsyncMeasuresServiceTest.java b/sonar-core/src/test/java/org/sonar/jpa/dao/AsyncMeasuresServiceTest.java index 9ef3ad41034..7b936b5ee9f 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/dao/AsyncMeasuresServiceTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/dao/AsyncMeasuresServiceTest.java @@ -1,153 +1,153 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.jpa.dao;
-
-import org.junit.Test;
-import org.sonar.api.database.model.Snapshot;
-import org.sonar.jpa.test.AbstractDbUnitTestCase;
-
-public class AsyncMeasuresServiceTest extends AbstractDbUnitTestCase {
-
- @Test
- public void assignLatestMeasuresToLastSnapshot() {
- setupData("sharedFixture", "assignLatestMeasuresToLastSnapshot");
-
- AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());
- Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 2);
- asyncMeasuresService.refresh(snapshot);
-
- checkTables("assignLatestMeasuresToLastSnapshot", "async_measure_snapshots");
- }
-
- @Test
- public void assignNewMeasuresToLastSnapshot() {
- setupData("sharedFixture", "assignNewMeasuresToLastSnapshot");
-
- AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());
- Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 2);
- asyncMeasuresService.refresh(snapshot);
-
- checkTables("assignNewMeasuresToLastSnapshot", "async_measure_snapshots");
- }
-
- @Test
- public void assignMeasuresWhenNoPreviousSnapshot() {
- setupData("sharedFixture", "assignMeasuresWhenNoPreviousSnapshot");
-
- AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());
- Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 1);
- asyncMeasuresService.refresh(snapshot);
-
- checkTables("assignMeasuresWhenNoPreviousSnapshot", "async_measure_snapshots");
- }
-
- @Test
- public void assignLatestMeasuresWhenNoPreviousSnapshot() {
- setupData("sharedFixture", "assignLatestMeasuresWhenNoPreviousSnapshot");
-
- AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());
- Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 1);
- asyncMeasuresService.refresh(snapshot);
-
- checkTables("assignLatestMeasuresWhenNoPreviousSnapshot", "async_measure_snapshots");
- }
-
- @Test
- public void assignPastMeasuresToPastSnapshot() {
- setupData("sharedFixture", "assignPastMeasuresToPastSnapshot");
-
- AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());
- Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 3);
- asyncMeasuresService.refresh(snapshot);
-
- checkTables("assignPastMeasuresToPastSnapshot", "async_measure_snapshots");
- }
-
- @Test
- public void assignNewMeasureToFutureSnapshots() {
- setupData("sharedFixture", "assignNewMeasureToFutureSnapshots");
-
- AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());
- asyncMeasuresService.registerMeasure(2l);
-
- checkTables("assignNewMeasureToFutureSnapshots", "async_measure_snapshots");
- }
-
- @Test
- public void assignMeasureToFutureSnapshotsWithDifferentMetric() {
- setupData("sharedFixture", "assignMeasureToFutureSnapshotsWithDifferentMetric");
-
- AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());
- asyncMeasureService.registerMeasure(3l);
-
- checkTables("assignMeasureToFutureSnapshotsWithDifferentMetric", "async_measure_snapshots");
- }
-
- @Test
- public void assignAPastMeasureToNextSnapshotsWithDifferentMetric() {
- setupData("sharedFixture", "assignAPastMeasureToNextSnapshotsWithDifferentMetric");
-
- AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());
- asyncMeasureService.registerMeasure(2l);
-
- checkTables("assignAPastMeasureToNextSnapshotsWithDifferentMetric", "async_measure_snapshots");
- }
-
- @Test
- public void addFutureSnapshot() {
- setupData("sharedFixture", "addFutureSnapshot");
-
- AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());
- asyncMeasureService.registerMeasure(2l);
-
- checkTables("addFutureSnapshot", "async_measure_snapshots");
- }
-
- @Test
- public void addInvisibleMeasure() {
- setupData("sharedFixture", "addInvisibleMeasure");
-
- AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());
- asyncMeasureService.registerMeasure(2l);
-
- checkTables("addInvisibleMeasure", "async_measure_snapshots");
- }
-
- @Test
- public void deleteMeasure() {
- setupData("sharedFixture", "deleteMeasure");
-
- AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());
- asyncMeasureService.deleteMeasure(2l);
-
- checkTables("deleteMeasure", "async_measure_snapshots");
- }
-
- @Test
- public void deleteLastMeasure() {
- setupData("sharedFixture", "deleteLastMeasure");
-
- AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());
- asyncMeasureService.deleteMeasure(1l);
-
- checkTables("deleteLastMeasure", "async_measure_snapshots");
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.jpa.dao; + +import org.junit.Test; +import org.sonar.api.database.model.Snapshot; +import org.sonar.jpa.test.AbstractDbUnitTestCase; + +public class AsyncMeasuresServiceTest extends AbstractDbUnitTestCase { + + @Test + public void assignLatestMeasuresToLastSnapshot() { + setupData("sharedFixture", "assignLatestMeasuresToLastSnapshot"); + + AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession()); + Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 2); + asyncMeasuresService.refresh(snapshot); + + checkTables("assignLatestMeasuresToLastSnapshot", "async_measure_snapshots"); + } + + @Test + public void assignNewMeasuresToLastSnapshot() { + setupData("sharedFixture", "assignNewMeasuresToLastSnapshot"); + + AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession()); + Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 2); + asyncMeasuresService.refresh(snapshot); + + checkTables("assignNewMeasuresToLastSnapshot", "async_measure_snapshots"); + } + + @Test + public void assignMeasuresWhenNoPreviousSnapshot() { + setupData("sharedFixture", "assignMeasuresWhenNoPreviousSnapshot"); + + AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession()); + Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 1); + asyncMeasuresService.refresh(snapshot); + + checkTables("assignMeasuresWhenNoPreviousSnapshot", "async_measure_snapshots"); + } + + @Test + public void assignLatestMeasuresWhenNoPreviousSnapshot() { + setupData("sharedFixture", "assignLatestMeasuresWhenNoPreviousSnapshot"); + + AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession()); + Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 1); + asyncMeasuresService.refresh(snapshot); + + checkTables("assignLatestMeasuresWhenNoPreviousSnapshot", "async_measure_snapshots"); + } + + @Test + public void assignPastMeasuresToPastSnapshot() { + setupData("sharedFixture", "assignPastMeasuresToPastSnapshot"); + + AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession()); + Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 3); + asyncMeasuresService.refresh(snapshot); + + checkTables("assignPastMeasuresToPastSnapshot", "async_measure_snapshots"); + } + + @Test + public void assignNewMeasureToFutureSnapshots() { + setupData("sharedFixture", "assignNewMeasureToFutureSnapshots"); + + AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession()); + asyncMeasuresService.registerMeasure(2l); + + checkTables("assignNewMeasureToFutureSnapshots", "async_measure_snapshots"); + } + + @Test + public void assignMeasureToFutureSnapshotsWithDifferentMetric() { + setupData("sharedFixture", "assignMeasureToFutureSnapshotsWithDifferentMetric"); + + AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession()); + asyncMeasureService.registerMeasure(3l); + + checkTables("assignMeasureToFutureSnapshotsWithDifferentMetric", "async_measure_snapshots"); + } + + @Test + public void assignAPastMeasureToNextSnapshotsWithDifferentMetric() { + setupData("sharedFixture", "assignAPastMeasureToNextSnapshotsWithDifferentMetric"); + + AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession()); + asyncMeasureService.registerMeasure(2l); + + checkTables("assignAPastMeasureToNextSnapshotsWithDifferentMetric", "async_measure_snapshots"); + } + + @Test + public void addFutureSnapshot() { + setupData("sharedFixture", "addFutureSnapshot"); + + AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession()); + asyncMeasureService.registerMeasure(2l); + + checkTables("addFutureSnapshot", "async_measure_snapshots"); + } + + @Test + public void addInvisibleMeasure() { + setupData("sharedFixture", "addInvisibleMeasure"); + + AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession()); + asyncMeasureService.registerMeasure(2l); + + checkTables("addInvisibleMeasure", "async_measure_snapshots"); + } + + @Test + public void deleteMeasure() { + setupData("sharedFixture", "deleteMeasure"); + + AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession()); + asyncMeasureService.deleteMeasure(2l); + + checkTables("deleteMeasure", "async_measure_snapshots"); + } + + @Test + public void deleteLastMeasure() { + setupData("sharedFixture", "deleteLastMeasure"); + + AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession()); + asyncMeasureService.deleteMeasure(1l); + + checkTables("deleteLastMeasure", "async_measure_snapshots"); + } + +} diff --git a/sonar-core/src/test/java/org/sonar/jpa/dao/MeasuresDaoTest.java b/sonar-core/src/test/java/org/sonar/jpa/dao/MeasuresDaoTest.java index 5502905e5e6..e0a98be7b7c 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/dao/MeasuresDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/dao/MeasuresDaoTest.java @@ -1,107 +1,107 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.jpa.dao;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.sonar.api.database.model.ResourceModel;
-import org.sonar.api.measures.Metric;
-import org.sonar.jpa.test.AbstractDbUnitTestCase;
-
-import java.util.Arrays;
-import java.util.Collection;
-
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.not;
-import static org.junit.Assert.assertThat;
-
-public class MeasuresDaoTest extends AbstractDbUnitTestCase {
-
- private MeasuresDao service;
- private ResourceModel project;
-
- @Before
- public void before() throws Exception {
- service = new MeasuresDao(getSession());
- project = new ResourceModel(ResourceModel.SCOPE_PROJECT, "foo:bar", ResourceModel.QUALIFIER_PROJECT_TRUNK, null, "Foo");
- project.setName("project name");
- getSession().save(project);
- }
-
- @Test
- public void shouldReturnUserDefinedMetrics() {
- for (Metric metric : createMetrics()) {
- getSession().save(metric);
- }
-
- Collection<Metric> metrics = service.getUserDefinedMetrics();
- assertThat(metrics.size(), is(2));
- for (Metric metric : metrics) {
- assertThat(metric.getOrigin(), not(Metric.Origin.JAV));
- }
- }
-
- @Test
- public void shouldRegisterMetrics() {
- Collection<Metric> newMetrics = createMetrics();
- service.registerMetrics(newMetrics);
-
- Collection<Metric> metrics = service.getEnabledMetrics();
- assertThat(metrics.size(), is(newMetrics.size()));
- }
-
- @Test
- public void shouldDisabledMetrics() {
- Collection<Metric> newMetrics = createMetrics();
-
- service.disabledMetrics(newMetrics);
-
- Collection<Metric> allMetrics = service.getMetrics();
- assertThat(allMetrics.size(), is(newMetrics.size()));
-
- Collection<Metric> disabledMetrics = service.getEnabledMetrics();
- assertThat(disabledMetrics.size(), is(0));
- }
-
-
- private Collection<Metric> createMetrics() {
- Metric m1 = new Metric("metric1");
- m1.setEnabled(false);
- m1.setOrigin(Metric.Origin.JAV);
-
- Metric m2 = new Metric("metric2");
- m2.setEnabled(true);
- m2.setOrigin(Metric.Origin.JAV);
-
- Metric m3 = new Metric("metric3");
- m3.setEnabled(false);
- m3.setOrigin(Metric.Origin.GUI);
-
- Metric m4 = new Metric("metric4");
- m4.setEnabled(true);
- m4.setOrigin(Metric.Origin.GUI);
-
- Metric m5 = new Metric("metric5");
- m5.setEnabled(true);
- m5.setOrigin(Metric.Origin.WS);
-
- return Arrays.asList(m1, m2, m3, m4, m5);
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.jpa.dao; + +import org.junit.Before; +import org.junit.Test; +import org.sonar.api.database.model.ResourceModel; +import org.sonar.api.measures.Metric; +import org.sonar.jpa.test.AbstractDbUnitTestCase; + +import java.util.Arrays; +import java.util.Collection; + +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.not; +import static org.junit.Assert.assertThat; + +public class MeasuresDaoTest extends AbstractDbUnitTestCase { + + private MeasuresDao service; + private ResourceModel project; + + @Before + public void before() throws Exception { + service = new MeasuresDao(getSession()); + project = new ResourceModel(ResourceModel.SCOPE_PROJECT, "foo:bar", ResourceModel.QUALIFIER_PROJECT_TRUNK, null, "Foo"); + project.setName("project name"); + getSession().save(project); + } + + @Test + public void shouldReturnUserDefinedMetrics() { + for (Metric metric : createMetrics()) { + getSession().save(metric); + } + + Collection<Metric> metrics = service.getUserDefinedMetrics(); + assertThat(metrics.size(), is(2)); + for (Metric metric : metrics) { + assertThat(metric.getOrigin(), not(Metric.Origin.JAV)); + } + } + + @Test + public void shouldRegisterMetrics() { + Collection<Metric> newMetrics = createMetrics(); + service.registerMetrics(newMetrics); + + Collection<Metric> metrics = service.getEnabledMetrics(); + assertThat(metrics.size(), is(newMetrics.size())); + } + + @Test + public void shouldDisabledMetrics() { + Collection<Metric> newMetrics = createMetrics(); + + service.disabledMetrics(newMetrics); + + Collection<Metric> allMetrics = service.getMetrics(); + assertThat(allMetrics.size(), is(newMetrics.size())); + + Collection<Metric> disabledMetrics = service.getEnabledMetrics(); + assertThat(disabledMetrics.size(), is(0)); + } + + + private Collection<Metric> createMetrics() { + Metric m1 = new Metric("metric1"); + m1.setEnabled(false); + m1.setOrigin(Metric.Origin.JAV); + + Metric m2 = new Metric("metric2"); + m2.setEnabled(true); + m2.setOrigin(Metric.Origin.JAV); + + Metric m3 = new Metric("metric3"); + m3.setEnabled(false); + m3.setOrigin(Metric.Origin.GUI); + + Metric m4 = new Metric("metric4"); + m4.setEnabled(true); + m4.setOrigin(Metric.Origin.GUI); + + Metric m5 = new Metric("metric5"); + m5.setEnabled(true); + m5.setOrigin(Metric.Origin.WS); + + return Arrays.asList(m1, m2, m3, m4, m5); + } +} diff --git a/sonar-core/src/test/java/org/sonar/jpa/dao/ProfilesDaoTest.java b/sonar-core/src/test/java/org/sonar/jpa/dao/ProfilesDaoTest.java index 0b821d51dc2..38049f3416c 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/dao/ProfilesDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/dao/ProfilesDaoTest.java @@ -1,58 +1,58 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.jpa.dao;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.sonar.api.database.model.ResourceModel;
-import org.sonar.api.profiles.RulesProfile;
-import org.sonar.jpa.test.AbstractDbUnitTestCase;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
-public class ProfilesDaoTest extends AbstractDbUnitTestCase {
-
- private ProfilesDao profilesDao;
-
- @Before
- public void setup() {
- profilesDao = new ProfilesDao(getSession());
- }
-
-
- @Test
- public void testGetActiveProfile() {
- RulesProfile testDefaultProfile = new RulesProfile("default", "java", true, true);
- RulesProfile testProfile = new RulesProfile("not default", "java", false, false);
- getSession().save(testDefaultProfile, testProfile);
-
- ResourceModel testResourceWithProfile = new ResourceModel(ResourceModel.SCOPE_PROJECT, "withProfile", "qual", null, "test");
- testResourceWithProfile.setRulesProfile(testProfile);
- ResourceModel testResourceWithNoProfile = new ResourceModel(ResourceModel.SCOPE_PROJECT, "withoutProfile", "qual", null, "test");
- getSession().save(testResourceWithProfile, testResourceWithNoProfile);
-
- assertNull(profilesDao.getActiveProfile("wrongLanguage", "withoutProfile"));
- assertEquals(testDefaultProfile.getId(), profilesDao.getActiveProfile("java", "wrongKey").getId());
- assertEquals(testDefaultProfile.getId(), profilesDao.getActiveProfile("java", "withoutProfile").getId());
- assertEquals(testProfile.getId(), profilesDao.getActiveProfile("java", "withProfile").getId());
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.jpa.dao; + +import org.junit.Before; +import org.junit.Test; +import org.sonar.api.database.model.ResourceModel; +import org.sonar.api.profiles.RulesProfile; +import org.sonar.jpa.test.AbstractDbUnitTestCase; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; + +public class ProfilesDaoTest extends AbstractDbUnitTestCase { + + private ProfilesDao profilesDao; + + @Before + public void setup() { + profilesDao = new ProfilesDao(getSession()); + } + + + @Test + public void testGetActiveProfile() { + RulesProfile testDefaultProfile = new RulesProfile("default", "java", true, true); + RulesProfile testProfile = new RulesProfile("not default", "java", false, false); + getSession().save(testDefaultProfile, testProfile); + + ResourceModel testResourceWithProfile = new ResourceModel(ResourceModel.SCOPE_PROJECT, "withProfile", "qual", null, "test"); + testResourceWithProfile.setRulesProfile(testProfile); + ResourceModel testResourceWithNoProfile = new ResourceModel(ResourceModel.SCOPE_PROJECT, "withoutProfile", "qual", null, "test"); + getSession().save(testResourceWithProfile, testResourceWithNoProfile); + + assertNull(profilesDao.getActiveProfile("wrongLanguage", "withoutProfile")); + assertEquals(testDefaultProfile.getId(), profilesDao.getActiveProfile("java", "wrongKey").getId()); + assertEquals(testDefaultProfile.getId(), profilesDao.getActiveProfile("java", "withoutProfile").getId()); + assertEquals(testProfile.getId(), profilesDao.getActiveProfile("java", "withProfile").getId()); + } + +} diff --git a/sonar-core/src/test/java/org/sonar/jpa/dao/RulesDaoTest.java b/sonar-core/src/test/java/org/sonar/jpa/dao/RulesDaoTest.java index 7d1b0e97a64..f17496a6d55 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/dao/RulesDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/dao/RulesDaoTest.java @@ -1,68 +1,68 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.jpa.dao;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.sonar.api.profiles.RulesProfile;
-import org.sonar.api.rules.*;
-import org.sonar.jpa.test.AbstractDbUnitTestCase;
-
-import java.util.Arrays;
-import java.util.List;
-
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
-
-public class RulesDaoTest extends AbstractDbUnitTestCase {
-
- private RulesDao rulesDao;
-
- @Before
- public void setup() {
- rulesDao = new RulesDao(getSession());
- }
-
- @Test
- public void shouldGetRules() {
- setupData("shouldGetRules");
-
- List<Rule> rules = rulesDao.getRules();
- assertThat(rules, notNullValue());
- assertThat(rules.size(), is(2));
-
- assertEquals("rule_one", rules.get(0).getKey());
- assertEquals(1, rules.get(0).getParams().size());
- }
-
- @Test
- public void shouldGetRuleWithRuleKeyAndPluginKey() {
- setupData("shouldGetRuleWithRuleKeyAndPluginKey");
-
- Rule rule = rulesDao.getRuleByKey("plugin", "checkstyle.rule1");
- assertThat(rule, notNullValue());
- assertThat(rule.getId(), notNullValue());
-
- Rule rule2 = rulesDao.getRuleByKey("plugin", "key not found");
- assertThat(rule2, nullValue());
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.jpa.dao; + +import org.junit.Before; +import org.junit.Test; +import org.sonar.api.profiles.RulesProfile; +import org.sonar.api.rules.*; +import org.sonar.jpa.test.AbstractDbUnitTestCase; + +import java.util.Arrays; +import java.util.List; + +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; + +public class RulesDaoTest extends AbstractDbUnitTestCase { + + private RulesDao rulesDao; + + @Before + public void setup() { + rulesDao = new RulesDao(getSession()); + } + + @Test + public void shouldGetRules() { + setupData("shouldGetRules"); + + List<Rule> rules = rulesDao.getRules(); + assertThat(rules, notNullValue()); + assertThat(rules.size(), is(2)); + + assertEquals("rule_one", rules.get(0).getKey()); + assertEquals(1, rules.get(0).getParams().size()); + } + + @Test + public void shouldGetRuleWithRuleKeyAndPluginKey() { + setupData("shouldGetRuleWithRuleKeyAndPluginKey"); + + Rule rule = rulesDao.getRuleByKey("plugin", "checkstyle.rule1"); + assertThat(rule, notNullValue()); + assertThat(rule.getId(), notNullValue()); + + Rule rule2 = rulesDao.getRuleByKey("plugin", "key not found"); + assertThat(rule2, nullValue()); + } + +} diff --git a/sonar-core/src/test/java/org/sonar/jpa/dialect/DerbyTest.java b/sonar-core/src/test/java/org/sonar/jpa/dialect/DerbyTest.java index 298f4775765..7da394f4fce 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/dialect/DerbyTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/dialect/DerbyTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/jpa/dialect/DialectRepositoryTest.java b/sonar-core/src/test/java/org/sonar/jpa/dialect/DialectRepositoryTest.java index 0f7db36bd7a..4a67f441d2f 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/dialect/DialectRepositoryTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/dialect/DialectRepositoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/jpa/dialect/HsqlDbTest.java b/sonar-core/src/test/java/org/sonar/jpa/dialect/HsqlDbTest.java index 20cebfd9eb7..440500dae08 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/dialect/HsqlDbTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/dialect/HsqlDbTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/jpa/dialect/MsSqlTest.java b/sonar-core/src/test/java/org/sonar/jpa/dialect/MsSqlTest.java index 5d2a9a53043..5554eba67da 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/dialect/MsSqlTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/dialect/MsSqlTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/jpa/dialect/MySqlTest.java b/sonar-core/src/test/java/org/sonar/jpa/dialect/MySqlTest.java index ad60fa7e0a1..a0717686535 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/dialect/MySqlTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/dialect/MySqlTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/jpa/dialect/OracleSequenceGeneratorTest.java b/sonar-core/src/test/java/org/sonar/jpa/dialect/OracleSequenceGeneratorTest.java index ba15aa47854..05d963f9323 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/dialect/OracleSequenceGeneratorTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/dialect/OracleSequenceGeneratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/jpa/dialect/OracleTest.java b/sonar-core/src/test/java/org/sonar/jpa/dialect/OracleTest.java index 89145bf7305..23e3116e518 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/dialect/OracleTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/dialect/OracleTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/jpa/dialect/PostgreSQLSequenceGeneratorTest.java b/sonar-core/src/test/java/org/sonar/jpa/dialect/PostgreSQLSequenceGeneratorTest.java index 3738d30f56c..b7ed6cee924 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/dialect/PostgreSQLSequenceGeneratorTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/dialect/PostgreSQLSequenceGeneratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/jpa/dialect/PostgreSqlTest.java b/sonar-core/src/test/java/org/sonar/jpa/dialect/PostgreSqlTest.java index b16d92c5e4d..6af5a72b609 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/dialect/PostgreSqlTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/dialect/PostgreSqlTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/jpa/entity/PropertyTest.java b/sonar-core/src/test/java/org/sonar/jpa/entity/PropertyTest.java index c948023d82a..f57f58f3d86 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/entity/PropertyTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/entity/PropertyTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/jpa/entity/SchemaMigrationTest.java b/sonar-core/src/test/java/org/sonar/jpa/entity/SchemaMigrationTest.java index 8be589fb5b2..21a2268f48b 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/entity/SchemaMigrationTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/entity/SchemaMigrationTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/jpa/session/AbstractDatabaseConnectorTest.java b/sonar-core/src/test/java/org/sonar/jpa/session/AbstractDatabaseConnectorTest.java index 5d5cc9cfc83..f584eb4b72b 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/session/AbstractDatabaseConnectorTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/session/AbstractDatabaseConnectorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/jpa/session/DatabaseSessionTest.java b/sonar-core/src/test/java/org/sonar/jpa/session/DatabaseSessionTest.java index 4094cca55c2..014a7054f6b 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/session/DatabaseSessionTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/session/DatabaseSessionTest.java @@ -1,122 +1,122 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.jpa.session;
-
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.internal.matchers.IsCollectionContaining;
-import org.sonar.api.database.model.MeasureModel;
-import org.sonar.api.database.model.ResourceModel;
-import org.sonar.api.database.model.Snapshot;
-import org.sonar.api.measures.CoreMetrics;
-import org.sonar.api.measures.Metric;
-import org.sonar.jpa.dao.MeasuresDao;
-import org.sonar.jpa.test.AbstractDbUnitTestCase;
-
-import javax.persistence.NonUniqueResultException;
-import java.sql.Date;
-import java.util.List;
-
-import static org.junit.Assert.*;
-
-public class DatabaseSessionTest extends AbstractDbUnitTestCase {
- private static final Long NB_INSERTS = 20000l;
-
- private ResourceModel project1;
- private ResourceModel project2;
-
- @Before
- public void setup() {
- project1 = new ResourceModel(ResourceModel.SCOPE_PROJECT, "mygroup:myartifact", "JAV", null, "my name");
- project2 = new ResourceModel(ResourceModel.SCOPE_PROJECT, "mygroup:myartifact1", "JAV", null, "my name 2");
- }
-
- @Test
- public void performaceTestOnBatchInserts() throws Exception {
-
- Snapshot snapshot = new Snapshot(project1, true, "", new Date(1));
- getSession().save(project1, snapshot);
- getSession().save(CoreMetrics.CLASSES);
- getSession().commit();
-
- Metric metric = new MeasuresDao(getSession()).getMetric(CoreMetrics.CLASSES_KEY);
- for (int i = 0; i < NB_INSERTS; i++) {
- MeasureModel pm = new MeasureModel(metric.getId(), 1.0).setSnapshotId(snapshot.getId());
- getSession().save(pm);
- }
-
- getSession().commit();
- assertEquals(NB_INSERTS, getHQLCount(MeasureModel.class));
-
- }
-
- @Test
- public void testGetSingleResultWithNoResults() {
- assertNull(getSession().getSingleResult(ResourceModel.class, "name", "test"));
- }
-
- @Test
- public void testGetSingleResultWithNoCriterias() {
- try {
- assertNull(getSession().getSingleResult(ResourceModel.class, (Object[]) null));
- fail("No IllegalStateException raised");
- } catch (IllegalStateException ex) {
- // error raised correctly
- }
- }
-
- @Test
- public void testGetSingleResultWithOneResult() {
- getSession().save(project1);
- ResourceModel hit = getSession().getSingleResult(ResourceModel.class, "name", "my name");
- assertNotNull(hit);
- assertEquals(project1, hit);
- }
-
- @Test
- public void testGetSingleResultWithTwoResults() {
- getSession().save(project1, project2);
- try {
- getSession().getSingleResult(ResourceModel.class, "qualifier", "JAV");
- fail("No NonUniqueResultException raised");
- } catch (NonUniqueResultException ex) {
- // error raised correctly
- }
- }
-
- @Test
- public void testGetResultsWithNoResults() {
- List<ResourceModel> hits = getSession().getResults(ResourceModel.class, "name", "foo");
- assertTrue(hits.isEmpty());
- }
-
- @Test
- public void testGetResultsWithMultipleResults() {
- ResourceModel project3 = new ResourceModel(ResourceModel.SCOPE_PROJECT, "mygroup:myartifact3", "TEST", null, "my name 3");
- getSession().save(project1, project2, project3);
-
- List<ResourceModel> hits = getSession().getResults(ResourceModel.class, "qualifier", "JAV");
- assertFalse(hits.isEmpty());
- assertThat(hits, IsCollectionContaining.hasItems(project1, project2));
- assertThat(hits, Matchers.not(IsCollectionContaining.hasItem(project3)));
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.jpa.session; + +import org.hamcrest.Matchers; +import org.junit.Before; +import org.junit.Test; +import org.junit.internal.matchers.IsCollectionContaining; +import org.sonar.api.database.model.MeasureModel; +import org.sonar.api.database.model.ResourceModel; +import org.sonar.api.database.model.Snapshot; +import org.sonar.api.measures.CoreMetrics; +import org.sonar.api.measures.Metric; +import org.sonar.jpa.dao.MeasuresDao; +import org.sonar.jpa.test.AbstractDbUnitTestCase; + +import javax.persistence.NonUniqueResultException; +import java.sql.Date; +import java.util.List; + +import static org.junit.Assert.*; + +public class DatabaseSessionTest extends AbstractDbUnitTestCase { + private static final Long NB_INSERTS = 20000l; + + private ResourceModel project1; + private ResourceModel project2; + + @Before + public void setup() { + project1 = new ResourceModel(ResourceModel.SCOPE_PROJECT, "mygroup:myartifact", "JAV", null, "my name"); + project2 = new ResourceModel(ResourceModel.SCOPE_PROJECT, "mygroup:myartifact1", "JAV", null, "my name 2"); + } + + @Test + public void performaceTestOnBatchInserts() throws Exception { + + Snapshot snapshot = new Snapshot(project1, true, "", new Date(1)); + getSession().save(project1, snapshot); + getSession().save(CoreMetrics.CLASSES); + getSession().commit(); + + Metric metric = new MeasuresDao(getSession()).getMetric(CoreMetrics.CLASSES_KEY); + for (int i = 0; i < NB_INSERTS; i++) { + MeasureModel pm = new MeasureModel(metric.getId(), 1.0).setSnapshotId(snapshot.getId()); + getSession().save(pm); + } + + getSession().commit(); + assertEquals(NB_INSERTS, getHQLCount(MeasureModel.class)); + + } + + @Test + public void testGetSingleResultWithNoResults() { + assertNull(getSession().getSingleResult(ResourceModel.class, "name", "test")); + } + + @Test + public void testGetSingleResultWithNoCriterias() { + try { + assertNull(getSession().getSingleResult(ResourceModel.class, (Object[]) null)); + fail("No IllegalStateException raised"); + } catch (IllegalStateException ex) { + // error raised correctly + } + } + + @Test + public void testGetSingleResultWithOneResult() { + getSession().save(project1); + ResourceModel hit = getSession().getSingleResult(ResourceModel.class, "name", "my name"); + assertNotNull(hit); + assertEquals(project1, hit); + } + + @Test + public void testGetSingleResultWithTwoResults() { + getSession().save(project1, project2); + try { + getSession().getSingleResult(ResourceModel.class, "qualifier", "JAV"); + fail("No NonUniqueResultException raised"); + } catch (NonUniqueResultException ex) { + // error raised correctly + } + } + + @Test + public void testGetResultsWithNoResults() { + List<ResourceModel> hits = getSession().getResults(ResourceModel.class, "name", "foo"); + assertTrue(hits.isEmpty()); + } + + @Test + public void testGetResultsWithMultipleResults() { + ResourceModel project3 = new ResourceModel(ResourceModel.SCOPE_PROJECT, "mygroup:myartifact3", "TEST", null, "my name 3"); + getSession().save(project1, project2, project3); + + List<ResourceModel> hits = getSession().getResults(ResourceModel.class, "qualifier", "JAV"); + assertFalse(hits.isEmpty()); + assertThat(hits, IsCollectionContaining.hasItems(project1, project2)); + assertThat(hits, Matchers.not(IsCollectionContaining.hasItem(project3))); + } + +} diff --git a/sonar-core/src/test/java/org/sonar/jpa/session/DriverDatabaseConnectorTest.java b/sonar-core/src/test/java/org/sonar/jpa/session/DriverDatabaseConnectorTest.java index f133296d10f..dfc0716eb0d 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/session/DriverDatabaseConnectorTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/session/DriverDatabaseConnectorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/jpa/session/ThreadLocalDatabaseSessionFactoryTest.java b/sonar-core/src/test/java/org/sonar/jpa/session/ThreadLocalDatabaseSessionFactoryTest.java index 7f1c2eb5c3b..ee374066c75 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/session/ThreadLocalDatabaseSessionFactoryTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/session/ThreadLocalDatabaseSessionFactoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java b/sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java index 0f4eb82793d..6e9aa22013a 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java +++ b/sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/batch/AbstractPurge.java b/sonar-deprecated/src/main/java/org/sonar/api/batch/AbstractPurge.java index f4218432165..2be04e25f1f 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/batch/AbstractPurge.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/batch/AbstractPurge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/batch/AbstractViolationsStaxParser.java b/sonar-deprecated/src/main/java/org/sonar/api/batch/AbstractViolationsStaxParser.java index 0bd135f6225..2973ea05320 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/batch/AbstractViolationsStaxParser.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/batch/AbstractViolationsStaxParser.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/batch/GeneratesViolations.java b/sonar-deprecated/src/main/java/org/sonar/api/batch/GeneratesViolations.java index 9d6739b8aeb..cd20e179946 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/batch/GeneratesViolations.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/batch/GeneratesViolations.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/batch/Purge.java b/sonar-deprecated/src/main/java/org/sonar/api/batch/Purge.java index b3562281dff..803fbcdb98c 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/batch/Purge.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/batch/Purge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/batch/PurgeContext.java b/sonar-deprecated/src/main/java/org/sonar/api/batch/PurgeContext.java index 92a1f1f2e8e..2423f51b8e6 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/batch/PurgeContext.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/batch/PurgeContext.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/batch/SquidSearch.java b/sonar-deprecated/src/main/java/org/sonar/api/batch/SquidSearch.java index 12902792d60..71c871818f1 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/batch/SquidSearch.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/batch/SquidSearch.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/AnnotationCheckerFactory.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/AnnotationCheckerFactory.java index 9f8574d9e83..78b36dfa0a8 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/AnnotationCheckerFactory.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/AnnotationCheckerFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/CheckerFactory.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/CheckerFactory.java index de0a12a738c..1c28fca8493 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/CheckerFactory.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/CheckerFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/MessageDispatcher.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/MessageDispatcher.java index 5885b2f5035..242693eb485 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/MessageDispatcher.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/MessageDispatcher.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/UnvalidCheckerException.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/UnvalidCheckerException.java index 0c98a1fece3..b89ec23ebc6 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/UnvalidCheckerException.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/UnvalidCheckerException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactory.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactory.java index e5084965d42..ee849c50180 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactory.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/Check.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/Check.java index b33c3a11ddc..45e5b5e9f08 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/Check.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/Check.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfile.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfile.java index 2a47f800bdc..58268e5167b 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfile.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfile.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfileProvider.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfileProvider.java index 0482cf447fd..7f893ff5b7b 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfileProvider.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfileProvider.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshaller.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshaller.java index 4e7d359643a..3502c5ed307 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshaller.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshaller.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactory.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactory.java index 08d21bb6fe3..74de09d275b 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactory.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplate.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplate.java index e54554b84cc..55a5e11dd96 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplate.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplate.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplateProperty.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplateProperty.java index ac1ebf6795a..6c87a39200b 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplateProperty.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplateProperty.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplate.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplate.java index a6df4a7e73f..313e64a4c80 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplate.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplate.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateFactory.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateFactory.java index d72dc1db31c..7f1aa486db3 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateFactory.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateProperty.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateProperty.java index 34dce342635..b94082d9c7c 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateProperty.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateProperty.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepositories.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepositories.java index 6a159a9bd27..4cc5029413d 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepositories.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepositories.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepository.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepository.java index eade8969a01..3ce30317cb2 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepository.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepository.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplate.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplate.java index 76f6fb6ca4e..e1fa871fdd2 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplate.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplate.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplateProperty.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplateProperty.java index 142942b8ced..06f9e2eb648 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplateProperty.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplateProperty.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/XmlCheckTemplateFactory.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/XmlCheckTemplateFactory.java index b08b584c3c5..3ffaed0f003 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/XmlCheckTemplateFactory.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/XmlCheckTemplateFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/database/daos/MeasuresDao.java b/sonar-deprecated/src/main/java/org/sonar/api/database/daos/MeasuresDao.java index 6c8ab6284f9..73d34649a63 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/database/daos/MeasuresDao.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/database/daos/MeasuresDao.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/rules/AbstractImportableRulesRepository.java b/sonar-deprecated/src/main/java/org/sonar/api/rules/AbstractImportableRulesRepository.java index 9926a33081e..99264e2a141 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/rules/AbstractImportableRulesRepository.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/rules/AbstractImportableRulesRepository.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/rules/AbstractRulesRepository.java b/sonar-deprecated/src/main/java/org/sonar/api/rules/AbstractRulesRepository.java index ec69f047174..5f7e1c3c99b 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/rules/AbstractRulesRepository.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/rules/AbstractRulesRepository.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/rules/ConfigurationExportable.java b/sonar-deprecated/src/main/java/org/sonar/api/rules/ConfigurationExportable.java index 3a853a6ab3f..c87b0cb88d8 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/rules/ConfigurationExportable.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/rules/ConfigurationExportable.java @@ -1,29 +1,29 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.rules;
-
-import org.sonar.api.profiles.RulesProfile;
-
-@Deprecated
-public interface ConfigurationExportable {
-
- String exportConfiguration(RulesProfile profile);
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.rules; + +import org.sonar.api.profiles.RulesProfile; + +@Deprecated +public interface ConfigurationExportable { + + String exportConfiguration(RulesProfile profile); + +} diff --git a/sonar-deprecated/src/main/java/org/sonar/api/rules/ConfigurationImportable.java b/sonar-deprecated/src/main/java/org/sonar/api/rules/ConfigurationImportable.java index c16337875e3..3c32c98f31c 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/rules/ConfigurationImportable.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/rules/ConfigurationImportable.java @@ -1,30 +1,30 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.rules;
-
-import java.util.List;
-import org.sonar.api.rules.Rule;
-
-@Deprecated
-public interface ConfigurationImportable {
-
- List<ActiveRule> importConfiguration(String configuration, List<Rule> rules);
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.rules; + +import java.util.List; +import org.sonar.api.rules.Rule; + +@Deprecated +public interface ConfigurationImportable { + + List<ActiveRule> importConfiguration(String configuration, List<Rule> rules); + +} diff --git a/sonar-deprecated/src/main/java/org/sonar/api/rules/DefaultRulesManager.java b/sonar-deprecated/src/main/java/org/sonar/api/rules/DefaultRulesManager.java index 37345cead6a..8ed1a70e75c 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/rules/DefaultRulesManager.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/rules/DefaultRulesManager.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/rules/RulePriorityMapper.java b/sonar-deprecated/src/main/java/org/sonar/api/rules/RulePriorityMapper.java index c8a382ecd89..cbae894a3b0 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/rules/RulePriorityMapper.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/rules/RulePriorityMapper.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/rules/RulesManager.java b/sonar-deprecated/src/main/java/org/sonar/api/rules/RulesManager.java index 2cf6a872307..7d852b446f0 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/rules/RulesManager.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/rules/RulesManager.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/rules/RulesRepository.java b/sonar-deprecated/src/main/java/org/sonar/api/rules/RulesRepository.java index 8156cac9723..2a09816b6c2 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/rules/RulesRepository.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/rules/RulesRepository.java @@ -1,58 +1,58 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.rules;
-
-import org.sonar.api.BatchExtension;
-import org.sonar.api.ServerExtension;
-import org.sonar.api.profiles.RulesProfile;
-import org.sonar.api.resources.Language;
-
-import java.util.List;
-
-/**
- * @deprecated since 2.3
- */
-@Deprecated
-public interface RulesRepository<LANG extends Language> extends BatchExtension, ServerExtension {
-
- /**
- * @return the language the repository is associated
- */
- LANG getLanguage();
-
- /**
- * @return the list of rules of the repository
- */
- List<Rule> getInitialReferential();
-
- /**
- * The method to parse the base referential of rules and return a list of rules
- *
- * @param fileContent the initial referential
- * @return a list of rules
- */
- List<Rule> parseReferential(String fileContent);
-
- /**
- * @return a list of profiles that are provided with the referential
- */
- List<RulesProfile> getProvidedProfiles();
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.rules; + +import org.sonar.api.BatchExtension; +import org.sonar.api.ServerExtension; +import org.sonar.api.profiles.RulesProfile; +import org.sonar.api.resources.Language; + +import java.util.List; + +/** + * @deprecated since 2.3 + */ +@Deprecated +public interface RulesRepository<LANG extends Language> extends BatchExtension, ServerExtension { + + /** + * @return the language the repository is associated + */ + LANG getLanguage(); + + /** + * @return the list of rules of the repository + */ + List<Rule> getInitialReferential(); + + /** + * The method to parse the base referential of rules and return a list of rules + * + * @param fileContent the initial referential + * @return a list of rules + */ + List<Rule> parseReferential(String fileContent); + + /** + * @return a list of profiles that are provided with the referential + */ + List<RulesProfile> getProvidedProfiles(); + +} diff --git a/sonar-deprecated/src/main/java/org/sonar/api/rules/StandardProfileXmlParser.java b/sonar-deprecated/src/main/java/org/sonar/api/rules/StandardProfileXmlParser.java index 272b9642889..e2098c4c872 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/rules/StandardProfileXmlParser.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/rules/StandardProfileXmlParser.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/rules/StandardRulesXmlParser.java b/sonar-deprecated/src/main/java/org/sonar/api/rules/StandardRulesXmlParser.java index 82889c80c66..cf3b1798408 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/rules/StandardRulesXmlParser.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/rules/StandardRulesXmlParser.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/rules/xml/Profile.java b/sonar-deprecated/src/main/java/org/sonar/api/rules/xml/Profile.java index cd40e8a1f0e..7e3cfbadf7d 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/rules/xml/Profile.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/rules/xml/Profile.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/main/java/org/sonar/api/rules/xml/Property.java b/sonar-deprecated/src/main/java/org/sonar/api/rules/xml/Property.java index 8e6dbec7670..657d616e5c4 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/rules/xml/Property.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/rules/xml/Property.java @@ -1,47 +1,47 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.rules.xml;
-
-import com.thoughtworks.xstream.annotations.XStreamAlias;
-import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
-
-@Deprecated
-@XStreamAlias("property")
-public class Property {
-
- @XStreamAsAttribute
- private String name;
-
- @XStreamAsAttribute
- private String value;
-
- public Property(String name, String value) {
- this.name = name;
- this.value = value;
- }
-
- public String getName() {
- return name;
- }
-
- public String getValue() {
- return value;
- }
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.rules.xml; + +import com.thoughtworks.xstream.annotations.XStreamAlias; +import com.thoughtworks.xstream.annotations.XStreamAsAttribute; + +@Deprecated +@XStreamAlias("property") +public class Property { + + @XStreamAsAttribute + private String name; + + @XStreamAsAttribute + private String value; + + public Property(String name, String value) { + this.name = name; + this.value = value; + } + + public String getName() { + return name; + } + + public String getValue() { + return value; + } }
\ No newline at end of file diff --git a/sonar-deprecated/src/main/java/org/sonar/api/rules/xml/Rule.java b/sonar-deprecated/src/main/java/org/sonar/api/rules/xml/Rule.java index e424d1466a6..a299af9b7c1 100644 --- a/sonar-deprecated/src/main/java/org/sonar/api/rules/xml/Rule.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/rules/xml/Rule.java @@ -1,82 +1,82 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.rules.xml;
-
-import com.thoughtworks.xstream.annotations.XStreamAlias;
-import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
-import com.thoughtworks.xstream.annotations.XStreamImplicit;
-
-import java.util.ArrayList;
-import java.util.List;
-
-@Deprecated
-@XStreamAlias("rule")
-public class Rule implements Comparable<String> {
-
- @XStreamAsAttribute
- private String key;
-
- @XStreamAsAttribute
- private String priority;
-
- @XStreamImplicit
- private List<Property> properties;
-
- public Rule(String ref) {
- this(ref, null);
- }
-
- public Rule(String ref, String priority) {
- this.key = ref;
- this.priority = priority;
- }
-
- public String getKey() {
- return key;
- }
-
- public void setProperties(List<Property> properties) {
- this.properties = properties;
- }
-
- public List<Property> getProperties() {
- return properties;
- }
-
- public int compareTo(String o) {
- return o.compareTo(key);
- }
-
- public String getPriority() {
- return priority;
- }
-
- public void setPriority(String priority) {
- this.priority = priority;
- }
-
- public void addProperty(Property property) {
- if (properties == null) {
- properties = new ArrayList<Property>();
- }
- properties.add(property);
- }
-
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.rules.xml; + +import com.thoughtworks.xstream.annotations.XStreamAlias; +import com.thoughtworks.xstream.annotations.XStreamAsAttribute; +import com.thoughtworks.xstream.annotations.XStreamImplicit; + +import java.util.ArrayList; +import java.util.List; + +@Deprecated +@XStreamAlias("rule") +public class Rule implements Comparable<String> { + + @XStreamAsAttribute + private String key; + + @XStreamAsAttribute + private String priority; + + @XStreamImplicit + private List<Property> properties; + + public Rule(String ref) { + this(ref, null); + } + + public Rule(String ref, String priority) { + this.key = ref; + this.priority = priority; + } + + public String getKey() { + return key; + } + + public void setProperties(List<Property> properties) { + this.properties = properties; + } + + public List<Property> getProperties() { + return properties; + } + + public int compareTo(String o) { + return o.compareTo(key); + } + + public String getPriority() { + return priority; + } + + public void setPriority(String priority) { + this.priority = priority; + } + + public void addProperty(Property property) { + if (properties == null) { + properties = new ArrayList<Property>(); + } + properties.add(property); + } + }
\ No newline at end of file diff --git a/sonar-deprecated/src/main/java/org/sonar/core/purge/AbstractPurge.java b/sonar-deprecated/src/main/java/org/sonar/core/purge/AbstractPurge.java index 8edba7288f5..365e6d888e5 100644 --- a/sonar-deprecated/src/main/java/org/sonar/core/purge/AbstractPurge.java +++ b/sonar-deprecated/src/main/java/org/sonar/core/purge/AbstractPurge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/batch/AbstractViolationsStaxParserTest.java b/sonar-deprecated/src/test/java/org/sonar/api/batch/AbstractViolationsStaxParserTest.java index d1f91f1b4d3..437cc5d7b5e 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/batch/AbstractViolationsStaxParserTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/batch/AbstractViolationsStaxParserTest.java @@ -1,103 +1,103 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-
-package org.sonar.api.batch;
-
-import static junit.framework.Assert.assertNull;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.is;
-import static org.mockito.Mockito.mock;
-
-import java.io.StringReader;
-
-import javax.xml.stream.XMLStreamException;
-
-import org.codehaus.staxmate.in.SMInputCursor;
-import org.hibernate.lob.ReaderInputStream;
-import org.junit.Test;
-import org.sonar.api.resources.JavaFile;
-import org.sonar.api.resources.Resource;
-import org.sonar.api.rules.RulesManager;
-
-public class AbstractViolationsStaxParserTest {
-
- @Test
- public void testParseLineIndex() {
-
- assertThat(AbstractViolationsStaxParser.parseLineIndex("4"), is(4));
- assertNull(AbstractViolationsStaxParser.parseLineIndex("toto"));
- assertNull(AbstractViolationsStaxParser.parseLineIndex(""));
- assertNull(AbstractViolationsStaxParser.parseLineIndex(null));
- assertNull(AbstractViolationsStaxParser.parseLineIndex("-1"));
- }
-
- @Test
- public void testDoNotSaveViolationsOnUnexistedResource() throws XMLStreamException {
- SensorContext context = mock(SensorContext.class);
- MyViolationParser violationParser = new MyViolationParser(context, null);
- violationParser.setDoSaveViolationsOnUnexistedResource(false);
- violationParser.parse(new ReaderInputStream(new StringReader("<root><file/></root>")));
- }
-
- @Test(expected = CursorForViolationsMethodHasBeenCalled.class)
- public void testDoSaveViolationsOnUnexistedResource() throws XMLStreamException {
- SensorContext context = mock(SensorContext.class);
- MyViolationParser violationParser = new MyViolationParser(context, null);
- violationParser.parse(new ReaderInputStream(new StringReader("<root><file/></root>")));
- }
-
- private class MyViolationParser extends AbstractViolationsStaxParser {
-
- protected MyViolationParser(SensorContext context, RulesManager rulesManager) {
- super(context, rulesManager);
- }
-
- protected SMInputCursor cursorForResources(SMInputCursor rootCursor) throws XMLStreamException {
- return rootCursor.descendantElementCursor("file");
- }
-
- protected SMInputCursor cursorForViolations(SMInputCursor resourcesCursor) throws XMLStreamException {
- throw new CursorForViolationsMethodHasBeenCalled();
- }
-
- protected Resource toResource(SMInputCursor resourceCursor) throws XMLStreamException {
- return new JavaFile("org.sonar.MyClass");
- }
-
- protected String messageFor(SMInputCursor violationCursor) throws XMLStreamException {
- return null;
- }
-
- protected String ruleKey(SMInputCursor violationCursor) throws XMLStreamException {
- return null;
- }
-
- protected String keyForPlugin() {
- return null;
- }
-
- protected String lineNumberForViolation(SMInputCursor violationCursor) throws XMLStreamException {
- return null;
- }
- }
-
- private class CursorForViolationsMethodHasBeenCalled extends RuntimeException {
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ + +package org.sonar.api.batch; + +import static junit.framework.Assert.assertNull; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; +import static org.mockito.Mockito.mock; + +import java.io.StringReader; + +import javax.xml.stream.XMLStreamException; + +import org.codehaus.staxmate.in.SMInputCursor; +import org.hibernate.lob.ReaderInputStream; +import org.junit.Test; +import org.sonar.api.resources.JavaFile; +import org.sonar.api.resources.Resource; +import org.sonar.api.rules.RulesManager; + +public class AbstractViolationsStaxParserTest { + + @Test + public void testParseLineIndex() { + + assertThat(AbstractViolationsStaxParser.parseLineIndex("4"), is(4)); + assertNull(AbstractViolationsStaxParser.parseLineIndex("toto")); + assertNull(AbstractViolationsStaxParser.parseLineIndex("")); + assertNull(AbstractViolationsStaxParser.parseLineIndex(null)); + assertNull(AbstractViolationsStaxParser.parseLineIndex("-1")); + } + + @Test + public void testDoNotSaveViolationsOnUnexistedResource() throws XMLStreamException { + SensorContext context = mock(SensorContext.class); + MyViolationParser violationParser = new MyViolationParser(context, null); + violationParser.setDoSaveViolationsOnUnexistedResource(false); + violationParser.parse(new ReaderInputStream(new StringReader("<root><file/></root>"))); + } + + @Test(expected = CursorForViolationsMethodHasBeenCalled.class) + public void testDoSaveViolationsOnUnexistedResource() throws XMLStreamException { + SensorContext context = mock(SensorContext.class); + MyViolationParser violationParser = new MyViolationParser(context, null); + violationParser.parse(new ReaderInputStream(new StringReader("<root><file/></root>"))); + } + + private class MyViolationParser extends AbstractViolationsStaxParser { + + protected MyViolationParser(SensorContext context, RulesManager rulesManager) { + super(context, rulesManager); + } + + protected SMInputCursor cursorForResources(SMInputCursor rootCursor) throws XMLStreamException { + return rootCursor.descendantElementCursor("file"); + } + + protected SMInputCursor cursorForViolations(SMInputCursor resourcesCursor) throws XMLStreamException { + throw new CursorForViolationsMethodHasBeenCalled(); + } + + protected Resource toResource(SMInputCursor resourceCursor) throws XMLStreamException { + return new JavaFile("org.sonar.MyClass"); + } + + protected String messageFor(SMInputCursor violationCursor) throws XMLStreamException { + return null; + } + + protected String ruleKey(SMInputCursor violationCursor) throws XMLStreamException { + return null; + } + + protected String keyForPlugin() { + return null; + } + + protected String lineNumberForViolation(SMInputCursor violationCursor) throws XMLStreamException { + return null; + } + } + + private class CursorForViolationsMethodHasBeenCalled extends RuntimeException { + } +} diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/AnnotationCheckerFactoryTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/AnnotationCheckerFactoryTest.java index 8e89d46dd43..64d858e3e57 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/AnnotationCheckerFactoryTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/AnnotationCheckerFactoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckWithUnsupportedPropertyType.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckWithUnsupportedPropertyType.java index 601ea23b8fd..2c5f3621ae9 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckWithUnsupportedPropertyType.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckWithUnsupportedPropertyType.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithIntegerProperty.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithIntegerProperty.java index 1c0f3983a60..fc178a97333 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithIntegerProperty.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithIntegerProperty.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithPrimitiveProperties.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithPrimitiveProperties.java index 26b12313de2..a1532925339 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithPrimitiveProperties.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithPrimitiveProperties.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithStringProperty.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithStringProperty.java index b219eee33fa..bed430862f6 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithStringProperty.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithStringProperty.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithoutProperties.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithoutProperties.java index a3a72999cfd..a670c06be9d 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithoutProperties.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithoutProperties.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactoryTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactoryTest.java index 83d16557ed7..a41a970edd5 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactoryTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckProfileTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckProfileTest.java index 20d7ffc6910..09ae338d880 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckProfileTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckProfileTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshallerTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshallerTest.java index bf6c488d237..2c33c609db6 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshallerTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshallerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckTest.java index 3d59ff3cb52..cd7f527310b 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/FakeCheckOne.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/FakeCheckOne.java index aafd4f1f522..5a5ba20e23f 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/FakeCheckOne.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/FakeCheckOne.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/FakeCheckTwo.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/FakeCheckTwo.java index 3348f093f3c..a20e9de2cd3 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/FakeCheckTwo.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/FakeCheckTwo.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/AnnotatedCheckWithBundles.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/AnnotatedCheckWithBundles.java index 5618932fda5..234567e9926 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/AnnotatedCheckWithBundles.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/AnnotatedCheckWithBundles.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/DetailedAnnotatedCheck.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/DetailedAnnotatedCheck.java index 7e461ea1248..1b88b783d4a 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/DetailedAnnotatedCheck.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/DetailedAnnotatedCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/I18nCheckWithAlternativeBundle.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/I18nCheckWithAlternativeBundle.java index 50dc9a78df2..8bf94a7fcf0 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/I18nCheckWithAlternativeBundle.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/I18nCheckWithAlternativeBundle.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/I18nCheckWithoutDefaultLocale.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/I18nCheckWithoutDefaultLocale.java index 7828d928cb1..02535aa7663 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/I18nCheckWithoutDefaultLocale.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/I18nCheckWithoutDefaultLocale.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/SimpleAnnotatedCheck.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/SimpleAnnotatedCheck.java index 67e99868bbb..2c8069efae4 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/SimpleAnnotatedCheck.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/SimpleAnnotatedCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactoryTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactoryTest.java index 5f8f5de48d6..bae346a718f 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactoryTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/BundleCheckTemplateTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/BundleCheckTemplateTest.java index 905ba0399b8..d1ce879c470 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/BundleCheckTemplateTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/BundleCheckTemplateTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/CheckTemplateRepositoriesTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/CheckTemplateRepositoriesTest.java index 691a2084eaf..0b032d77797 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/CheckTemplateRepositoriesTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/CheckTemplateRepositoriesTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/DefaultCheckTemplateTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/DefaultCheckTemplateTest.java index e83896a6197..ad15e02eec5 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/DefaultCheckTemplateTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/DefaultCheckTemplateTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/rules/StandardProfileXmlParserTest.java b/sonar-deprecated/src/test/java/org/sonar/api/rules/StandardProfileXmlParserTest.java index 586961d0dca..1820670b7f3 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/rules/StandardProfileXmlParserTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/rules/StandardProfileXmlParserTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-deprecated/src/test/java/org/sonar/api/rules/StandardRulesXmlParserTest.java b/sonar-deprecated/src/test/java/org/sonar/api/rules/StandardRulesXmlParserTest.java index 25a408ce089..ab367b42532 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/rules/StandardRulesXmlParserTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/rules/StandardRulesXmlParserTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AbstractLanguage.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AbstractLanguage.java index 46a252bbf7a..f60f2f80044 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AbstractLanguage.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AbstractLanguage.java @@ -1,43 +1,43 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-
-package net.sourceforge.pmd.cpd;
-
-import net.sourceforge.pmd.util.filter.Filters;
-
-import java.io.FilenameFilter;
-
-public abstract class AbstractLanguage implements Language {
- private final Tokenizer tokenizer;
- private final FilenameFilter fileFilter;
-
- public AbstractLanguage(Tokenizer tokenizer, String... extensions) {
- this.tokenizer = tokenizer;
- fileFilter = net.sourceforge.pmd.util.filter.Filters.toFilenameFilter(Filters.getFileExtensionOrDirectoryFilter(extensions));
- }
-
- public FilenameFilter getFileFilter() {
- return fileFilter;
- }
-
- public Tokenizer getTokenizer() {
- return tokenizer;
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ + +package net.sourceforge.pmd.cpd; + +import net.sourceforge.pmd.util.filter.Filters; + +import java.io.FilenameFilter; + +public abstract class AbstractLanguage implements Language { + private final Tokenizer tokenizer; + private final FilenameFilter fileFilter; + + public AbstractLanguage(Tokenizer tokenizer, String... extensions) { + this.tokenizer = tokenizer; + fileFilter = net.sourceforge.pmd.util.filter.Filters.toFilenameFilter(Filters.getFileExtensionOrDirectoryFilter(extensions)); + } + + public FilenameFilter getFileFilter() { + return fileFilter; + } + + public Tokenizer getTokenizer() { + return tokenizer; + } +} diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AnyLanguage.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AnyLanguage.java index 9f302512e00..b3c094e4cd3 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AnyLanguage.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AnyLanguage.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AnyTokenizer.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AnyTokenizer.java index 0a3659857a0..595fa235b45 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AnyTokenizer.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AnyTokenizer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/CPDListener.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/CPDListener.java index 3d74c9deec6..fa17bce8d2e 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/CPDListener.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/CPDListener.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/CPDNullListener.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/CPDNullListener.java index ae154776d1e..13a97b24346 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/CPDNullListener.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/CPDNullListener.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/FileFinder.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/FileFinder.java index 19051059602..f2c61bd25d2 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/FileFinder.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/FileFinder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/FileReporter.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/FileReporter.java index 743697472d1..6c530b690a3 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/FileReporter.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/FileReporter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Language.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Language.java index a609a81ceb0..f9f418d64c0 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Language.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Language.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/ReportException.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/ReportException.java index 1fa87f75630..f2d371b45cb 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/ReportException.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/ReportException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/SourceCode.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/SourceCode.java index 3a0282196c4..2ce2ea4b42c 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/SourceCode.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/SourceCode.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/TokenEntry.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/TokenEntry.java index 883354568a4..1da17017bf5 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/TokenEntry.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/TokenEntry.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Tokenizer.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Tokenizer.java index 8706cd4dea8..54f8c216779 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Tokenizer.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Tokenizer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Tokens.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Tokens.java index dfbf2501cac..67731611a84 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Tokens.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Tokens.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/CPPParserConstants.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/CPPParserConstants.java index e6f57bd9945..57ec6e503d7 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/CPPParserConstants.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/CPPParserConstants.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/CPPParserTokenManager.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/CPPParserTokenManager.java index 452ddc6cac0..a5421f2e805 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/CPPParserTokenManager.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/CPPParserTokenManager.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/ParseException.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/ParseException.java index 1c0e6e03f57..c093ff15c5c 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/ParseException.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/ParseException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/SimpleCharStream.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/SimpleCharStream.java index aad959fe7f2..54005b298d1 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/SimpleCharStream.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/SimpleCharStream.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/Token.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/Token.java index ab4824448e5..15f78e80a1f 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/Token.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/Token.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/TokenMgrError.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/TokenMgrError.java index 9f4258d9742..e51205fe2f9 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/TokenMgrError.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/TokenMgrError.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/FileFinder.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/FileFinder.java index ada54ced4ad..42f8764f264 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/FileFinder.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/FileFinder.java @@ -1,62 +1,62 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-
-package net.sourceforge.pmd.util;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A utility class for finding files within a directory.
- */
-public class FileFinder {
-
- private FilenameFilter filter;
- private static final String FILE_SEP = System.getProperty("file.separator");
-
- public List<File> findFilesFrom(String dir, FilenameFilter filter, boolean recurse) {
- this.filter = filter;
- List<File> files = new ArrayList<File>();
- scanDirectory(new File(dir), files, recurse);
- return files;
- }
-
- /**
- * Implements a tail recursive file scanner
- */
- private void scanDirectory(File dir, List<File> list, boolean recurse) {
- String[] candidates = dir.list(filter);
- if (candidates == null) {
- return;
- }
- for (int i = 0; i < candidates.length; i++) {
- File tmp = new File(dir + FILE_SEP + candidates[i]);
- if (tmp.isDirectory()) {
- if (recurse) {
- scanDirectory(tmp, list, true);
- }
- } else {
- list.add(new File(dir + FILE_SEP + candidates[i]));
- }
- }
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ + +package net.sourceforge.pmd.util; + +import java.io.File; +import java.io.FilenameFilter; +import java.util.ArrayList; +import java.util.List; + +/** + * A utility class for finding files within a directory. + */ +public class FileFinder { + + private FilenameFilter filter; + private static final String FILE_SEP = System.getProperty("file.separator"); + + public List<File> findFilesFrom(String dir, FilenameFilter filter, boolean recurse) { + this.filter = filter; + List<File> files = new ArrayList<File>(); + scanDirectory(new File(dir), files, recurse); + return files; + } + + /** + * Implements a tail recursive file scanner + */ + private void scanDirectory(File dir, List<File> list, boolean recurse) { + String[] candidates = dir.list(filter); + if (candidates == null) { + return; + } + for (int i = 0; i < candidates.length; i++) { + File tmp = new File(dir + FILE_SEP + candidates[i]); + if (tmp.isDirectory()) { + if (recurse) { + scanDirectory(tmp, list, true); + } + } else { + list.add(new File(dir + FILE_SEP + candidates[i])); + } + } + } +} diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/StringUtil.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/StringUtil.java index 41d1d27760c..ce84dd3dc0d 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/StringUtil.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/StringUtil.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/AbstractCompoundFilter.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/AbstractCompoundFilter.java index 6d5523ba8ce..13e300689f9 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/AbstractCompoundFilter.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/AbstractCompoundFilter.java @@ -1,76 +1,76 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-
-package net.sourceforge.pmd.util.filter;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A base class for Filters which implements behavior using a List of other
- * Filters.
- *
- * @param <T>
- * The underlying type on which the filter applies.
- */
-public abstract class AbstractCompoundFilter<T> implements Filter<T> {
-
- protected List<Filter<T>> filters;
-
- public AbstractCompoundFilter() {
- filters = new ArrayList<Filter<T>>(2);
- }
-
- public AbstractCompoundFilter(Filter<T>... filters) {
- this.filters = new ArrayList<Filter<T>>(filters.length);
- for (Filter<T> filter : filters) {
- this.filters.add(filter);
- }
- }
-
- public List<Filter<T>> getFilters() {
- return filters;
- }
-
- public void setFilters(List<Filter<T>> filters) {
- this.filters = filters;
- }
-
- public void addFilter(Filter<T> filter) {
- filters.add(filter);
- }
-
- protected abstract String getOperator();
-
- public String toString() {
- StringBuilder builder = new StringBuilder();
- builder.append("(");
- for (int i = 0; i < filters.size(); i++) {
- if (i > 0) {
- builder.append(" ");
- builder.append(getOperator());
- builder.append(" ");
- }
- builder.append(filters.get(i));
- }
- builder.append(")");
- return builder.toString();
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ + +package net.sourceforge.pmd.util.filter; + +import java.util.ArrayList; +import java.util.List; + +/** + * A base class for Filters which implements behavior using a List of other + * Filters. + * + * @param <T> + * The underlying type on which the filter applies. + */ +public abstract class AbstractCompoundFilter<T> implements Filter<T> { + + protected List<Filter<T>> filters; + + public AbstractCompoundFilter() { + filters = new ArrayList<Filter<T>>(2); + } + + public AbstractCompoundFilter(Filter<T>... filters) { + this.filters = new ArrayList<Filter<T>>(filters.length); + for (Filter<T> filter : filters) { + this.filters.add(filter); + } + } + + public List<Filter<T>> getFilters() { + return filters; + } + + public void setFilters(List<Filter<T>> filters) { + this.filters = filters; + } + + public void addFilter(Filter<T> filter) { + filters.add(filter); + } + + protected abstract String getOperator(); + + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("("); + for (int i = 0; i < filters.size(); i++) { + if (i > 0) { + builder.append(" "); + builder.append(getOperator()); + builder.append(" "); + } + builder.append(filters.get(i)); + } + builder.append(")"); + return builder.toString(); + } +} diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/AbstractDelegateFilter.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/AbstractDelegateFilter.java index 678ef1d535f..e203bb58b6c 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/AbstractDelegateFilter.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/AbstractDelegateFilter.java @@ -1,57 +1,57 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-
-package net.sourceforge.pmd.util.filter;
-
-/**
- * A base class for Filters which implements behavior using delegation
- * to an underlying filter.
- *
- * @param <T>
- * The underlying type on which the filter applies.
- */
-public abstract class AbstractDelegateFilter<T> implements Filter<T> {
- protected Filter<T> filter;
-
- public AbstractDelegateFilter() {
- }
-
- public AbstractDelegateFilter(Filter<T> filter) {
- this.filter = filter;
- }
-
- public Filter<T> getFilter() {
- return filter;
- }
-
- public void setFilter(Filter<T> filter) {
- this.filter = filter;
- }
-
- // Subclass should override to do something other the simply delegate.
- public boolean filter(T obj) {
- return filter.filter(obj);
- }
-
- // Subclass should override to do something other the simply delegate.
- public String toString() {
- return filter.toString();
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ + +package net.sourceforge.pmd.util.filter; + +/** + * A base class for Filters which implements behavior using delegation + * to an underlying filter. + * + * @param <T> + * The underlying type on which the filter applies. + */ +public abstract class AbstractDelegateFilter<T> implements Filter<T> { + protected Filter<T> filter; + + public AbstractDelegateFilter() { + } + + public AbstractDelegateFilter(Filter<T> filter) { + this.filter = filter; + } + + public Filter<T> getFilter() { + return filter; + } + + public void setFilter(Filter<T> filter) { + this.filter = filter; + } + + // Subclass should override to do something other the simply delegate. + public boolean filter(T obj) { + return filter.filter(obj); + } + + // Subclass should override to do something other the simply delegate. + public String toString() { + return filter.toString(); + } +} diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/AndFilter.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/AndFilter.java index b74c211f30a..96ab80a3edd 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/AndFilter.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/AndFilter.java @@ -1,54 +1,54 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-
-package net.sourceforge.pmd.util.filter;
-
-/**
- * A logical AND of a list of Filters. This implementation is short circuiting.
- *
- * @param <T>
- * The underlying type on which the filter applies.
- */
-public class AndFilter<T> extends AbstractCompoundFilter<T> {
-
- public AndFilter() {
- super();
- }
-
- public AndFilter(Filter<T>... filters) {
- super(filters);
- }
-
- public boolean filter(T obj) {
- boolean match = true;
- for (Filter<T> filter : filters) {
- if (!filter.filter(obj)) {
- match = false;
- break;
- }
- }
- return match;
- }
-
- @Override
- protected String getOperator() {
- return "and";
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ + +package net.sourceforge.pmd.util.filter; + +/** + * A logical AND of a list of Filters. This implementation is short circuiting. + * + * @param <T> + * The underlying type on which the filter applies. + */ +public class AndFilter<T> extends AbstractCompoundFilter<T> { + + public AndFilter() { + super(); + } + + public AndFilter(Filter<T>... filters) { + super(filters); + } + + public boolean filter(T obj) { + boolean match = true; + for (Filter<T> filter : filters) { + if (!filter.filter(obj)) { + match = false; + break; + } + } + return match; + } + + @Override + protected String getOperator() { + return "and"; + } +} diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/DirectoryFilter.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/DirectoryFilter.java index 65a39c981a9..4d632ec23b0 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/DirectoryFilter.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/DirectoryFilter.java @@ -1,37 +1,37 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-
-package net.sourceforge.pmd.util.filter;
-
-import java.io.File;
-
-/**
- * Directory filter.
- */
-public class DirectoryFilter implements Filter<File> {
- public static final DirectoryFilter INSTANCE = new DirectoryFilter();
-
- private DirectoryFilter() {
- }
-
- public boolean filter(File file) {
- return file.isDirectory();
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ + +package net.sourceforge.pmd.util.filter; + +import java.io.File; + +/** + * Directory filter. + */ +public class DirectoryFilter implements Filter<File> { + public static final DirectoryFilter INSTANCE = new DirectoryFilter(); + + private DirectoryFilter() { + } + + public boolean filter(File file) { + return file.isDirectory(); + } +} diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/FileExtensionFilter.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/FileExtensionFilter.java index 12c5658fcc8..f442e8e93ef 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/FileExtensionFilter.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/FileExtensionFilter.java @@ -1,62 +1,62 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-
-package net.sourceforge.pmd.util.filter;
-
-import java.io.File;
-
-public class FileExtensionFilter implements Filter<File> {
- protected final String[] extensions;
- protected final boolean ignoreCase;
-
- /**
- * Matches any files with the given extensions, ignoring case
- */
- public FileExtensionFilter(String... extensions) {
- this(true, extensions);
- }
-
- /**
- * Matches any files with the given extensions, optionally ignoring case.
- */
- public FileExtensionFilter(boolean ignoreCase, String... extensions) {
- this.extensions = extensions;
- this.ignoreCase = ignoreCase;
- if (ignoreCase) {
- for (int i = 0; i < this.extensions.length; i++) {
- this.extensions[i] = this.extensions[i].toUpperCase();
- }
- }
- }
-
- public boolean filter(File file) {
- boolean accept = extensions == null;
- if (!accept) {
- for (String extension : extensions) {
- String name = file.getName();
- if (ignoreCase ? name.toUpperCase().endsWith(extension) : name.endsWith(extension)) {
- accept = true;
- break;
- }
- }
- }
- return accept;
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ + +package net.sourceforge.pmd.util.filter; + +import java.io.File; + +public class FileExtensionFilter implements Filter<File> { + protected final String[] extensions; + protected final boolean ignoreCase; + + /** + * Matches any files with the given extensions, ignoring case + */ + public FileExtensionFilter(String... extensions) { + this(true, extensions); + } + + /** + * Matches any files with the given extensions, optionally ignoring case. + */ + public FileExtensionFilter(boolean ignoreCase, String... extensions) { + this.extensions = extensions; + this.ignoreCase = ignoreCase; + if (ignoreCase) { + for (int i = 0; i < this.extensions.length; i++) { + this.extensions[i] = this.extensions[i].toUpperCase(); + } + } + } + + public boolean filter(File file) { + boolean accept = extensions == null; + if (!accept) { + for (String extension : extensions) { + String name = file.getName(); + if (ignoreCase ? name.toUpperCase().endsWith(extension) : name.endsWith(extension)) { + accept = true; + break; + } + } + } + return accept; + } +} diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/Filter.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/Filter.java index 1a35080ee6d..2acd458c6c6 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/Filter.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/Filter.java @@ -1,31 +1,31 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-
-package net.sourceforge.pmd.util.filter;
-
-/**
- * A Filter interface, used for filtering arbitrary objects.
- *
- * @param <T>
- * The underlying type on which the filter applies.
- */
-public interface Filter<T> {
- boolean filter(T obj);
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ + +package net.sourceforge.pmd.util.filter; + +/** + * A Filter interface, used for filtering arbitrary objects. + * + * @param <T> + * The underlying type on which the filter applies. + */ +public interface Filter<T> { + boolean filter(T obj); +} diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/Filters.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/Filters.java index 5318e298e45..9acd1a61660 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/Filters.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/Filters.java @@ -1,220 +1,220 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-
-package net.sourceforge.pmd.util.filter;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-/**
- * Utility class for working with Filters. Contains builder style methods,
- * apply methods, as well as mechanisms for adapting Filters and FilenameFilters.
- */
-public class Filters {
-
- /**
- * Filter a given Collection.
- * @param <T> Type of the Collection.
- * @param filter A Filter upon the Type of objects in the Collection.
- * @param collection The Collection to filter.
- * @return A List containing only those objects for which the Filter returned <code>true</code>.
- */
- public static <T> List<T> filter(Filter<T> filter, Collection<T> collection) {
- List<T> list = new ArrayList<T>();
- for (T obj : collection) {
- if (filter.filter(obj)) {
- list.add(obj);
- }
- }
- return list;
- }
-
- /**
- * Get a File Filter for files with the given extensions, ignoring case.
- * @param extensions The extensions to filter.
- * @return A File Filter.
- */
- public static Filter<File> getFileExtensionFilter(String... extensions) {
- return new FileExtensionFilter(extensions);
- }
-
- /**
- * Get a File Filter for directories.
- * @return A File Filter.
- */
- public static Filter<File> getDirectoryFilter() {
- return DirectoryFilter.INSTANCE;
- }
-
- /**
- * Get a File Filter for directories or for files with the given extensions, ignoring case.
- * @param extensions The extensions to filter.
- * @return A File Filter.
- */
- public static Filter<File> getFileExtensionOrDirectoryFilter(String... extensions) {
- return new OrFilter<File>(getFileExtensionFilter(extensions), getDirectoryFilter());
- }
-
- /**
- * Given a String Filter, expose as a File Filter. The File paths are
- * normalized to a standard pattern using <code>/</code> as a path separator
- * which can be used cross platform easily in a regular expression based
- * String Filter.
- *
- * @param filter A String Filter.
- * @return A File Filter.
- */
- public static Filter<File> toNormalizedFileFilter(final Filter<String> filter) {
- return new Filter<File>() {
- public boolean filter(File file) {
- String path = file.getPath();
- path = path.replace('\\', '/');
- return filter.filter(path);
- }
-
- public String toString() {
- return filter.toString();
- }
- };
- }
-
- /**
- * Given a String Filter, expose as a Filter on another type. The
- * <code>toString()</code> method is called on the objects of the other
- * type and delegated to the String Filter.
- * @param <T> The desired type.
- * @param filter The existing String Filter.
- * @return A Filter on the desired type.
- */
- public static <T> Filter<T> fromStringFilter(final Filter<String> filter) {
- return new Filter<T>() {
- public boolean filter(T obj) {
- return filter.filter(obj.toString());
- }
-
- public String toString() {
- return filter.toString();
- }
- };
- }
-
- /**
- * Given a File Filter, expose as a FilenameFilter.
- * @param filter The File Filter.
- * @return A FilenameFilter.
- */
- public static FilenameFilter toFilenameFilter(final Filter<File> filter) {
- return new FilenameFilter() {
- public boolean accept(File dir, String name) {
- return filter.filter(new File(dir, name));
- }
-
- public String toString() {
- return filter.toString();
- }
- };
- }
-
- /**
- * Given a FilenameFilter, expose as a File Filter.
- * @param filter The FilenameFilter.
- * @return A File Filter.
- */
- public static Filter<File> toFileFilter(final FilenameFilter filter) {
- return new Filter<File>() {
- public boolean filter(File file) {
- return filter.accept(file.getParentFile(), file.getName());
- }
-
- public String toString() {
- return filter.toString();
- }
- };
- }
-
- /**
- * Construct a String Filter using set of include and exclude regular
- * expressions. If there are no include regular expressions provide, then
- * a regular expression is added which matches every String by default.
- * A String is included as long as it matches an include regular expression
- * and does not match an exclude regular expression.
- * <p>
- * In other words, exclude patterns override include patterns.
- *
- * @param includeRegexes The include regular expressions. May be <code>null</code>.
- * @param excludeRegexes The exclude regular expressions. May be <code>null</code>.
- * @return A String Filter.
- */
- public static Filter<String> buildRegexFilterExcludeOverInclude(List<String> includeRegexes,
- List<String> excludeRegexes) {
- OrFilter<String> includeFilter = new OrFilter<String>();
- if (includeRegexes == null || includeRegexes.size() == 0) {
- includeFilter.addFilter(new RegexStringFilter(".*"));
- } else {
- for (String includeRegex : includeRegexes) {
- includeFilter.addFilter(new RegexStringFilter(includeRegex));
- }
- }
-
- OrFilter<String> excludeFilter = new OrFilter<String>();
- if (excludeRegexes != null) {
- for (String excludeRegex : excludeRegexes) {
- excludeFilter.addFilter(new RegexStringFilter(excludeRegex));
- }
- }
-
- return new AndFilter<String>(includeFilter, new NotFilter<String>(excludeFilter));
- }
-
- /**
- * Construct a String Filter using set of include and exclude regular
- * expressions. If there are no include regular expressions provide, then
- * a regular expression is added which matches every String by default.
- * A String is included as long as the case that there is an include which
- * matches or there is not an exclude which matches.
- * <p>
- * In other words, include patterns override exclude patterns.
- *
- * @param includeRegexes The include regular expressions. May be <code>null</code>.
- * @param excludeRegexes The exclude regular expressions. May be <code>null</code>.
- * @return A String Filter.
- */
- public static Filter<String> buildRegexFilterIncludeOverExclude(List<String> includeRegexes,
- List<String> excludeRegexes) {
- OrFilter<String> includeFilter = new OrFilter<String>();
- if (includeRegexes != null) {
- for (String includeRegex : includeRegexes) {
- includeFilter.addFilter(new RegexStringFilter(includeRegex));
- }
- }
-
- OrFilter<String> excludeFilter = new OrFilter<String>();
- if (excludeRegexes != null) {
- for (String excludeRegex : excludeRegexes) {
- excludeFilter.addFilter(new RegexStringFilter(excludeRegex));
- }
- }
-
- return new OrFilter<String>(includeFilter, new NotFilter<String>(excludeFilter));
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ + +package net.sourceforge.pmd.util.filter; + +import java.io.File; +import java.io.FilenameFilter; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +/** + * Utility class for working with Filters. Contains builder style methods, + * apply methods, as well as mechanisms for adapting Filters and FilenameFilters. + */ +public class Filters { + + /** + * Filter a given Collection. + * @param <T> Type of the Collection. + * @param filter A Filter upon the Type of objects in the Collection. + * @param collection The Collection to filter. + * @return A List containing only those objects for which the Filter returned <code>true</code>. + */ + public static <T> List<T> filter(Filter<T> filter, Collection<T> collection) { + List<T> list = new ArrayList<T>(); + for (T obj : collection) { + if (filter.filter(obj)) { + list.add(obj); + } + } + return list; + } + + /** + * Get a File Filter for files with the given extensions, ignoring case. + * @param extensions The extensions to filter. + * @return A File Filter. + */ + public static Filter<File> getFileExtensionFilter(String... extensions) { + return new FileExtensionFilter(extensions); + } + + /** + * Get a File Filter for directories. + * @return A File Filter. + */ + public static Filter<File> getDirectoryFilter() { + return DirectoryFilter.INSTANCE; + } + + /** + * Get a File Filter for directories or for files with the given extensions, ignoring case. + * @param extensions The extensions to filter. + * @return A File Filter. + */ + public static Filter<File> getFileExtensionOrDirectoryFilter(String... extensions) { + return new OrFilter<File>(getFileExtensionFilter(extensions), getDirectoryFilter()); + } + + /** + * Given a String Filter, expose as a File Filter. The File paths are + * normalized to a standard pattern using <code>/</code> as a path separator + * which can be used cross platform easily in a regular expression based + * String Filter. + * + * @param filter A String Filter. + * @return A File Filter. + */ + public static Filter<File> toNormalizedFileFilter(final Filter<String> filter) { + return new Filter<File>() { + public boolean filter(File file) { + String path = file.getPath(); + path = path.replace('\\', '/'); + return filter.filter(path); + } + + public String toString() { + return filter.toString(); + } + }; + } + + /** + * Given a String Filter, expose as a Filter on another type. The + * <code>toString()</code> method is called on the objects of the other + * type and delegated to the String Filter. + * @param <T> The desired type. + * @param filter The existing String Filter. + * @return A Filter on the desired type. + */ + public static <T> Filter<T> fromStringFilter(final Filter<String> filter) { + return new Filter<T>() { + public boolean filter(T obj) { + return filter.filter(obj.toString()); + } + + public String toString() { + return filter.toString(); + } + }; + } + + /** + * Given a File Filter, expose as a FilenameFilter. + * @param filter The File Filter. + * @return A FilenameFilter. + */ + public static FilenameFilter toFilenameFilter(final Filter<File> filter) { + return new FilenameFilter() { + public boolean accept(File dir, String name) { + return filter.filter(new File(dir, name)); + } + + public String toString() { + return filter.toString(); + } + }; + } + + /** + * Given a FilenameFilter, expose as a File Filter. + * @param filter The FilenameFilter. + * @return A File Filter. + */ + public static Filter<File> toFileFilter(final FilenameFilter filter) { + return new Filter<File>() { + public boolean filter(File file) { + return filter.accept(file.getParentFile(), file.getName()); + } + + public String toString() { + return filter.toString(); + } + }; + } + + /** + * Construct a String Filter using set of include and exclude regular + * expressions. If there are no include regular expressions provide, then + * a regular expression is added which matches every String by default. + * A String is included as long as it matches an include regular expression + * and does not match an exclude regular expression. + * <p> + * In other words, exclude patterns override include patterns. + * + * @param includeRegexes The include regular expressions. May be <code>null</code>. + * @param excludeRegexes The exclude regular expressions. May be <code>null</code>. + * @return A String Filter. + */ + public static Filter<String> buildRegexFilterExcludeOverInclude(List<String> includeRegexes, + List<String> excludeRegexes) { + OrFilter<String> includeFilter = new OrFilter<String>(); + if (includeRegexes == null || includeRegexes.size() == 0) { + includeFilter.addFilter(new RegexStringFilter(".*")); + } else { + for (String includeRegex : includeRegexes) { + includeFilter.addFilter(new RegexStringFilter(includeRegex)); + } + } + + OrFilter<String> excludeFilter = new OrFilter<String>(); + if (excludeRegexes != null) { + for (String excludeRegex : excludeRegexes) { + excludeFilter.addFilter(new RegexStringFilter(excludeRegex)); + } + } + + return new AndFilter<String>(includeFilter, new NotFilter<String>(excludeFilter)); + } + + /** + * Construct a String Filter using set of include and exclude regular + * expressions. If there are no include regular expressions provide, then + * a regular expression is added which matches every String by default. + * A String is included as long as the case that there is an include which + * matches or there is not an exclude which matches. + * <p> + * In other words, include patterns override exclude patterns. + * + * @param includeRegexes The include regular expressions. May be <code>null</code>. + * @param excludeRegexes The exclude regular expressions. May be <code>null</code>. + * @return A String Filter. + */ + public static Filter<String> buildRegexFilterIncludeOverExclude(List<String> includeRegexes, + List<String> excludeRegexes) { + OrFilter<String> includeFilter = new OrFilter<String>(); + if (includeRegexes != null) { + for (String includeRegex : includeRegexes) { + includeFilter.addFilter(new RegexStringFilter(includeRegex)); + } + } + + OrFilter<String> excludeFilter = new OrFilter<String>(); + if (excludeRegexes != null) { + for (String excludeRegex : excludeRegexes) { + excludeFilter.addFilter(new RegexStringFilter(excludeRegex)); + } + } + + return new OrFilter<String>(includeFilter, new NotFilter<String>(excludeFilter)); + } +} diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/NotFilter.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/NotFilter.java index e82ca332a53..aeb77ce4bbe 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/NotFilter.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/NotFilter.java @@ -1,45 +1,45 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-
-package net.sourceforge.pmd.util.filter;
-
-/**
- * A logical NEGATION of a Filter.
- *
- * @param <T>
- * The underlying type on which the filter applies.
- */
-public class NotFilter<T> extends AbstractDelegateFilter<T> {
- public NotFilter() {
- super();
- }
-
- public NotFilter(Filter<T> filter) {
- super(filter);
- }
-
- public boolean filter(T obj) {
- return !filter.filter(obj);
- }
-
- public String toString() {
- return "not (" + filter + ")";
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ + +package net.sourceforge.pmd.util.filter; + +/** + * A logical NEGATION of a Filter. + * + * @param <T> + * The underlying type on which the filter applies. + */ +public class NotFilter<T> extends AbstractDelegateFilter<T> { + public NotFilter() { + super(); + } + + public NotFilter(Filter<T> filter) { + super(filter); + } + + public boolean filter(T obj) { + return !filter.filter(obj); + } + + public String toString() { + return "not (" + filter + ")"; + } +} diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/OrFilter.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/OrFilter.java index df561b8f011..142d4131b26 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/OrFilter.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/OrFilter.java @@ -1,54 +1,54 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-
-package net.sourceforge.pmd.util.filter;
-
-/**
- * A logical OR of a list of Filters. This implementation is short circuiting.
- *
- * @param <T>
- * The underlying type on which the filter applies.
- */
-public class OrFilter<T> extends AbstractCompoundFilter<T> {
-
- public OrFilter() {
- super();
- }
-
- public OrFilter(Filter<T>... filters) {
- super(filters);
- }
-
- public boolean filter(T obj) {
- boolean match = false;
- for (Filter<T> filter : filters) {
- if (filter.filter(obj)) {
- match = true;
- break;
- }
- }
- return match;
- }
-
- @Override
- protected String getOperator() {
- return "or";
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ + +package net.sourceforge.pmd.util.filter; + +/** + * A logical OR of a list of Filters. This implementation is short circuiting. + * + * @param <T> + * The underlying type on which the filter applies. + */ +public class OrFilter<T> extends AbstractCompoundFilter<T> { + + public OrFilter() { + super(); + } + + public OrFilter(Filter<T>... filters) { + super(filters); + } + + public boolean filter(T obj) { + boolean match = false; + for (Filter<T> filter : filters) { + if (filter.filter(obj)) { + match = true; + break; + } + } + return match; + } + + @Override + protected String getOperator() { + return "or"; + } +} diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/RegexStringFilter.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/RegexStringFilter.java index 7d2615db9ee..b23b202d783 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/RegexStringFilter.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/RegexStringFilter.java @@ -1,60 +1,60 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-
-package net.sourceforge.pmd.util.filter;
-
-import java.util.regex.Pattern;
-
-/**
- * A filter to which uses a regular expression to match upon Strings.
- */
-public class RegexStringFilter implements Filter<String> {
-
- protected String regex;
-
- protected Pattern pattern;
-
- public RegexStringFilter() {
- }
-
- public RegexStringFilter(String regex) {
- this.regex = regex;
- }
-
- public String getRegex() {
- return regex;
- }
-
- public void setRegex(String regex) {
- this.regex = regex;
- this.pattern = null;
- }
-
- public boolean filter(String obj) {
- if (pattern == null) {
- pattern = Pattern.compile(regex);
- }
- return pattern.matcher(obj).matches();
- }
-
- public String toString() {
- return "matches " + regex;
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ + +package net.sourceforge.pmd.util.filter; + +import java.util.regex.Pattern; + +/** + * A filter to which uses a regular expression to match upon Strings. + */ +public class RegexStringFilter implements Filter<String> { + + protected String regex; + + protected Pattern pattern; + + public RegexStringFilter() { + } + + public RegexStringFilter(String regex) { + this.regex = regex; + } + + public String getRegex() { + return regex; + } + + public void setRegex(String regex) { + this.regex = regex; + this.pattern = null; + } + + public boolean filter(String obj) { + if (pattern == null) { + pattern = Pattern.compile(regex); + } + return pattern.matcher(obj).matches(); + } + + public String toString() { + return "matches " + regex; + } +} diff --git a/sonar-duplications/src/main/java/org/sonar/duplications/cpd/CPD.java b/sonar-duplications/src/main/java/org/sonar/duplications/cpd/CPD.java index 7e1319d0cf3..8d193f30b64 100644 --- a/sonar-duplications/src/main/java/org/sonar/duplications/cpd/CPD.java +++ b/sonar-duplications/src/main/java/org/sonar/duplications/cpd/CPD.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/org/sonar/duplications/cpd/CodeLoaderWithoutCache.java b/sonar-duplications/src/main/java/org/sonar/duplications/cpd/CodeLoaderWithoutCache.java index 34339a0a74c..24abfc5ad55 100644 --- a/sonar-duplications/src/main/java/org/sonar/duplications/cpd/CodeLoaderWithoutCache.java +++ b/sonar-duplications/src/main/java/org/sonar/duplications/cpd/CodeLoaderWithoutCache.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/org/sonar/duplications/cpd/FileCodeLoaderWithoutCache.java b/sonar-duplications/src/main/java/org/sonar/duplications/cpd/FileCodeLoaderWithoutCache.java index 738d03e116e..dee15b8e52a 100644 --- a/sonar-duplications/src/main/java/org/sonar/duplications/cpd/FileCodeLoaderWithoutCache.java +++ b/sonar-duplications/src/main/java/org/sonar/duplications/cpd/FileCodeLoaderWithoutCache.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/org/sonar/duplications/cpd/Match.java b/sonar-duplications/src/main/java/org/sonar/duplications/cpd/Match.java index 8d35729b0e5..a4f44aa335a 100644 --- a/sonar-duplications/src/main/java/org/sonar/duplications/cpd/Match.java +++ b/sonar-duplications/src/main/java/org/sonar/duplications/cpd/Match.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/org/sonar/duplications/cpd/MatchAlgorithm.java b/sonar-duplications/src/main/java/org/sonar/duplications/cpd/MatchAlgorithm.java index 80b50751cbb..c94b69fee14 100644 --- a/sonar-duplications/src/main/java/org/sonar/duplications/cpd/MatchAlgorithm.java +++ b/sonar-duplications/src/main/java/org/sonar/duplications/cpd/MatchAlgorithm.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/main/java/org/sonar/duplications/cpd/MatchCollector.java b/sonar-duplications/src/main/java/org/sonar/duplications/cpd/MatchCollector.java index 8f5da22fbf3..219d0b8bd71 100644 --- a/sonar-duplications/src/main/java/org/sonar/duplications/cpd/MatchCollector.java +++ b/sonar-duplications/src/main/java/org/sonar/duplications/cpd/MatchCollector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-duplications/src/test/java/org/sonar/duplications/cpd/CPDTest.java b/sonar-duplications/src/test/java/org/sonar/duplications/cpd/CPDTest.java index b3ea1bf3433..843c58454bd 100644 --- a/sonar-duplications/src/test/java/org/sonar/duplications/cpd/CPDTest.java +++ b/sonar-duplications/src/test/java/org/sonar/duplications/cpd/CPDTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/main/java/org/sonar/graph/Cycle.java b/sonar-graph/src/main/java/org/sonar/graph/Cycle.java index 84353b485d7..0e781641f77 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/Cycle.java +++ b/sonar-graph/src/main/java/org/sonar/graph/Cycle.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/main/java/org/sonar/graph/CycleDetector.java b/sonar-graph/src/main/java/org/sonar/graph/CycleDetector.java index df6062ab5ff..36e263f1c4b 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/CycleDetector.java +++ b/sonar-graph/src/main/java/org/sonar/graph/CycleDetector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/main/java/org/sonar/graph/DirectedGraph.java b/sonar-graph/src/main/java/org/sonar/graph/DirectedGraph.java index 816a01422bc..ff11699877b 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/DirectedGraph.java +++ b/sonar-graph/src/main/java/org/sonar/graph/DirectedGraph.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/main/java/org/sonar/graph/DirectedGraphAccessor.java b/sonar-graph/src/main/java/org/sonar/graph/DirectedGraphAccessor.java index 219adf38222..7c065fa0149 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/DirectedGraphAccessor.java +++ b/sonar-graph/src/main/java/org/sonar/graph/DirectedGraphAccessor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/main/java/org/sonar/graph/Dsm.java b/sonar-graph/src/main/java/org/sonar/graph/Dsm.java index 1c3527d37ca..0c5939a1767 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/Dsm.java +++ b/sonar-graph/src/main/java/org/sonar/graph/Dsm.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/main/java/org/sonar/graph/DsmCell.java b/sonar-graph/src/main/java/org/sonar/graph/DsmCell.java index 0e992922c16..404d31ff5ef 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/DsmCell.java +++ b/sonar-graph/src/main/java/org/sonar/graph/DsmCell.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/main/java/org/sonar/graph/DsmManualSorter.java b/sonar-graph/src/main/java/org/sonar/graph/DsmManualSorter.java index 26069308de8..7124619255f 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/DsmManualSorter.java +++ b/sonar-graph/src/main/java/org/sonar/graph/DsmManualSorter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/main/java/org/sonar/graph/DsmPrinter.java b/sonar-graph/src/main/java/org/sonar/graph/DsmPrinter.java index df36cedb936..7a7d8819808 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/DsmPrinter.java +++ b/sonar-graph/src/main/java/org/sonar/graph/DsmPrinter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/main/java/org/sonar/graph/DsmScanner.java b/sonar-graph/src/main/java/org/sonar/graph/DsmScanner.java index 997d5ce9e94..c69a2708e62 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/DsmScanner.java +++ b/sonar-graph/src/main/java/org/sonar/graph/DsmScanner.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/main/java/org/sonar/graph/DsmTopologicalSorter.java b/sonar-graph/src/main/java/org/sonar/graph/DsmTopologicalSorter.java index 715bf8cba6c..aee2709996b 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/DsmTopologicalSorter.java +++ b/sonar-graph/src/main/java/org/sonar/graph/DsmTopologicalSorter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/main/java/org/sonar/graph/Edge.java b/sonar-graph/src/main/java/org/sonar/graph/Edge.java index 1e627b0cc9b..84f968f3d3b 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/Edge.java +++ b/sonar-graph/src/main/java/org/sonar/graph/Edge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/main/java/org/sonar/graph/EdgeFactory.java b/sonar-graph/src/main/java/org/sonar/graph/EdgeFactory.java index 935315bbd74..06d137fab24 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/EdgeFactory.java +++ b/sonar-graph/src/main/java/org/sonar/graph/EdgeFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/main/java/org/sonar/graph/FeedbackCycle.java b/sonar-graph/src/main/java/org/sonar/graph/FeedbackCycle.java index 618d07feb3e..a23cb74c9f0 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/FeedbackCycle.java +++ b/sonar-graph/src/main/java/org/sonar/graph/FeedbackCycle.java @@ -1,107 +1,107 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-
-package org.sonar.graph;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import com.google.common.collect.HashMultiset;
-import com.google.common.collect.Multiset;
-
-public final class FeedbackCycle implements Iterable<FeedbackEdge>, Comparable<FeedbackCycle> {
-
- private List<FeedbackEdge> orderedFeedbackEdges;
- private int totalOccurrencesOfEdgesInCycle;
- private final Cycle cycle;
-
- private FeedbackCycle(Cycle cycle) {
- orderedFeedbackEdges = new ArrayList<FeedbackEdge>();
- totalOccurrencesOfEdgesInCycle = 0;
- this.cycle = cycle;
- }
-
- private void add(FeedbackEdge feedbackEdge) {
- orderedFeedbackEdges.add(feedbackEdge);
- }
-
- public static List<FeedbackCycle> buildFeedbackCycles(Set<Cycle> cycles) {
- Multiset<Edge> edgesBag = createBagWithAllEdgesOfCycles(cycles);
-
- List<FeedbackCycle> feedbackCycles = new ArrayList<FeedbackCycle>();
- for (Cycle cycle : cycles) {
- FeedbackCycle feedbackCycle = new FeedbackCycle(cycle);
- int totalOccurrences = 0;
- for (Edge edge : cycle.getEdges()) {
- FeedbackEdge feedbackEdge = new FeedbackEdge(edge, edgesBag.count(edge));
- feedbackCycle.add(feedbackEdge);
- totalOccurrences += feedbackEdge.getOccurences();
- }
- feedbackCycle.setTotalOccurrencesOfEdgesInCycle(totalOccurrences);
- Collections.sort(feedbackCycle.orderedFeedbackEdges);
- feedbackCycles.add(feedbackCycle);
- }
- Collections.sort(feedbackCycles);
-
- return feedbackCycles;
- }
-
- private static Multiset<Edge> createBagWithAllEdgesOfCycles(Set<Cycle> cycles) {
- Multiset<Edge> edgesBag = HashMultiset.create();
- for (Cycle cycle : cycles) {
- for (Edge edge : cycle.getEdges()) {
- edgesBag.add(edge);
- }
- }
- return edgesBag;
- }
-
- private void setTotalOccurrencesOfEdgesInCycle(int totalOccurrencesOfEdgesInCycle) {
- this.totalOccurrencesOfEdgesInCycle = totalOccurrencesOfEdgesInCycle;
- }
-
- public int getTotalOccurrencesOfEdgesInCycle() {
- return totalOccurrencesOfEdgesInCycle;
- }
-
- public Iterator<FeedbackEdge> iterator() {
- return orderedFeedbackEdges.iterator();
- }
-
- public int compareTo(FeedbackCycle feedbackCycle) {
- if (getTotalOccurrencesOfEdgesInCycle() < feedbackCycle.getTotalOccurrencesOfEdgesInCycle()) {
- return -1;
- }
- if (getTotalOccurrencesOfEdgesInCycle() == feedbackCycle.getTotalOccurrencesOfEdgesInCycle()) {
- if (cycle.size() == feedbackCycle.cycle.size()) {
- return orderedFeedbackEdges.get(0).compareTo(feedbackCycle.orderedFeedbackEdges.get(0));
- }
- return cycle.size() - feedbackCycle.cycle.size();
- }
- return 1;
- }
-
- public Cycle getCycle() {
- return cycle;
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ + +package org.sonar.graph; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.Set; + +import com.google.common.collect.HashMultiset; +import com.google.common.collect.Multiset; + +public final class FeedbackCycle implements Iterable<FeedbackEdge>, Comparable<FeedbackCycle> { + + private List<FeedbackEdge> orderedFeedbackEdges; + private int totalOccurrencesOfEdgesInCycle; + private final Cycle cycle; + + private FeedbackCycle(Cycle cycle) { + orderedFeedbackEdges = new ArrayList<FeedbackEdge>(); + totalOccurrencesOfEdgesInCycle = 0; + this.cycle = cycle; + } + + private void add(FeedbackEdge feedbackEdge) { + orderedFeedbackEdges.add(feedbackEdge); + } + + public static List<FeedbackCycle> buildFeedbackCycles(Set<Cycle> cycles) { + Multiset<Edge> edgesBag = createBagWithAllEdgesOfCycles(cycles); + + List<FeedbackCycle> feedbackCycles = new ArrayList<FeedbackCycle>(); + for (Cycle cycle : cycles) { + FeedbackCycle feedbackCycle = new FeedbackCycle(cycle); + int totalOccurrences = 0; + for (Edge edge : cycle.getEdges()) { + FeedbackEdge feedbackEdge = new FeedbackEdge(edge, edgesBag.count(edge)); + feedbackCycle.add(feedbackEdge); + totalOccurrences += feedbackEdge.getOccurences(); + } + feedbackCycle.setTotalOccurrencesOfEdgesInCycle(totalOccurrences); + Collections.sort(feedbackCycle.orderedFeedbackEdges); + feedbackCycles.add(feedbackCycle); + } + Collections.sort(feedbackCycles); + + return feedbackCycles; + } + + private static Multiset<Edge> createBagWithAllEdgesOfCycles(Set<Cycle> cycles) { + Multiset<Edge> edgesBag = HashMultiset.create(); + for (Cycle cycle : cycles) { + for (Edge edge : cycle.getEdges()) { + edgesBag.add(edge); + } + } + return edgesBag; + } + + private void setTotalOccurrencesOfEdgesInCycle(int totalOccurrencesOfEdgesInCycle) { + this.totalOccurrencesOfEdgesInCycle = totalOccurrencesOfEdgesInCycle; + } + + public int getTotalOccurrencesOfEdgesInCycle() { + return totalOccurrencesOfEdgesInCycle; + } + + public Iterator<FeedbackEdge> iterator() { + return orderedFeedbackEdges.iterator(); + } + + public int compareTo(FeedbackCycle feedbackCycle) { + if (getTotalOccurrencesOfEdgesInCycle() < feedbackCycle.getTotalOccurrencesOfEdgesInCycle()) { + return -1; + } + if (getTotalOccurrencesOfEdgesInCycle() == feedbackCycle.getTotalOccurrencesOfEdgesInCycle()) { + if (cycle.size() == feedbackCycle.cycle.size()) { + return orderedFeedbackEdges.get(0).compareTo(feedbackCycle.orderedFeedbackEdges.get(0)); + } + return cycle.size() - feedbackCycle.cycle.size(); + } + return 1; + } + + public Cycle getCycle() { + return cycle; + } +} diff --git a/sonar-graph/src/main/java/org/sonar/graph/FeedbackEdge.java b/sonar-graph/src/main/java/org/sonar/graph/FeedbackEdge.java index 53fe8918583..60e60fc4cc6 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/FeedbackEdge.java +++ b/sonar-graph/src/main/java/org/sonar/graph/FeedbackEdge.java @@ -1,75 +1,75 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.graph;
-
-public class FeedbackEdge implements Comparable<FeedbackEdge> {
-
- private Edge edge;
- private double relativeWeight;
- private int occurences;
- private final int hashcode;
-
- public FeedbackEdge(Edge edge, int occurences) {
- this.edge = edge;
- this.hashcode = edge.hashCode();
- this.occurences = occurences;
- this.relativeWeight = (double) edge.getWeight() / occurences;
- }
-
- protected Edge getEdge() {
- return edge;
- }
-
- protected int getWeight() {
- return edge.getWeight();
- }
-
- protected double getRelativeWeight() {
- return relativeWeight;
- }
-
- protected int getOccurences() {
- return occurences;
- }
-
- public int compareTo(FeedbackEdge feedbackEdge) {
- if (this.getRelativeWeight() < feedbackEdge.getRelativeWeight()) {
- return -1;
- }
- if (this.getRelativeWeight() == feedbackEdge.getRelativeWeight()) {
- return this.getEdge().getFrom().toString().compareTo(feedbackEdge.getEdge().getFrom().toString());
- }
- return 1;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (!(obj instanceof FeedbackEdge) || this.hashCode() != obj.hashCode()) {
- return false;
- }
- FeedbackEdge otherEdge = (FeedbackEdge) obj;
- return edge.equals(otherEdge.edge);
- }
-
- @Override
- public int hashCode() {
- return hashcode;
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.graph; + +public class FeedbackEdge implements Comparable<FeedbackEdge> { + + private Edge edge; + private double relativeWeight; + private int occurences; + private final int hashcode; + + public FeedbackEdge(Edge edge, int occurences) { + this.edge = edge; + this.hashcode = edge.hashCode(); + this.occurences = occurences; + this.relativeWeight = (double) edge.getWeight() / occurences; + } + + protected Edge getEdge() { + return edge; + } + + protected int getWeight() { + return edge.getWeight(); + } + + protected double getRelativeWeight() { + return relativeWeight; + } + + protected int getOccurences() { + return occurences; + } + + public int compareTo(FeedbackEdge feedbackEdge) { + if (this.getRelativeWeight() < feedbackEdge.getRelativeWeight()) { + return -1; + } + if (this.getRelativeWeight() == feedbackEdge.getRelativeWeight()) { + return this.getEdge().getFrom().toString().compareTo(feedbackEdge.getEdge().getFrom().toString()); + } + return 1; + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof FeedbackEdge) || this.hashCode() != obj.hashCode()) { + return false; + } + FeedbackEdge otherEdge = (FeedbackEdge) obj; + return edge.equals(otherEdge.edge); + } + + @Override + public int hashCode() { + return hashcode; + } +} diff --git a/sonar-graph/src/main/java/org/sonar/graph/IncrementalCyclesAndFESSolver.java b/sonar-graph/src/main/java/org/sonar/graph/IncrementalCyclesAndFESSolver.java index 3fde2eaa2e8..051cdc92f1d 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/IncrementalCyclesAndFESSolver.java +++ b/sonar-graph/src/main/java/org/sonar/graph/IncrementalCyclesAndFESSolver.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/main/java/org/sonar/graph/MinimumFeedbackEdgeSetSolver.java b/sonar-graph/src/main/java/org/sonar/graph/MinimumFeedbackEdgeSetSolver.java index 2c27caad174..a37c358188b 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/MinimumFeedbackEdgeSetSolver.java +++ b/sonar-graph/src/main/java/org/sonar/graph/MinimumFeedbackEdgeSetSolver.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/main/java/org/sonar/graph/StringEdge.java b/sonar-graph/src/main/java/org/sonar/graph/StringEdge.java index bd11d99adfd..97b773ea330 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/StringEdge.java +++ b/sonar-graph/src/main/java/org/sonar/graph/StringEdge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/main/java/org/sonar/graph/StringEdgeFactory.java b/sonar-graph/src/main/java/org/sonar/graph/StringEdgeFactory.java index c576b5a47ef..c3b44890943 100644 --- a/sonar-graph/src/main/java/org/sonar/graph/StringEdgeFactory.java +++ b/sonar-graph/src/main/java/org/sonar/graph/StringEdgeFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/test/java/org/sonar/graph/CycleDetectorTest.java b/sonar-graph/src/test/java/org/sonar/graph/CycleDetectorTest.java index dd010d64d4b..7ca0fd8747d 100644 --- a/sonar-graph/src/test/java/org/sonar/graph/CycleDetectorTest.java +++ b/sonar-graph/src/test/java/org/sonar/graph/CycleDetectorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/test/java/org/sonar/graph/CycleTest.java b/sonar-graph/src/test/java/org/sonar/graph/CycleTest.java index a42366abbab..4b666acb4c2 100644 --- a/sonar-graph/src/test/java/org/sonar/graph/CycleTest.java +++ b/sonar-graph/src/test/java/org/sonar/graph/CycleTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/test/java/org/sonar/graph/DirectedGraphTest.java b/sonar-graph/src/test/java/org/sonar/graph/DirectedGraphTest.java index 0abcb4c9af2..3e7b9a117a1 100644 --- a/sonar-graph/src/test/java/org/sonar/graph/DirectedGraphTest.java +++ b/sonar-graph/src/test/java/org/sonar/graph/DirectedGraphTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/test/java/org/sonar/graph/DsmCellTest.java b/sonar-graph/src/test/java/org/sonar/graph/DsmCellTest.java index 12069d2dc88..24fd45df840 100644 --- a/sonar-graph/src/test/java/org/sonar/graph/DsmCellTest.java +++ b/sonar-graph/src/test/java/org/sonar/graph/DsmCellTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/test/java/org/sonar/graph/DsmManualSorterTest.java b/sonar-graph/src/test/java/org/sonar/graph/DsmManualSorterTest.java index 617abe383f6..8d57aacfc0e 100644 --- a/sonar-graph/src/test/java/org/sonar/graph/DsmManualSorterTest.java +++ b/sonar-graph/src/test/java/org/sonar/graph/DsmManualSorterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/test/java/org/sonar/graph/DsmPrinterTest.java b/sonar-graph/src/test/java/org/sonar/graph/DsmPrinterTest.java index 55e8de64de6..40d2d22c18e 100644 --- a/sonar-graph/src/test/java/org/sonar/graph/DsmPrinterTest.java +++ b/sonar-graph/src/test/java/org/sonar/graph/DsmPrinterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/test/java/org/sonar/graph/DsmScannerTest.java b/sonar-graph/src/test/java/org/sonar/graph/DsmScannerTest.java index 1d9df9239d4..9efb36566aa 100644 --- a/sonar-graph/src/test/java/org/sonar/graph/DsmScannerTest.java +++ b/sonar-graph/src/test/java/org/sonar/graph/DsmScannerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/test/java/org/sonar/graph/DsmTest.java b/sonar-graph/src/test/java/org/sonar/graph/DsmTest.java index 06fbcba4160..c070457ee0c 100644 --- a/sonar-graph/src/test/java/org/sonar/graph/DsmTest.java +++ b/sonar-graph/src/test/java/org/sonar/graph/DsmTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/test/java/org/sonar/graph/DsmTopologicalSorterTest.java b/sonar-graph/src/test/java/org/sonar/graph/DsmTopologicalSorterTest.java index f017d32dc23..2a67b72cd9f 100644 --- a/sonar-graph/src/test/java/org/sonar/graph/DsmTopologicalSorterTest.java +++ b/sonar-graph/src/test/java/org/sonar/graph/DsmTopologicalSorterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/test/java/org/sonar/graph/FeedbackCycleTest.java b/sonar-graph/src/test/java/org/sonar/graph/FeedbackCycleTest.java index ea3ee61fe69..6a63b04ac67 100644 --- a/sonar-graph/src/test/java/org/sonar/graph/FeedbackCycleTest.java +++ b/sonar-graph/src/test/java/org/sonar/graph/FeedbackCycleTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/test/java/org/sonar/graph/FeedbackEdgeTest.java b/sonar-graph/src/test/java/org/sonar/graph/FeedbackEdgeTest.java index 67ba883635b..f865db73c44 100644 --- a/sonar-graph/src/test/java/org/sonar/graph/FeedbackEdgeTest.java +++ b/sonar-graph/src/test/java/org/sonar/graph/FeedbackEdgeTest.java @@ -1,81 +1,81 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.graph;
-
-import org.junit.Test;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.greaterThan;
-import static org.hamcrest.Matchers.is;
-
-public class FeedbackEdgeTest {
-
- @Test
- public void testWeights() {
- FeedbackEdge fEdge = mockFeedbackEdge(14, 2);
- assertThat(fEdge.getWeight(), is(14));
- assertThat(fEdge.getRelativeWeight(), is(7.0));
- assertThat(fEdge.getOccurences(), is(2));
- }
-
- @Test
- public void testCompareTo() {
- FeedbackEdge feedbackEdge1;
- FeedbackEdge feedbackEdge2;
- FeedbackEdge feedbackEdge3;
-
- feedbackEdge1 = mockFeedbackEdge(14, 2);
- feedbackEdge2 = mockFeedbackEdge(10, 2);
- assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(1));
-
- feedbackEdge1 = mockFeedbackEdge(10, 2);
- feedbackEdge2 = mockFeedbackEdge(14, 2);
- assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(-1));
-
- feedbackEdge1 = mockFeedbackEdge(14, 2);
- feedbackEdge2 = mockFeedbackEdge(14, 2);
- assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(0));
-
- feedbackEdge1 = mockFeedbackEdge(14, 2);
- feedbackEdge2 = mockFeedbackEdge(13, 2);
- assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(1));
-
- feedbackEdge1 = mockFeedbackEdge(13, 2);
- feedbackEdge2 = mockFeedbackEdge(14, 2);
- assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(-1));
-
- feedbackEdge1 = mockFeedbackEdge("A", "B", 14, 2);
- feedbackEdge2 = mockFeedbackEdge("B", "C", 14, 2);
- feedbackEdge3 = mockFeedbackEdge("C", "A", 14, 2);
- assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(-1));
- assertThat(feedbackEdge2.compareTo(feedbackEdge3), is(-1));
- assertThat(feedbackEdge3.compareTo(feedbackEdge1), greaterThan(1));
- }
-
- private FeedbackEdge mockFeedbackEdge(int weight, int occurrences) {
- return mockFeedbackEdge("from", "to", weight, occurrences);
- }
-
- private FeedbackEdge mockFeedbackEdge(String from, String to, int weight, int occurrences) {
- Edge edge = new StringEdge(from, to, weight);
- return new FeedbackEdge(edge, occurrences);
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.graph; + +import org.junit.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.greaterThan; +import static org.hamcrest.Matchers.is; + +public class FeedbackEdgeTest { + + @Test + public void testWeights() { + FeedbackEdge fEdge = mockFeedbackEdge(14, 2); + assertThat(fEdge.getWeight(), is(14)); + assertThat(fEdge.getRelativeWeight(), is(7.0)); + assertThat(fEdge.getOccurences(), is(2)); + } + + @Test + public void testCompareTo() { + FeedbackEdge feedbackEdge1; + FeedbackEdge feedbackEdge2; + FeedbackEdge feedbackEdge3; + + feedbackEdge1 = mockFeedbackEdge(14, 2); + feedbackEdge2 = mockFeedbackEdge(10, 2); + assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(1)); + + feedbackEdge1 = mockFeedbackEdge(10, 2); + feedbackEdge2 = mockFeedbackEdge(14, 2); + assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(-1)); + + feedbackEdge1 = mockFeedbackEdge(14, 2); + feedbackEdge2 = mockFeedbackEdge(14, 2); + assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(0)); + + feedbackEdge1 = mockFeedbackEdge(14, 2); + feedbackEdge2 = mockFeedbackEdge(13, 2); + assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(1)); + + feedbackEdge1 = mockFeedbackEdge(13, 2); + feedbackEdge2 = mockFeedbackEdge(14, 2); + assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(-1)); + + feedbackEdge1 = mockFeedbackEdge("A", "B", 14, 2); + feedbackEdge2 = mockFeedbackEdge("B", "C", 14, 2); + feedbackEdge3 = mockFeedbackEdge("C", "A", 14, 2); + assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(-1)); + assertThat(feedbackEdge2.compareTo(feedbackEdge3), is(-1)); + assertThat(feedbackEdge3.compareTo(feedbackEdge1), greaterThan(1)); + } + + private FeedbackEdge mockFeedbackEdge(int weight, int occurrences) { + return mockFeedbackEdge("from", "to", weight, occurrences); + } + + private FeedbackEdge mockFeedbackEdge(String from, String to, int weight, int occurrences) { + Edge edge = new StringEdge(from, to, weight); + return new FeedbackEdge(edge, occurrences); + } + +} diff --git a/sonar-graph/src/test/java/org/sonar/graph/IncrementalCyclesAndFESSolverTest.java b/sonar-graph/src/test/java/org/sonar/graph/IncrementalCyclesAndFESSolverTest.java index 3b11829819c..d9a9e4b58f3 100644 --- a/sonar-graph/src/test/java/org/sonar/graph/IncrementalCyclesAndFESSolverTest.java +++ b/sonar-graph/src/test/java/org/sonar/graph/IncrementalCyclesAndFESSolverTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/test/java/org/sonar/graph/MinimumFeedbackEdgeSetSolverTest.java b/sonar-graph/src/test/java/org/sonar/graph/MinimumFeedbackEdgeSetSolverTest.java index 704b8f83402..b20683d45c0 100644 --- a/sonar-graph/src/test/java/org/sonar/graph/MinimumFeedbackEdgeSetSolverTest.java +++ b/sonar-graph/src/test/java/org/sonar/graph/MinimumFeedbackEdgeSetSolverTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-graph/src/test/java/org/sonar/graph/StringPrintWriter.java b/sonar-graph/src/test/java/org/sonar/graph/StringPrintWriter.java index 3beddf48215..e76a21403b2 100644 --- a/sonar-graph/src/test/java/org/sonar/graph/StringPrintWriter.java +++ b/sonar-graph/src/test/java/org/sonar/graph/StringPrintWriter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-gwt-api/src/main/java/org/sonar/gwt/Configuration.java b/sonar-gwt-api/src/main/java/org/sonar/gwt/Configuration.java index 87b8cae5eab..57e7fcb2076 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/gwt/Configuration.java +++ b/sonar-gwt-api/src/main/java/org/sonar/gwt/Configuration.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-gwt-api/src/main/java/org/sonar/gwt/JsonUtils.java b/sonar-gwt-api/src/main/java/org/sonar/gwt/JsonUtils.java index d3aee0fa49c..1fc95177240 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/gwt/JsonUtils.java +++ b/sonar-gwt-api/src/main/java/org/sonar/gwt/JsonUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-gwt-api/src/main/java/org/sonar/gwt/Links.java b/sonar-gwt-api/src/main/java/org/sonar/gwt/Links.java index 9ec02ad65cf..b25d6feb051 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/gwt/Links.java +++ b/sonar-gwt-api/src/main/java/org/sonar/gwt/Links.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-gwt-api/src/main/java/org/sonar/gwt/Metrics.java b/sonar-gwt-api/src/main/java/org/sonar/gwt/Metrics.java index fad2bf18671..b8e7459b2a8 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/gwt/Metrics.java +++ b/sonar-gwt-api/src/main/java/org/sonar/gwt/Metrics.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-gwt-api/src/main/java/org/sonar/gwt/Utils.java b/sonar-gwt-api/src/main/java/org/sonar/gwt/Utils.java index ab28ae0ce2f..8b9399cd05c 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/gwt/Utils.java +++ b/sonar-gwt-api/src/main/java/org/sonar/gwt/Utils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/DefaultSourcePanel.java b/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/DefaultSourcePanel.java index ef7b4ece17b..7e528abebf1 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/DefaultSourcePanel.java +++ b/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/DefaultSourcePanel.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/ExpandCollapseLink.java b/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/ExpandCollapseLink.java index 3c83903ab7f..b2ffcb965c6 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/ExpandCollapseLink.java +++ b/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/ExpandCollapseLink.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/Icons.java b/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/Icons.java index 1f26758cb0f..3f4d3a99c2c 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/Icons.java +++ b/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/Icons.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/Loading.java b/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/Loading.java index fcd516fa556..f77463e8554 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/Loading.java +++ b/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/Loading.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/Page.java b/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/Page.java index ccd7ad4ed04..297fd6ffbc7 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/Page.java +++ b/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/Page.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/SourcePanel.java b/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/SourcePanel.java index 00f62b6e004..5bbf8f98f28 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/SourcePanel.java +++ b/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/SourcePanel.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/ViewerHeader.java b/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/ViewerHeader.java index 585b55e6bd9..10e9f811224 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/ViewerHeader.java +++ b/sonar-gwt-api/src/main/java/org/sonar/gwt/ui/ViewerHeader.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/AbstractCallback.java b/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/AbstractCallback.java index 853bc0aaedf..9c3bfcb47ec 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/AbstractCallback.java +++ b/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/AbstractCallback.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/AbstractListCallback.java b/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/AbstractListCallback.java index 2e87908be2f..deb58092632 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/AbstractListCallback.java +++ b/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/AbstractListCallback.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/Callback.java b/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/Callback.java index 35876a99bdc..78eddc6ba51 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/Callback.java +++ b/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/Callback.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/GwtUtils.java b/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/GwtUtils.java index ddeeb92d990..89f09c9e586 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/GwtUtils.java +++ b/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/GwtUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/ListCallback.java b/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/ListCallback.java index 9cea18f39c6..1426e4abb70 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/ListCallback.java +++ b/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/ListCallback.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/Sonar.java b/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/Sonar.java index 916b086d01a..b3fd1eac6bb 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/Sonar.java +++ b/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/Sonar.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-java-api/src/main/java/org/sonar/java/api/JavaClass.java b/sonar-java-api/src/main/java/org/sonar/java/api/JavaClass.java index d482c3d8bb2..59f046bf6ff 100644 --- a/sonar-java-api/src/main/java/org/sonar/java/api/JavaClass.java +++ b/sonar-java-api/src/main/java/org/sonar/java/api/JavaClass.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-java-api/src/main/java/org/sonar/java/api/JavaMethod.java b/sonar-java-api/src/main/java/org/sonar/java/api/JavaMethod.java index ce7eb14fe8b..65c478a49b7 100644 --- a/sonar-java-api/src/main/java/org/sonar/java/api/JavaMethod.java +++ b/sonar-java-api/src/main/java/org/sonar/java/api/JavaMethod.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-java-api/src/main/java/org/sonar/java/api/JavaUtils.java b/sonar-java-api/src/main/java/org/sonar/java/api/JavaUtils.java index abbc8a5fa48..b3cc844574b 100644 --- a/sonar-java-api/src/main/java/org/sonar/java/api/JavaUtils.java +++ b/sonar-java-api/src/main/java/org/sonar/java/api/JavaUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-java-api/src/test/java/org/sonar/java/api/JavaClassTest.java b/sonar-java-api/src/test/java/org/sonar/java/api/JavaClassTest.java index 92eba48740a..6ce1430a1c2 100644 --- a/sonar-java-api/src/test/java/org/sonar/java/api/JavaClassTest.java +++ b/sonar-java-api/src/test/java/org/sonar/java/api/JavaClassTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-java-api/src/test/java/org/sonar/java/api/JavaMethodTest.java b/sonar-java-api/src/test/java/org/sonar/java/api/JavaMethodTest.java index fad1e992dfe..46bfdc5c0f2 100644 --- a/sonar-java-api/src/test/java/org/sonar/java/api/JavaMethodTest.java +++ b/sonar-java-api/src/test/java/org/sonar/java/api/JavaMethodTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-java-api/src/test/java/org/sonar/java/api/JavaUtilsTest.java b/sonar-java-api/src/test/java/org/sonar/java/api/JavaUtilsTest.java index f98853e5306..5cf2aecc0ea 100644 --- a/sonar-java-api/src/test/java/org/sonar/java/api/JavaUtilsTest.java +++ b/sonar-java-api/src/test/java/org/sonar/java/api/JavaUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-maven-plugin/src/main/java/org/sonar/maven/Maven2PluginExecutor.java b/sonar-maven-plugin/src/main/java/org/sonar/maven/Maven2PluginExecutor.java index c39c4ebedd2..4ff6247343a 100644 --- a/sonar-maven-plugin/src/main/java/org/sonar/maven/Maven2PluginExecutor.java +++ b/sonar-maven-plugin/src/main/java/org/sonar/maven/Maven2PluginExecutor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-maven-plugin/src/main/java/org/sonar/maven/SonarMojo.java b/sonar-maven-plugin/src/main/java/org/sonar/maven/SonarMojo.java index 51dd2a82d0e..e78939fc39b 100644 --- a/sonar-maven-plugin/src/main/java/org/sonar/maven/SonarMojo.java +++ b/sonar-maven-plugin/src/main/java/org/sonar/maven/SonarMojo.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-maven3-plugin/src/main/java/org/sonar/maven3/Maven3PluginExecutor.java b/sonar-maven3-plugin/src/main/java/org/sonar/maven3/Maven3PluginExecutor.java index 31fdb5f875b..b0db20a47c6 100644 --- a/sonar-maven3-plugin/src/main/java/org/sonar/maven3/Maven3PluginExecutor.java +++ b/sonar-maven3-plugin/src/main/java/org/sonar/maven3/Maven3PluginExecutor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-maven3-plugin/src/main/java/org/sonar/maven3/SonarMojo.java b/sonar-maven3-plugin/src/main/java/org/sonar/maven3/SonarMojo.java index 8c9b821722a..058bc886253 100644 --- a/sonar-maven3-plugin/src/main/java/org/sonar/maven3/SonarMojo.java +++ b/sonar-maven3-plugin/src/main/java/org/sonar/maven3/SonarMojo.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/BatchComponent.java b/sonar-plugin-api/src/main/java/org/sonar/api/BatchComponent.java index d42f4c5f87a..b4e3d30236a 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/BatchComponent.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/BatchComponent.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/BatchExtension.java b/sonar-plugin-api/src/main/java/org/sonar/api/BatchExtension.java index 45d4d79909a..ac4cf9a94f4 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/BatchExtension.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/BatchExtension.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java index f8a64be0113..9bdd1c3218d 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/Extension.java b/sonar-plugin-api/src/main/java/org/sonar/api/Extension.java index 5bcd1700101..36e7e7a65a8 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/Extension.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/Extension.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/ExtensionProvider.java b/sonar-plugin-api/src/main/java/org/sonar/api/ExtensionProvider.java index 8e295d94aa6..9608a5d96ac 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/ExtensionProvider.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/ExtensionProvider.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java b/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java index 5038b9a714d..70330026e16 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java @@ -1,61 +1,61 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api;
-
-import java.util.List;
-
-/**
- * A plugin is a group of extensions. See <code>org.sonar.api.Extension</code> interface to get all extension points.
- * <p/>
- * <p>The manifest property <code>Plugin-Class</code> must declare the name of the implementation class.
- * See META-INF/MANIFEST.MF.</p>
- *
- * @see org.sonar.api.Extension
- * @since 1.10
- */
-public interface Plugin {
-
- /**
- * Unique key within sonar plugins
- * @deprecated since 2.2. The key must be set in the manifest.
- */
- @Deprecated
- String getKey();
-
- /**
- * Descriptive name
- * @deprecated since 2.2. The name must be set in the manifest.
- */
- @Deprecated
- String getName();
-
- /**
- * description of the plugin, can contains html or ruby code
- * @deprecated since 2.2. The description must be set in the manifest.
- */
- @Deprecated
- String getDescription();
-
- /**
- * Classes of the implemented extensions.
- */
- List getExtensions();
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api; + +import java.util.List; + +/** + * A plugin is a group of extensions. See <code>org.sonar.api.Extension</code> interface to get all extension points. + * <p/> + * <p>The manifest property <code>Plugin-Class</code> must declare the name of the implementation class. + * See META-INF/MANIFEST.MF.</p> + * + * @see org.sonar.api.Extension + * @since 1.10 + */ +public interface Plugin { + + /** + * Unique key within sonar plugins + * @deprecated since 2.2. The key must be set in the manifest. + */ + @Deprecated + String getKey(); + + /** + * Descriptive name + * @deprecated since 2.2. The name must be set in the manifest. + */ + @Deprecated + String getName(); + + /** + * description of the plugin, can contains html or ruby code + * @deprecated since 2.2. The description must be set in the manifest. + */ + @Deprecated + String getDescription(); + + /** + * Classes of the implemented extensions. + */ + List getExtensions(); + +} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/Plugins.java b/sonar-plugin-api/src/main/java/org/sonar/api/Plugins.java index 28f5d0a22d9..774d7200fc2 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/Plugins.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/Plugins.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/Properties.java b/sonar-plugin-api/src/main/java/org/sonar/api/Properties.java index eef5ee38a4e..7e08e7ff699 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/Properties.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/Properties.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/Property.java b/sonar-plugin-api/src/main/java/org/sonar/api/Property.java index fe034f36a40..b71fe2af2d4 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/Property.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/Property.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/ServerComponent.java b/sonar-plugin-api/src/main/java/org/sonar/api/ServerComponent.java index 6d7a2ed5699..0c35e475bad 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/ServerComponent.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/ServerComponent.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/ServerExtension.java b/sonar-plugin-api/src/main/java/org/sonar/api/ServerExtension.java index e5df1676933..e947f1fd78e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/ServerExtension.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/ServerExtension.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractCoverageExtension.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractCoverageExtension.java index 0045af529b5..8eef4cc57a7 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractCoverageExtension.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractCoverageExtension.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractCpdMapping.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractCpdMapping.java index 552a9e7856d..05fa66cfce6 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractCpdMapping.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractCpdMapping.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractDirectoriesDecorator.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractDirectoriesDecorator.java index 7ba2f877974..df91617c705 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractDirectoriesDecorator.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractDirectoriesDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractDivisionDecorator.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractDivisionDecorator.java index 303be1f6ab6..87d22a23754 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractDivisionDecorator.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractDivisionDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFileComplexityDecorator.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFileComplexityDecorator.java index b20016abef4..3e57f9a91be 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFileComplexityDecorator.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFileComplexityDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFilesDecorator.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFilesDecorator.java index 8c64927a433..27ca7d1b36f 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFilesDecorator.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFilesDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFunctionComplexityDecorator.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFunctionComplexityDecorator.java index 2406a8868c0..4172b02a072 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFunctionComplexityDecorator.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFunctionComplexityDecorator.java @@ -1,88 +1,88 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.batch;
-
-import org.sonar.api.measures.CoreMetrics;
-import org.sonar.api.measures.MeasureUtils;
-import org.sonar.api.measures.Metric;
-import org.sonar.api.resources.Language;
-import org.sonar.api.resources.Project;
-import org.sonar.api.resources.Resource;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * @deprecated since 2.1, a formula has been implemented on the metric, so no need to have decorator anymore
- * @since 1.13
- */
-@Deprecated
-public abstract class AbstractFunctionComplexityDecorator implements Decorator {
-
- private Language language;
-
- /**
- * @param language this will be use to defined whether the decorator should be executed on a project
- */
- public AbstractFunctionComplexityDecorator(Language language) {
- this.language = language;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean shouldExecuteOnProject(Project project) {
- return language.equals(project.getLanguage());
- }
-
- /**
- * Used to define upstream dependencies
- */
- @DependsUpon
- public List<Metric> dependsUponFileAndComplexityMetrics() {
- return Arrays.asList(CoreMetrics.FUNCTIONS, CoreMetrics.COMPLEXITY);
- }
-
- /**
- * Used to define downstream dependencies
- */
- @DependedUpon
- public Metric generateFileComplexityMetric() {
- return CoreMetrics.FUNCTION_COMPLEXITY;
- }
-
- /**
- * {@inheritDoc}
- */
- public void decorate(Resource resource, DecoratorContext context) {
- if (!shouldDecorateResource(resource, context)) {
- return;
- }
- Double functions = MeasureUtils.getValue(context.getMeasure(CoreMetrics.FUNCTIONS), null);
- Double complexity = MeasureUtils.getValue(context.getMeasure(CoreMetrics.COMPLEXITY), null);
- if (complexity != null && functions != null && functions > 0.0) {
- context.saveMeasure(CoreMetrics.FUNCTION_COMPLEXITY, complexity / functions);
- }
- }
-
- private boolean shouldDecorateResource(Resource resource, DecoratorContext context) {
- return !MeasureUtils.hasValue(context.getMeasure(CoreMetrics.FUNCTION_COMPLEXITY));
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.batch; + +import org.sonar.api.measures.CoreMetrics; +import org.sonar.api.measures.MeasureUtils; +import org.sonar.api.measures.Metric; +import org.sonar.api.resources.Language; +import org.sonar.api.resources.Project; +import org.sonar.api.resources.Resource; + +import java.util.Arrays; +import java.util.List; + +/** + * @deprecated since 2.1, a formula has been implemented on the metric, so no need to have decorator anymore + * @since 1.13 + */ +@Deprecated +public abstract class AbstractFunctionComplexityDecorator implements Decorator { + + private Language language; + + /** + * @param language this will be use to defined whether the decorator should be executed on a project + */ + public AbstractFunctionComplexityDecorator(Language language) { + this.language = language; + } + + /** + * {@inheritDoc} + */ + public boolean shouldExecuteOnProject(Project project) { + return language.equals(project.getLanguage()); + } + + /** + * Used to define upstream dependencies + */ + @DependsUpon + public List<Metric> dependsUponFileAndComplexityMetrics() { + return Arrays.asList(CoreMetrics.FUNCTIONS, CoreMetrics.COMPLEXITY); + } + + /** + * Used to define downstream dependencies + */ + @DependedUpon + public Metric generateFileComplexityMetric() { + return CoreMetrics.FUNCTION_COMPLEXITY; + } + + /** + * {@inheritDoc} + */ + public void decorate(Resource resource, DecoratorContext context) { + if (!shouldDecorateResource(resource, context)) { + return; + } + Double functions = MeasureUtils.getValue(context.getMeasure(CoreMetrics.FUNCTIONS), null); + Double complexity = MeasureUtils.getValue(context.getMeasure(CoreMetrics.COMPLEXITY), null); + if (complexity != null && functions != null && functions > 0.0) { + context.saveMeasure(CoreMetrics.FUNCTION_COMPLEXITY, complexity / functions); + } + } + + private boolean shouldDecorateResource(Resource resource, DecoratorContext context) { + return !MeasureUtils.hasValue(context.getMeasure(CoreMetrics.FUNCTION_COMPLEXITY)); + } +} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFunctionComplexityDistributionDecorator.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFunctionComplexityDistributionDecorator.java index 6ea9adeefeb..f2d2285121b 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFunctionComplexityDistributionDecorator.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFunctionComplexityDistributionDecorator.java @@ -1,83 +1,83 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-
-package org.sonar.api.batch;
-
-import org.sonar.api.measures.CoreMetrics;
-import org.sonar.api.measures.CountDistributionBuilder;
-import org.sonar.api.measures.Measure;
-import org.sonar.api.measures.Metric;
-import org.sonar.api.resources.Language;
-import org.sonar.api.resources.Project;
-import org.sonar.api.resources.Resource;
-
-/**
- * @deprecated since 2.1, a formula has been implemented on the metric, so no need to have decorator anymore
- * @since 2.0
- */
-@Deprecated
-public abstract class AbstractFunctionComplexityDistributionDecorator implements Decorator {
-
- private CountDistributionBuilder builder = new CountDistributionBuilder(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION);
- private Language language;
-
- public AbstractFunctionComplexityDistributionDecorator(Language language) {
- this.language = language;
- }
-
- @DependedUpon
- public Metric generatesMetrics() {
- return CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION;
- }
-
- public boolean shouldExecuteOnProject(Project project) {
- return language.equals(project.getLanguage());
- }
-
- public void decorate(Resource resource, DecoratorContext context) {
- if (shouldDecorateResource(context)) {
- reset();
- saveDistribution(context);
- }
- }
-
- private void saveDistribution(DecoratorContext context) {
- for (Measure childMeasure : context.getChildrenMeasures(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION)) {
- builder.add(childMeasure);
- }
-
- if (!builder.isEmpty()) {
- context.saveMeasure(builder.build());
- }
- }
-
- private void reset() {
- builder.clear();
- }
-
- private boolean shouldDecorateResource(DecoratorContext context) {
- return context.getMeasure(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION) == null;
- }
-
- @Override
- public String toString() {
- return getClass().getSimpleName();
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ + +package org.sonar.api.batch; + +import org.sonar.api.measures.CoreMetrics; +import org.sonar.api.measures.CountDistributionBuilder; +import org.sonar.api.measures.Measure; +import org.sonar.api.measures.Metric; +import org.sonar.api.resources.Language; +import org.sonar.api.resources.Project; +import org.sonar.api.resources.Resource; + +/** + * @deprecated since 2.1, a formula has been implemented on the metric, so no need to have decorator anymore + * @since 2.0 + */ +@Deprecated +public abstract class AbstractFunctionComplexityDistributionDecorator implements Decorator { + + private CountDistributionBuilder builder = new CountDistributionBuilder(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION); + private Language language; + + public AbstractFunctionComplexityDistributionDecorator(Language language) { + this.language = language; + } + + @DependedUpon + public Metric generatesMetrics() { + return CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION; + } + + public boolean shouldExecuteOnProject(Project project) { + return language.equals(project.getLanguage()); + } + + public void decorate(Resource resource, DecoratorContext context) { + if (shouldDecorateResource(context)) { + reset(); + saveDistribution(context); + } + } + + private void saveDistribution(DecoratorContext context) { + for (Measure childMeasure : context.getChildrenMeasures(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION)) { + builder.add(childMeasure); + } + + if (!builder.isEmpty()) { + context.saveMeasure(builder.build()); + } + } + + private void reset() { + builder.clear(); + } + + private boolean shouldDecorateResource(DecoratorContext context) { + return context.getMeasure(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION) == null; + } + + @Override + public String toString() { + return getClass().getSimpleName(); + } +} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractSourceImporter.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractSourceImporter.java index 0c796b83ec0..8adbf97d8ed 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractSourceImporter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractSourceImporter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractSumChildrenDecorator.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractSumChildrenDecorator.java index 0bf31ec6289..2dc603c13df 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractSumChildrenDecorator.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractSumChildrenDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/BatchExtensionDictionnary.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/BatchExtensionDictionnary.java index 1f88ae1e07a..806323bbdfb 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/BatchExtensionDictionnary.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/BatchExtensionDictionnary.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/BuildBreaker.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/BuildBreaker.java index f9b78d9291e..27c576fe2d2 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/BuildBreaker.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/BuildBreaker.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/CheckProject.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/CheckProject.java index eda71d16176..bca75b9740c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/CheckProject.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/CheckProject.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/CpdMapping.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/CpdMapping.java index cd2d644af05..50e670da552 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/CpdMapping.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/CpdMapping.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/Decorator.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/Decorator.java index fa2e9bf7d51..c20d2ead49f 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/Decorator.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/Decorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/DecoratorBarriers.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/DecoratorBarriers.java index 3a2a02c1373..429050ecc74 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/DecoratorBarriers.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/DecoratorBarriers.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/DecoratorContext.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/DecoratorContext.java index dc5c5b9dc58..8ee17e565b8 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/DecoratorContext.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/DecoratorContext.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/DefaultFormulaContext.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/DefaultFormulaContext.java index fc93120794c..583d5746cff 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/DefaultFormulaContext.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/DefaultFormulaContext.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/DefaultFormulaData.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/DefaultFormulaData.java index 3fa3da535c6..5bda1453f3c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/DefaultFormulaData.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/DefaultFormulaData.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/DependedUpon.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/DependedUpon.java index 7b141fc7c75..f02d8e213ce 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/DependedUpon.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/DependedUpon.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/DependsUpon.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/DependsUpon.java index 2b76a94556c..f6e4a3c00e0 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/DependsUpon.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/DependsUpon.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/Event.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/Event.java index 3444cef6241..99fa3aa5b30 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/Event.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/Event.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/FileFilter.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/FileFilter.java index 5be1d69f32d..e80cb2085b8 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/FileFilter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/FileFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/Phase.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/Phase.java index cba406cc73e..8d1732e469c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/Phase.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/Phase.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/PostJob.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/PostJob.java index 1b7f2285b6c..2d20e18b1cf 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/PostJob.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/PostJob.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/ProjectClasspath.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/ProjectClasspath.java index 03337afa5e7..9fffa244dbf 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/ProjectClasspath.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/ProjectClasspath.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/ResourceCreationLock.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/ResourceCreationLock.java index 12280f59237..b235b0cf6c5 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/ResourceCreationLock.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/ResourceCreationLock.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/ResourceFilter.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/ResourceFilter.java index 42216fb46f0..590a4844171 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/ResourceFilter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/ResourceFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/Sensor.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/Sensor.java index c39b7fae02e..ee50d58e49e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/Sensor.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/Sensor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/SensorContext.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/SensorContext.java index 8ac007a1e6a..872e6f7f027 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/SensorContext.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/SensorContext.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/SonarIndex.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/SonarIndex.java index cf441562c1b..b7974c57a2c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/SonarIndex.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/SonarIndex.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/SquidUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/SquidUtils.java index e101640a6ee..f6dbdcd9f64 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/SquidUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/SquidUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/SupportedEnvironment.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/SupportedEnvironment.java index 4c62a97d5d2..7862c224b29 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/SupportedEnvironment.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/SupportedEnvironment.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/TimeMachine.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/TimeMachine.java index e7387c1ad9f..738c0f62234 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/TimeMachine.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/TimeMachine.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/TimeMachineQuery.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/TimeMachineQuery.java index 4047179fcaf..13f8818d0bc 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/TimeMachineQuery.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/TimeMachineQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/DependsUponCustomRules.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/DependsUponCustomRules.java index 341674cd227..0bf1f9d0a6f 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/DependsUponCustomRules.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/DependsUponCustomRules.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/DependsUponMavenPlugin.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/DependsUponMavenPlugin.java index 4f79260e8e7..26e69a20f43 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/DependsUponMavenPlugin.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/DependsUponMavenPlugin.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenPlugin.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenPlugin.java index f6a7670fd70..e860e0473d8 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenPlugin.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenPlugin.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenPluginHandler.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenPluginHandler.java index 661051b3437..11ffecb52b6 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenPluginHandler.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenPluginHandler.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenSurefireUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenSurefireUtils.java index 10406c81f6e..85778173c5d 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenSurefireUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenSurefireUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenUtils.java index cfcb7e81485..62de82a8571 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/charts/AbstractChart.java b/sonar-plugin-api/src/main/java/org/sonar/api/charts/AbstractChart.java index 753eca570a0..5d2707a35cf 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/charts/AbstractChart.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/charts/AbstractChart.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/charts/Chart.java b/sonar-plugin-api/src/main/java/org/sonar/api/charts/Chart.java index 21a661007f0..1ebe7107fb0 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/charts/Chart.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/charts/Chart.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/charts/ChartParameters.java b/sonar-plugin-api/src/main/java/org/sonar/api/charts/ChartParameters.java index 7af4babe623..06226c79128 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/charts/ChartParameters.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/charts/ChartParameters.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java b/sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java index 2e0d9f2883b..c7cabc3751c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/CheckFactory.java b/sonar-plugin-api/src/main/java/org/sonar/api/checks/CheckFactory.java index 5e338665c6e..2b8d64faf14 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/CheckFactory.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/checks/CheckFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/NoSonarFilter.java b/sonar-plugin-api/src/main/java/org/sonar/api/checks/NoSonarFilter.java index d583cae1575..df4f8f0840c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/NoSonarFilter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/checks/NoSonarFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/BaseIdentifiable.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/BaseIdentifiable.java index 4e4fb0cf122..a264acc937d 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/database/BaseIdentifiable.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/BaseIdentifiable.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseProperties.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseProperties.java index 603a913cb29..8b6ed15b8d6 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseProperties.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseProperties.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseSession.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseSession.java index ae6d727c00d..e36a22e8e3f 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseSession.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseSession.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/AsyncMeasureSnapshot.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/AsyncMeasureSnapshot.java index c1424846765..2abee562b20 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/AsyncMeasureSnapshot.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/AsyncMeasureSnapshot.java @@ -1,172 +1,172 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.database.model;
-
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-import org.sonar.api.database.BaseIdentifiable;
-
-import java.util.Date;
-import javax.persistence.*;
-
-/**
- * Class to map an aysync measure with hibernate model
- */
-@Entity
-@Table(name = "async_measure_snapshots")
-public class AsyncMeasureSnapshot extends BaseIdentifiable {
-
- @Column(name = "project_measure_id", updatable = true, nullable = true)
- private Long measureId;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name = "measure_date", updatable = true, nullable = true)
- private Date measureDate;
-
- @Column(name = "snapshot_id", updatable = true, nullable = true)
- private Integer snapshotId;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name = "snapshot_date", updatable = true, nullable = true)
- private Date snapshotDate;
-
- @Column(name = "metric_id", updatable = true, nullable = true)
- private Integer metricId;
-
- @Column(name = "project_id", updatable = true, nullable = true)
- private Integer projectId;
-
- /**
- * This is the constructor to use
- *
- * @param measureId
- * @param snapshotId the snapshot id to which the measure is attached
- * @param measureDate the date of the measure
- * @param snapshotDate the snapshot date
- * @param metricId the metric the measure is attached to
- * @param projectId the id of the project
- */
- public AsyncMeasureSnapshot(Long measureId, Integer snapshotId, Date measureDate, Date snapshotDate, Integer metricId, Integer projectId) {
- this.measureId = measureId;
- this.measureDate = measureDate;
- this.snapshotId = snapshotId;
- this.snapshotDate = snapshotDate;
- this.projectId = projectId;
- this.metricId = metricId;
- }
-
- /**
- * Default constructor
- */
- public AsyncMeasureSnapshot() {
- }
-
- public Long getMeasureId() {
- return measureId;
- }
-
- public void setMeasureId(Long measureId) {
- this.measureId = measureId;
- }
-
- public Integer getSnapshotId() {
- return snapshotId;
- }
-
- public void setSnapshotId(Integer snapshotId) {
- this.snapshotId = snapshotId;
- }
-
- public Date getMeasureDate() {
- return measureDate;
- }
-
- public void setMeasureDate(Date measureDate) {
- this.measureDate = measureDate;
- }
-
- public Date getSnapshotDate() {
- return snapshotDate;
- }
-
- public void setSnapshotDate(Date snapshotDate) {
- this.snapshotDate = snapshotDate;
- }
-
- public Integer getMetricId() {
- return metricId;
- }
-
- public void setMetricId(Integer metricId) {
- this.metricId = metricId;
- }
-
- public Integer getProjectId() {
- return projectId;
- }
-
- public void setProjectId(Integer projectId) {
- this.projectId = projectId;
- }
-
- public void setMeasure(MeasureModel measure) {
- setMeasureId(measure.getId());
- setMeasureDate(measure.getMeasureDate());
- }
-
- @Override
- public boolean equals(Object obj) {
- if (!(obj instanceof AsyncMeasureSnapshot)) {
- return false;
- }
- if (this == obj) {
- return true;
- }
- AsyncMeasureSnapshot other = (AsyncMeasureSnapshot) obj;
- return new EqualsBuilder()
- .append(measureId, other.getMeasureId())
- .append(measureDate, other.getMeasureDate())
- .append(snapshotId, other.getSnapshotId())
- .append(snapshotDate, other.getSnapshotDate())
- .isEquals();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder(17, 37)
- .append(measureId)
- .append(measureDate)
- .append(snapshotDate)
- .append(snapshotId)
- .toHashCode();
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this)
- .append("id", getId())
- .append("measureId", measureId)
- .append("measureDate", measureDate)
- .append("snapshotId", snapshotId)
- .append("snapshotDate", snapshotDate)
- .toString();
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.database.model; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; +import org.sonar.api.database.BaseIdentifiable; + +import java.util.Date; +import javax.persistence.*; + +/** + * Class to map an aysync measure with hibernate model + */ +@Entity +@Table(name = "async_measure_snapshots") +public class AsyncMeasureSnapshot extends BaseIdentifiable { + + @Column(name = "project_measure_id", updatable = true, nullable = true) + private Long measureId; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "measure_date", updatable = true, nullable = true) + private Date measureDate; + + @Column(name = "snapshot_id", updatable = true, nullable = true) + private Integer snapshotId; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "snapshot_date", updatable = true, nullable = true) + private Date snapshotDate; + + @Column(name = "metric_id", updatable = true, nullable = true) + private Integer metricId; + + @Column(name = "project_id", updatable = true, nullable = true) + private Integer projectId; + + /** + * This is the constructor to use + * + * @param measureId + * @param snapshotId the snapshot id to which the measure is attached + * @param measureDate the date of the measure + * @param snapshotDate the snapshot date + * @param metricId the metric the measure is attached to + * @param projectId the id of the project + */ + public AsyncMeasureSnapshot(Long measureId, Integer snapshotId, Date measureDate, Date snapshotDate, Integer metricId, Integer projectId) { + this.measureId = measureId; + this.measureDate = measureDate; + this.snapshotId = snapshotId; + this.snapshotDate = snapshotDate; + this.projectId = projectId; + this.metricId = metricId; + } + + /** + * Default constructor + */ + public AsyncMeasureSnapshot() { + } + + public Long getMeasureId() { + return measureId; + } + + public void setMeasureId(Long measureId) { + this.measureId = measureId; + } + + public Integer getSnapshotId() { + return snapshotId; + } + + public void setSnapshotId(Integer snapshotId) { + this.snapshotId = snapshotId; + } + + public Date getMeasureDate() { + return measureDate; + } + + public void setMeasureDate(Date measureDate) { + this.measureDate = measureDate; + } + + public Date getSnapshotDate() { + return snapshotDate; + } + + public void setSnapshotDate(Date snapshotDate) { + this.snapshotDate = snapshotDate; + } + + public Integer getMetricId() { + return metricId; + } + + public void setMetricId(Integer metricId) { + this.metricId = metricId; + } + + public Integer getProjectId() { + return projectId; + } + + public void setProjectId(Integer projectId) { + this.projectId = projectId; + } + + public void setMeasure(MeasureModel measure) { + setMeasureId(measure.getId()); + setMeasureDate(measure.getMeasureDate()); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof AsyncMeasureSnapshot)) { + return false; + } + if (this == obj) { + return true; + } + AsyncMeasureSnapshot other = (AsyncMeasureSnapshot) obj; + return new EqualsBuilder() + .append(measureId, other.getMeasureId()) + .append(measureDate, other.getMeasureDate()) + .append(snapshotId, other.getSnapshotId()) + .append(snapshotDate, other.getSnapshotDate()) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37) + .append(measureId) + .append(measureDate) + .append(snapshotDate) + .append(snapshotId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this) + .append("id", getId()) + .append("measureId", measureId) + .append("measureDate", measureDate) + .append("snapshotId", snapshotId) + .append("snapshotDate", snapshotDate) + .toString(); + } +} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureData.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureData.java index f5b3ecd4694..c9606f6a265 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureData.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureData.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureModel.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureModel.java index 276f6b919e8..adc29ed1ddf 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureModel.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureModel.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java index bb8f1c13380..2a744bbbae6 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/RuleFailureModel.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/RuleFailureModel.java index 66a7ccb3172..ae0f9531c89 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/RuleFailureModel.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/RuleFailureModel.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/Snapshot.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/Snapshot.java index 4258e0ea288..dfb46f333b8 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/Snapshot.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/Snapshot.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/SnapshotSource.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/SnapshotSource.java index d0c12682172..6a631ab808c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/SnapshotSource.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/SnapshotSource.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/User.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/User.java index 5ddb3703b00..8c428324501 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/User.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/User.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/design/Dependency.java b/sonar-plugin-api/src/main/java/org/sonar/api/design/Dependency.java index 17c9c5de8d5..99516e3bac2 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/design/Dependency.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/design/Dependency.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/design/DependencyDto.java b/sonar-plugin-api/src/main/java/org/sonar/api/design/DependencyDto.java index d29bee13fa2..40de2688d24 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/design/DependencyDto.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/design/DependencyDto.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/AverageComplexityFormula.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/AverageComplexityFormula.java index 4b8bdb37b8f..b1edc4f27a2 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/AverageComplexityFormula.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/AverageComplexityFormula.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java index ab1c36d8c0a..0b5c68efb46 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/CountDistributionBuilder.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/CountDistributionBuilder.java index d8350e01398..5d21668d083 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/CountDistributionBuilder.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/CountDistributionBuilder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Formula.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Formula.java index 8d93892204d..8d2fca484da 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Formula.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Formula.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/FormulaContext.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/FormulaContext.java index 6ca8ddcc9a6..38012c656e7 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/FormulaContext.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/FormulaContext.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/FormulaData.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/FormulaData.java index 003d4c63416..fa6788793b1 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/FormulaData.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/FormulaData.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeanAggregationFormula.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeanAggregationFormula.java index 1e33d208154..2a234b1cd3e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeanAggregationFormula.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeanAggregationFormula.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Measure.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Measure.java index 949cc8aa2e1..e27d13cf69e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Measure.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Measure.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasureBuilder.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasureBuilder.java index 36630a8c515..f48e830a697 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasureBuilder.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasureBuilder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasureUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasureUtils.java index dae6e3d1154..aca0c1ca364 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasureUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasureUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasuresFilter.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasuresFilter.java index ef406abd1c5..62a5c946002 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasuresFilter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasuresFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasuresFilters.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasuresFilters.java index 2b74a78a500..9d4ef31510c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasuresFilters.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasuresFilters.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java index 73305be154a..781b63eef13 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MetricFinder.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MetricFinder.java index 0083d62b17e..7df87b9f274 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MetricFinder.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MetricFinder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metrics.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metrics.java index c733e59a637..6a29a569a51 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metrics.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metrics.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/PersistenceMode.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/PersistenceMode.java index 47404215eb0..6781f919062 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/PersistenceMode.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/PersistenceMode.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/PropertiesBuilder.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/PropertiesBuilder.java index 620b8646287..95291718a38 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/PropertiesBuilder.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/PropertiesBuilder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/RangeDistributionBuilder.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/RangeDistributionBuilder.java index c9e148ffaf1..93bbe04e9e5 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/RangeDistributionBuilder.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/RangeDistributionBuilder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/RuleMeasure.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/RuleMeasure.java index 76e63950713..c3ca678e7e2 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/RuleMeasure.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/RuleMeasure.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildDistributionFormula.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildDistributionFormula.java index d80b78ddc12..5d5a78772ce 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildDistributionFormula.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildDistributionFormula.java @@ -1,67 +1,67 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.measures;
-
-import org.sonar.api.resources.Scopes;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * @since 2.0
- *
- * Used to consolidate a distribution measure throughout the resource tree
- */
-public class SumChildDistributionFormula implements Formula {
-
- private String minimumScopeToPersist= Scopes.FILE;
-
- public List<Metric> dependsUponMetrics() {
- return Collections.emptyList();
- }
-
- public String getMinimumScopeToPersist() {
- return minimumScopeToPersist;
- }
-
- public SumChildDistributionFormula setMinimumScopeToPersist(String s) {
- this.minimumScopeToPersist = s;
- return this;
- }
-
- public Measure calculate(FormulaData data, FormulaContext context) {
- Collection<Measure> measures = data.getChildrenMeasures(context.getTargetMetric());
- if (measures == null || measures.isEmpty()) {
- return null;
- }
- else {
- RangeDistributionBuilder distribution = new RangeDistributionBuilder(context.getTargetMetric());
- for (Measure measure : measures) {
- distribution.add(measure);
- }
- Measure measure = distribution.build();
- if (!Scopes.isHigherThanOrEquals(context.getResource().getScope(), minimumScopeToPersist)) {
- measure.setPersistenceMode(PersistenceMode.MEMORY);
- }
- return measure;
- }
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.measures; + +import org.sonar.api.resources.Scopes; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +/** + * @since 2.0 + * + * Used to consolidate a distribution measure throughout the resource tree + */ +public class SumChildDistributionFormula implements Formula { + + private String minimumScopeToPersist= Scopes.FILE; + + public List<Metric> dependsUponMetrics() { + return Collections.emptyList(); + } + + public String getMinimumScopeToPersist() { + return minimumScopeToPersist; + } + + public SumChildDistributionFormula setMinimumScopeToPersist(String s) { + this.minimumScopeToPersist = s; + return this; + } + + public Measure calculate(FormulaData data, FormulaContext context) { + Collection<Measure> measures = data.getChildrenMeasures(context.getTargetMetric()); + if (measures == null || measures.isEmpty()) { + return null; + } + else { + RangeDistributionBuilder distribution = new RangeDistributionBuilder(context.getTargetMetric()); + for (Measure measure : measures) { + distribution.add(measure); + } + Measure measure = distribution.build(); + if (!Scopes.isHigherThanOrEquals(context.getResource().getScope(), minimumScopeToPersist)) { + measure.setPersistenceMode(PersistenceMode.MEMORY); + } + return measure; + } + } +} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildValuesFormula.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildValuesFormula.java index e6b271ccaf0..6626c56960a 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildValuesFormula.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildValuesFormula.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/WeightedMeanAggregationFormula.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/WeightedMeanAggregationFormula.java index 219679255a1..a74ec9218d2 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/WeightedMeanAggregationFormula.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/WeightedMeanAggregationFormula.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/platform/Environment.java b/sonar-plugin-api/src/main/java/org/sonar/api/platform/Environment.java index 6279c473ed3..57d36283fe9 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/platform/Environment.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/platform/Environment.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/platform/PluginRepository.java b/sonar-plugin-api/src/main/java/org/sonar/api/platform/PluginRepository.java index 49e42cd4c8c..391de9706e0 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/platform/PluginRepository.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/platform/PluginRepository.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/platform/Server.java b/sonar-plugin-api/src/main/java/org/sonar/api/platform/Server.java index 3b2e3ab33b4..37d06ad35d6 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/platform/Server.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/platform/Server.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerFileSystem.java b/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerFileSystem.java index 11f2015c1e6..8a8d6439bd7 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerFileSystem.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerFileSystem.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerStartHandler.java b/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerStartHandler.java index 7f051e1a412..46a9eb5af34 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerStartHandler.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerStartHandler.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerStopHandler.java b/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerStopHandler.java index 0e16e12dc7c..11ae4766160 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerStopHandler.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerStopHandler.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerUpgradeStatus.java b/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerUpgradeStatus.java index dad047afa70..c036b0b7ad4 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerUpgradeStatus.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerUpgradeStatus.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/Alert.java b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/Alert.java index 843dfecd236..0dcb5347600 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/Alert.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/Alert.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/AnnotationProfileParser.java b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/AnnotationProfileParser.java index 5fc713eecf1..a67a79767e5 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/AnnotationProfileParser.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/AnnotationProfileParser.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileDefinition.java b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileDefinition.java index 69aa3c99b73..e7ea7d1102f 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileDefinition.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileDefinition.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileExporter.java b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileExporter.java index 6a495bb508a..79efce248a5 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileExporter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileExporter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileImporter.java b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileImporter.java index 8bf0cc62e66..bb703814ce5 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileImporter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileImporter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java index 9427f0c1765..5b34326daf6 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/XMLProfileParser.java b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/XMLProfileParser.java index 2ca74d70fdc..dc571927ed2 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/XMLProfileParser.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/XMLProfileParser.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/XMLProfileSerializer.java b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/XMLProfileSerializer.java index e462aa809f3..016cf384ac0 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/XMLProfileSerializer.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/XMLProfileSerializer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/Characteristic.java b/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/Characteristic.java index f36a61c6c52..c1bea71a961 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/Characteristic.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/Characteristic.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/CharacteristicProperty.java b/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/CharacteristicProperty.java index 911041553e4..a78ab64a183 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/CharacteristicProperty.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/CharacteristicProperty.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/Model.java b/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/Model.java index 874d64bf68d..525b2460c4e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/Model.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/Model.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/ModelDefinition.java b/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/ModelDefinition.java index 6a8eb7aaf7c..4c202dfdfdb 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/ModelDefinition.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/ModelDefinition.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/ModelFinder.java b/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/ModelFinder.java index 66ff26eae7f..be742894d03 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/ModelFinder.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/ModelFinder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/AbstractLanguage.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/AbstractLanguage.java index 26fe63effe9..865311bd928 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/AbstractLanguage.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/AbstractLanguage.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/BlockUnit.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/BlockUnit.java index ee6bbe1ac03..38cf6bc2b72 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/BlockUnit.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/BlockUnit.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/DefaultProjectFileSystem.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/DefaultProjectFileSystem.java index d63e8918d2c..0c2520fd226 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/DefaultProjectFileSystem.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/DefaultProjectFileSystem.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Directory.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Directory.java index b2135800217..4f7ede6c019 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Directory.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Directory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/DuplicatedSourceException.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/DuplicatedSourceException.java index d1eec28b7b3..f21eaf0fa96 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/DuplicatedSourceException.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/DuplicatedSourceException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/File.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/File.java index 40872867c7e..975078084d3 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/File.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/File.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/InputFile.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/InputFile.java index 803dafaee58..e3f2f36d42c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/InputFile.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/InputFile.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Java.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Java.java index 4f5f22c683e..1081d449f4d 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Java.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Java.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/JavaFile.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/JavaFile.java index dc0f729e9e0..1949efea86c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/JavaFile.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/JavaFile.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/JavaPackage.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/JavaPackage.java index 0ec5528ca9f..7da6eb3f800 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/JavaPackage.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/JavaPackage.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Language.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Language.java index a86ffb650e5..78da354b833 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Language.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Language.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java index 9908252d11e..03062e94de3 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Library.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Library.java index 61f85842340..1fa4ee3c45b 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Library.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Library.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java index 5737d3da5f6..ecee7d5b037 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectFileSystem.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectFileSystem.java index a670714ecb0..4bba4c02788 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectFileSystem.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectFileSystem.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectLink.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectLink.java index f8353c02f0d..f3cb290e15e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectLink.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectLink.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectUtils.java index b81c3dc7b46..f2f9b0511e4 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Qualifiers.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Qualifiers.java index 800c4863dbd..96ba251e7a3 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Qualifiers.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Qualifiers.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Resource.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Resource.java index 11c40999642..ebe66187b7e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Resource.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Resource.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/ResourceUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/ResourceUtils.java index eb6728f6a6e..8f55f874743 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/ResourceUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/ResourceUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Scopes.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Scopes.java index ff4f05d4dc0..2f4677ed366 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Scopes.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Scopes.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java index 5fe233feb0d..2da2c6c2352 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRuleParam.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRuleParam.java index 8691a34458b..56526ba2e9d 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRuleParam.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRuleParam.java @@ -1,138 +1,138 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.rules;
-
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-
-import javax.persistence.*;
-
-@Entity
-@Table(name = "active_rule_parameters")
-public class ActiveRuleParam implements Cloneable {
-
-
- @Id
- @Column(name = "id")
- @GeneratedValue
- private Integer id;
-
- @ManyToOne(fetch = FetchType.LAZY)
- @JoinColumn(name = "active_rule_id")
- private ActiveRule activeRule;
-
- @ManyToOne(fetch = FetchType.LAZY, optional = true)
- @JoinColumn(name = "rules_parameter_id")
- private RuleParam ruleParam;
-
- @Column(name = "value", updatable = false, nullable = true, length = 4000)
- private String value;
-
- public Integer getId() {
- return id;
- }
-
- /**
- * @deprecated visibility should be decreased to protected or package
- */
- @Deprecated
- void setId(Integer id) {
- this.id = id;
- }
-
- /**
- * @deprecated visibility should be decreased to protected or package
- */
- @Deprecated
- public ActiveRuleParam() {
- }
-
- /**
- * @deprecated visibility should be decreased to protected or package
- */
- @Deprecated
- public ActiveRuleParam(ActiveRule activeRule, RuleParam ruleParam, String value) {
- this.activeRule = activeRule;
- this.ruleParam = ruleParam;
- this.value = value;
- }
-
- public ActiveRule getActiveRule() {
- return activeRule;
- }
-
- /**
- * @deprecated visibility should be decreased to protected or package
- */
- @Deprecated
- public void setActiveRule(ActiveRule activeRule) {
- this.activeRule = activeRule;
- }
-
- public RuleParam getRuleParam() {
- return ruleParam;
- }
-
- /**
- * @deprecated visibility should be decreased to protected or package
- */
- @Deprecated
- public void setRuleParam(RuleParam ruleParam) {
- this.ruleParam = ruleParam;
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-
- public String getKey() {
- return ruleParam.getKey();
- }
-
- @Override
- public boolean equals(Object obj) {
- if (!(obj instanceof RuleParam)) {
- return false;
- }
- if (this == obj) {
- return true;
- }
- RuleParam other = (RuleParam) obj;
- return new EqualsBuilder()
- .append(getId(), other.getKey()).isEquals();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder(17, 37)
- .append(getId())
- .toHashCode();
- }
-
- @Override
- public Object clone() {
- return new ActiveRuleParam(getActiveRule(), getRuleParam(), getValue());
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.rules; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; + +import javax.persistence.*; + +@Entity +@Table(name = "active_rule_parameters") +public class ActiveRuleParam implements Cloneable { + + + @Id + @Column(name = "id") + @GeneratedValue + private Integer id; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "active_rule_id") + private ActiveRule activeRule; + + @ManyToOne(fetch = FetchType.LAZY, optional = true) + @JoinColumn(name = "rules_parameter_id") + private RuleParam ruleParam; + + @Column(name = "value", updatable = false, nullable = true, length = 4000) + private String value; + + public Integer getId() { + return id; + } + + /** + * @deprecated visibility should be decreased to protected or package + */ + @Deprecated + void setId(Integer id) { + this.id = id; + } + + /** + * @deprecated visibility should be decreased to protected or package + */ + @Deprecated + public ActiveRuleParam() { + } + + /** + * @deprecated visibility should be decreased to protected or package + */ + @Deprecated + public ActiveRuleParam(ActiveRule activeRule, RuleParam ruleParam, String value) { + this.activeRule = activeRule; + this.ruleParam = ruleParam; + this.value = value; + } + + public ActiveRule getActiveRule() { + return activeRule; + } + + /** + * @deprecated visibility should be decreased to protected or package + */ + @Deprecated + public void setActiveRule(ActiveRule activeRule) { + this.activeRule = activeRule; + } + + public RuleParam getRuleParam() { + return ruleParam; + } + + /** + * @deprecated visibility should be decreased to protected or package + */ + @Deprecated + public void setRuleParam(RuleParam ruleParam) { + this.ruleParam = ruleParam; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getKey() { + return ruleParam.getKey(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof RuleParam)) { + return false; + } + if (this == obj) { + return true; + } + RuleParam other = (RuleParam) obj; + return new EqualsBuilder() + .append(getId(), other.getKey()).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37) + .append(getId()) + .toHashCode(); + } + + @Override + public Object clone() { + return new ActiveRuleParam(getActiveRule(), getRuleParam(), getValue()); + } + +} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/AnnotationRuleParser.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/AnnotationRuleParser.java index 619a01c3c7e..7c6ae5c0b1a 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/AnnotationRuleParser.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/AnnotationRuleParser.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Iso9126RulesCategories.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Iso9126RulesCategories.java index b3628588575..4fc69f2332e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Iso9126RulesCategories.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Iso9126RulesCategories.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java index 238763e2603..4f1e1462fff 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java @@ -1,429 +1,429 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.rules;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-import org.sonar.api.database.DatabaseProperties;
-import org.sonar.check.Cardinality;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.persistence.*;
-
-@Entity
-@Table(name = "rules")
-public final class Rule {
-
- private final static RulesCategory NONE = new RulesCategory("none");
-
- @Id
- @Column(name = "id")
- @GeneratedValue
- private Integer id;
-
- /**
- * The default priority given to a rule if not explicitly set
- */
- public static final RulePriority DEFAULT_PRIORITY = RulePriority.MAJOR;
-
- @Column(name = "name", updatable = true, nullable = false)
- private String name;
-
- @Column(name = "plugin_rule_key", updatable = false, nullable = true, length = 200)
- private String key;
-
- @Column(name = "enabled", updatable = true, nullable = true)
- private Boolean enabled = Boolean.TRUE;
-
- @Column(name = "plugin_config_key", updatable = true, nullable = true, length = 500)
- private String configKey;
-
- // Godin: This field should be named priority, otherwise StandardRulesXmlParserTest fails
- @Column(name = "priority", updatable = true, nullable = true)
- @Enumerated(EnumType.ORDINAL)
- private RulePriority priority = DEFAULT_PRIORITY;
-
- @Column(name = "description", updatable = true, nullable = true, length = DatabaseProperties.MAX_TEXT_SIZE)
- private String description;
-
- @Column(name = "plugin_name", updatable = true, nullable = false)
- private String pluginName;
-
- @Enumerated(EnumType.STRING)
- @Column(name = "cardinality", updatable = true, nullable = false)
- private Cardinality cardinality = Cardinality.SINGLE;
-
- @ManyToOne(fetch = FetchType.EAGER)
- @JoinColumn(name = "parent_id", updatable = true, nullable = true)
- private Rule parent = null;
-
- @org.hibernate.annotations.Cascade({ org.hibernate.annotations.CascadeType.ALL, org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
- @OneToMany(mappedBy = "rule")
- private List<RuleParam> params = new ArrayList<RuleParam>();
-
- /**
- * @deprecated since 2.3. Use the factory method {@link #create()}
- */
- @Deprecated
- public Rule() {
- // TODO reduce visibility to package
- }
-
- /**
- * Creates rule with minimum set of info
- *
- * @param pluginName the plugin name indicates which plugin the rule belongs to
- * @param key the key should be unique within a plugin, but it is even more careful for the time being that it is unique across the
- * application
- * @deprecated since 2.3. Use the factory method {@link #create()}
- */
- @Deprecated
- public Rule(String pluginName, String key) {
- this.pluginName = pluginName;
- this.key = key;
- this.configKey = key;
- }
-
- /**
- * Creates a fully qualified rule
- *
- * @param pluginKey the plugin the rule belongs to
- * @param key the key should be unique within a plugin, but it is even more careful for the time being that it is unique across the
- * application
- * @param name the name displayed in the UI
- * @param rulesCategory the ISO category the rule belongs to
- * @param severity this is the severity associated to the rule
- * @deprecated since 2.3. Use the factory method {@link #create()}
- */
- @Deprecated
- public Rule(String pluginKey, String key, String name, RulesCategory rulesCategory, RulePriority severity) {
- setName(name);
- this.key = key;
- this.configKey = key;
- this.priority = severity;
- this.pluginName = pluginKey;
- }
-
- /**
- * @deprecated since 2.3. Use the factory method {@link #create()}
- */
- @Deprecated
- public Rule(String name, String key, RulesCategory rulesCategory, String pluginName, String description) {
- this();
- setName(name);
- this.key = key;
- this.configKey = key;
- this.pluginName = pluginName;
- this.description = description;
- }
-
- /**
- * @deprecated since 2.3. Use the factory method {@link #create()}
- */
- @Deprecated
- public Rule(String name, String key, String configKey, RulesCategory rulesCategory, String pluginName, String description) {
- this();
- setName(name);
- this.key = key;
- this.configKey = configKey;
- this.pluginName = pluginName;
- this.description = description;
- }
-
- public Integer getId() {
- return id;
- }
-
- /**
- * @deprecated since 2.3. visibility should be decreased to protected or package
- */
- @Deprecated
- public void setId(Integer id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- /**
- * Sets the rule name
- */
- public Rule setName(String name) {
- this.name = removeNewLineCharacters(name);
- return this;
- }
-
- public String getKey() {
- return key;
- }
-
- /**
- * Sets the rule key
- */
- public Rule setKey(String key) {
- this.key = key;
- return this;
- }
-
- /**
- * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007
- */
- @Deprecated
- public RulesCategory getRulesCategory() {
- return NONE;
- }
-
- /**
- * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007
- */
- @Deprecated
- public Rule setRulesCategory(RulesCategory rulesCategory) {
- return this;
- }
-
- /**
- * @deprecated since 2.5 use {@link #getRepositoryKey()} instead
- */
- @Deprecated
- public String getPluginName() {
- return pluginName;
- }
-
- /**
- * @deprecated since 2.5 use {@link #setRepositoryKey(String)} instead
- */
- @Deprecated
- public Rule setPluginName(String pluginName) {
- this.pluginName = pluginName;
- return this;
- }
-
- public String getConfigKey() {
- return configKey;
- }
-
- /**
- * Sets the configuration key
- */
- public Rule setConfigKey(String configKey) {
- this.configKey = configKey;
- return this;
- }
-
- public String getDescription() {
- return description;
- }
-
- /**
- * Sets the rule description
- */
- public Rule setDescription(String description) {
- this.description = StringUtils.strip(description);
- return this;
- }
-
- public Boolean isEnabled() {
- return enabled;
- }
-
- /**
- * Do not call. Used only by sonar.
- */
- public Rule setEnabled(Boolean b) {
- this.enabled = b;
- return this;
- }
-
- public List<RuleParam> getParams() {
- return params;
- }
-
- public RuleParam getParam(String key) {
- for (RuleParam param : params) {
- if (StringUtils.equals(key, param.getKey())) {
- return param;
- }
- }
- return null;
- }
-
- /**
- * Sets the rule parameters
- */
- public Rule setParams(List<RuleParam> params) {
- this.params.clear();
- for (RuleParam param : params) {
- param.setRule(this);
- this.params.add(param);
- }
- return this;
- }
-
- public RuleParam createParameter() {
- RuleParam parameter = new RuleParam()
- .setRule(this);
- params.add(parameter);
- return parameter;
- }
-
- public RuleParam createParameter(String key) {
- RuleParam parameter = new RuleParam()
- .setKey(key)
- .setRule(this);
- params.add(parameter);
- return parameter;
- }
-
- /**
- * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007
- */
- @Deprecated
- public Integer getCategoryId() {
- return null;
- }
-
- /**
- * @since 2.5
- */
- public RulePriority getSeverity() {
- return priority;
- }
-
- /**
- * @param severity severity to set, if null, uses the default priority.
- * @since 2.5
- */
- public Rule setSeverity(RulePriority severity) {
- if (severity == null) {
- this.priority = DEFAULT_PRIORITY;
- } else {
- this.priority = severity;
- }
- return this;
- }
-
- /**
- * @deprecated since 2.5 use {@link #getSeverity()} instead. See http://jira.codehaus.org/browse/SONAR-1829
- */
- @Deprecated
- public RulePriority getPriority() {
- return priority;
- }
-
- /**
- * Sets the rule priority. If null, uses the default priority
- *
- * @deprecated since 2.5 use {@link #setSeverity(RulePriority)} instead. See http://jira.codehaus.org/browse/SONAR-1829
- */
- @Deprecated
- public Rule setPriority(RulePriority priority) {
- return setSeverity(priority);
- }
-
- public String getRepositoryKey() {
- return pluginName;
- }
-
- public Rule setRepositoryKey(String s) {
- this.pluginName = s;
- return this;
- }
-
- public Rule setUniqueKey(String repositoryKey, String key) {
- return setRepositoryKey(repositoryKey).setKey(key).setConfigKey(key);
- }
-
- public Cardinality getCardinality() {
- return cardinality;
- }
-
- public Rule setCardinality(Cardinality c) {
- this.cardinality = c;
- return this;
- }
-
- public Rule getParent() {
- return parent;
- }
-
- public Rule setParent(Rule parent) {
- this.parent = parent;
- return this;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (!(obj instanceof Rule)) {
- return false;
- }
- if (this == obj) {
- return true;
- }
- Rule other = (Rule) obj;
- return new EqualsBuilder()
- .append(pluginName, other.getRepositoryKey())
- .append(key, other.getKey())
- .isEquals();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder(17, 37)
- .append(pluginName)
- .append(key)
- .toHashCode();
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this)
- .append("id", getId())
- .append("name", name)
- .append("key", key)
- .append("configKey", configKey)
- .append("plugin", pluginName)
- .toString();
- }
-
- private String removeNewLineCharacters(String text) {
- String removedCRLF = StringUtils.remove(text, "\n");
- removedCRLF = StringUtils.remove(removedCRLF, "\r");
- removedCRLF = StringUtils.remove(removedCRLF, "\n\r");
- removedCRLF = StringUtils.remove(removedCRLF, "\r\n");
- return removedCRLF;
- }
-
- public static Rule create() {
- return new Rule();
- }
-
- /**
- * Create with all required fields
- */
- public static Rule create(String repositoryKey, String key, String name) {
- return new Rule().setUniqueKey(repositoryKey, key).setName(name);
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.rules; + +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; +import org.sonar.api.database.DatabaseProperties; +import org.sonar.check.Cardinality; + +import java.util.ArrayList; +import java.util.List; + +import javax.persistence.*; + +@Entity +@Table(name = "rules") +public final class Rule { + + private final static RulesCategory NONE = new RulesCategory("none"); + + @Id + @Column(name = "id") + @GeneratedValue + private Integer id; + + /** + * The default priority given to a rule if not explicitly set + */ + public static final RulePriority DEFAULT_PRIORITY = RulePriority.MAJOR; + + @Column(name = "name", updatable = true, nullable = false) + private String name; + + @Column(name = "plugin_rule_key", updatable = false, nullable = true, length = 200) + private String key; + + @Column(name = "enabled", updatable = true, nullable = true) + private Boolean enabled = Boolean.TRUE; + + @Column(name = "plugin_config_key", updatable = true, nullable = true, length = 500) + private String configKey; + + // Godin: This field should be named priority, otherwise StandardRulesXmlParserTest fails + @Column(name = "priority", updatable = true, nullable = true) + @Enumerated(EnumType.ORDINAL) + private RulePriority priority = DEFAULT_PRIORITY; + + @Column(name = "description", updatable = true, nullable = true, length = DatabaseProperties.MAX_TEXT_SIZE) + private String description; + + @Column(name = "plugin_name", updatable = true, nullable = false) + private String pluginName; + + @Enumerated(EnumType.STRING) + @Column(name = "cardinality", updatable = true, nullable = false) + private Cardinality cardinality = Cardinality.SINGLE; + + @ManyToOne(fetch = FetchType.EAGER) + @JoinColumn(name = "parent_id", updatable = true, nullable = true) + private Rule parent = null; + + @org.hibernate.annotations.Cascade({ org.hibernate.annotations.CascadeType.ALL, org.hibernate.annotations.CascadeType.DELETE_ORPHAN }) + @OneToMany(mappedBy = "rule") + private List<RuleParam> params = new ArrayList<RuleParam>(); + + /** + * @deprecated since 2.3. Use the factory method {@link #create()} + */ + @Deprecated + public Rule() { + // TODO reduce visibility to package + } + + /** + * Creates rule with minimum set of info + * + * @param pluginName the plugin name indicates which plugin the rule belongs to + * @param key the key should be unique within a plugin, but it is even more careful for the time being that it is unique across the + * application + * @deprecated since 2.3. Use the factory method {@link #create()} + */ + @Deprecated + public Rule(String pluginName, String key) { + this.pluginName = pluginName; + this.key = key; + this.configKey = key; + } + + /** + * Creates a fully qualified rule + * + * @param pluginKey the plugin the rule belongs to + * @param key the key should be unique within a plugin, but it is even more careful for the time being that it is unique across the + * application + * @param name the name displayed in the UI + * @param rulesCategory the ISO category the rule belongs to + * @param severity this is the severity associated to the rule + * @deprecated since 2.3. Use the factory method {@link #create()} + */ + @Deprecated + public Rule(String pluginKey, String key, String name, RulesCategory rulesCategory, RulePriority severity) { + setName(name); + this.key = key; + this.configKey = key; + this.priority = severity; + this.pluginName = pluginKey; + } + + /** + * @deprecated since 2.3. Use the factory method {@link #create()} + */ + @Deprecated + public Rule(String name, String key, RulesCategory rulesCategory, String pluginName, String description) { + this(); + setName(name); + this.key = key; + this.configKey = key; + this.pluginName = pluginName; + this.description = description; + } + + /** + * @deprecated since 2.3. Use the factory method {@link #create()} + */ + @Deprecated + public Rule(String name, String key, String configKey, RulesCategory rulesCategory, String pluginName, String description) { + this(); + setName(name); + this.key = key; + this.configKey = configKey; + this.pluginName = pluginName; + this.description = description; + } + + public Integer getId() { + return id; + } + + /** + * @deprecated since 2.3. visibility should be decreased to protected or package + */ + @Deprecated + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + /** + * Sets the rule name + */ + public Rule setName(String name) { + this.name = removeNewLineCharacters(name); + return this; + } + + public String getKey() { + return key; + } + + /** + * Sets the rule key + */ + public Rule setKey(String key) { + this.key = key; + return this; + } + + /** + * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007 + */ + @Deprecated + public RulesCategory getRulesCategory() { + return NONE; + } + + /** + * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007 + */ + @Deprecated + public Rule setRulesCategory(RulesCategory rulesCategory) { + return this; + } + + /** + * @deprecated since 2.5 use {@link #getRepositoryKey()} instead + */ + @Deprecated + public String getPluginName() { + return pluginName; + } + + /** + * @deprecated since 2.5 use {@link #setRepositoryKey(String)} instead + */ + @Deprecated + public Rule setPluginName(String pluginName) { + this.pluginName = pluginName; + return this; + } + + public String getConfigKey() { + return configKey; + } + + /** + * Sets the configuration key + */ + public Rule setConfigKey(String configKey) { + this.configKey = configKey; + return this; + } + + public String getDescription() { + return description; + } + + /** + * Sets the rule description + */ + public Rule setDescription(String description) { + this.description = StringUtils.strip(description); + return this; + } + + public Boolean isEnabled() { + return enabled; + } + + /** + * Do not call. Used only by sonar. + */ + public Rule setEnabled(Boolean b) { + this.enabled = b; + return this; + } + + public List<RuleParam> getParams() { + return params; + } + + public RuleParam getParam(String key) { + for (RuleParam param : params) { + if (StringUtils.equals(key, param.getKey())) { + return param; + } + } + return null; + } + + /** + * Sets the rule parameters + */ + public Rule setParams(List<RuleParam> params) { + this.params.clear(); + for (RuleParam param : params) { + param.setRule(this); + this.params.add(param); + } + return this; + } + + public RuleParam createParameter() { + RuleParam parameter = new RuleParam() + .setRule(this); + params.add(parameter); + return parameter; + } + + public RuleParam createParameter(String key) { + RuleParam parameter = new RuleParam() + .setKey(key) + .setRule(this); + params.add(parameter); + return parameter; + } + + /** + * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007 + */ + @Deprecated + public Integer getCategoryId() { + return null; + } + + /** + * @since 2.5 + */ + public RulePriority getSeverity() { + return priority; + } + + /** + * @param severity severity to set, if null, uses the default priority. + * @since 2.5 + */ + public Rule setSeverity(RulePriority severity) { + if (severity == null) { + this.priority = DEFAULT_PRIORITY; + } else { + this.priority = severity; + } + return this; + } + + /** + * @deprecated since 2.5 use {@link #getSeverity()} instead. See http://jira.codehaus.org/browse/SONAR-1829 + */ + @Deprecated + public RulePriority getPriority() { + return priority; + } + + /** + * Sets the rule priority. If null, uses the default priority + * + * @deprecated since 2.5 use {@link #setSeverity(RulePriority)} instead. See http://jira.codehaus.org/browse/SONAR-1829 + */ + @Deprecated + public Rule setPriority(RulePriority priority) { + return setSeverity(priority); + } + + public String getRepositoryKey() { + return pluginName; + } + + public Rule setRepositoryKey(String s) { + this.pluginName = s; + return this; + } + + public Rule setUniqueKey(String repositoryKey, String key) { + return setRepositoryKey(repositoryKey).setKey(key).setConfigKey(key); + } + + public Cardinality getCardinality() { + return cardinality; + } + + public Rule setCardinality(Cardinality c) { + this.cardinality = c; + return this; + } + + public Rule getParent() { + return parent; + } + + public Rule setParent(Rule parent) { + this.parent = parent; + return this; + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof Rule)) { + return false; + } + if (this == obj) { + return true; + } + Rule other = (Rule) obj; + return new EqualsBuilder() + .append(pluginName, other.getRepositoryKey()) + .append(key, other.getKey()) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37) + .append(pluginName) + .append(key) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this) + .append("id", getId()) + .append("name", name) + .append("key", key) + .append("configKey", configKey) + .append("plugin", pluginName) + .toString(); + } + + private String removeNewLineCharacters(String text) { + String removedCRLF = StringUtils.remove(text, "\n"); + removedCRLF = StringUtils.remove(removedCRLF, "\r"); + removedCRLF = StringUtils.remove(removedCRLF, "\n\r"); + removedCRLF = StringUtils.remove(removedCRLF, "\r\n"); + return removedCRLF; + } + + public static Rule create() { + return new Rule(); + } + + /** + * Create with all required fields + */ + public static Rule create(String repositoryKey, String key, String name) { + return new Rule().setUniqueKey(repositoryKey, key).setName(name); + } + +} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleAnnotationUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleAnnotationUtils.java index b1e3f3d47fb..719b1195b72 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleAnnotationUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleAnnotationUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleFinder.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleFinder.java index 5b4fc00778a..44f71e48630 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleFinder.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleFinder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleParam.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleParam.java index c4f3725811e..5afc350344d 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleParam.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleParam.java @@ -1,162 +1,162 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.rules;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import javax.persistence.*;
-
-@Entity
-@Table(name = "rules_parameters")
-public class RuleParam {
-
- @Id
- @Column(name = "id")
- @GeneratedValue
- private Integer id;
-
- @ManyToOne(fetch = FetchType.EAGER)
- @JoinColumn(name = "rule_id")
- private Rule rule;
-
- @Column(name = "name", updatable = true, nullable = false, length = 128)
- private String key;
-
- @Column(name = "description", updatable = true, nullable = true, length = 4000)
- private String description;
-
- @Column(name = "param_type", updatable = true, nullable = true, length = 512)
- private String type = "s";
-
- @Column(name = "default_value", updatable = true, nullable = true, length = 4000)
- private String defaultValue;
-
- /**
- * @deprecated since 2.3 use the factory method Rule.setParameter()
- */
- @Deprecated
- public RuleParam() {
- }
-
- /**
- * @deprecated since 2.3 use the factory method setParameter()
- */
- @Deprecated
- public RuleParam(Rule rule, String key, String description, String type) {
- this.rule = rule;
- this.key = key;
- this.description = description;
- this.type = type;
- }
-
- public Rule getRule() {
- return rule;
- }
-
- RuleParam setRule(Rule rule) {
- this.rule = rule;
- return this;
- }
-
- public String getKey() {
- return key;
- }
-
- public RuleParam setKey(String key) {
- this.key = key;
- return this;
- }
-
- public String getDescription() {
- return description;
- }
-
- public RuleParam setDescription(String s) {
- this.description = StringUtils.defaultString(s, "");
- return this;
- }
-
- public String getType() {
- return type;
- }
-
- public RuleParam setType(String type) {
- this.type = type;
- return this;
- }
-
- public String getDefaultValue() {
- return defaultValue;
- }
-
- public Boolean getDefaultValueAsBoolean() {
- if (defaultValue!=null) {
- return Boolean.parseBoolean(defaultValue);
- }
- return null;
- }
-
- public Integer getDefaultValueAsInteger() {
- if (defaultValue!=null) {
- return Integer.parseInt(defaultValue);
- }
- return null;
- }
-
- public RuleParam setDefaultValue(String s) {
- this.defaultValue = s;
- return this;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (!(obj instanceof RuleParam)) {
- return false;
- }
- if (this == obj) {
- return true;
- }
- RuleParam other = (RuleParam) obj;
- return new EqualsBuilder()
- //.append(rule, other.getRule())
- .append(key, other.getKey()).isEquals();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder(17, 37)
- //.append(rule)
- .append(key)
- .toHashCode();
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this)
- .append("id", id)
- .append("key", key)
- .append("desc", description)
- .append("type", type)
- .toString();
- }
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.rules; + +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +import javax.persistence.*; + +@Entity +@Table(name = "rules_parameters") +public class RuleParam { + + @Id + @Column(name = "id") + @GeneratedValue + private Integer id; + + @ManyToOne(fetch = FetchType.EAGER) + @JoinColumn(name = "rule_id") + private Rule rule; + + @Column(name = "name", updatable = true, nullable = false, length = 128) + private String key; + + @Column(name = "description", updatable = true, nullable = true, length = 4000) + private String description; + + @Column(name = "param_type", updatable = true, nullable = true, length = 512) + private String type = "s"; + + @Column(name = "default_value", updatable = true, nullable = true, length = 4000) + private String defaultValue; + + /** + * @deprecated since 2.3 use the factory method Rule.setParameter() + */ + @Deprecated + public RuleParam() { + } + + /** + * @deprecated since 2.3 use the factory method setParameter() + */ + @Deprecated + public RuleParam(Rule rule, String key, String description, String type) { + this.rule = rule; + this.key = key; + this.description = description; + this.type = type; + } + + public Rule getRule() { + return rule; + } + + RuleParam setRule(Rule rule) { + this.rule = rule; + return this; + } + + public String getKey() { + return key; + } + + public RuleParam setKey(String key) { + this.key = key; + return this; + } + + public String getDescription() { + return description; + } + + public RuleParam setDescription(String s) { + this.description = StringUtils.defaultString(s, ""); + return this; + } + + public String getType() { + return type; + } + + public RuleParam setType(String type) { + this.type = type; + return this; + } + + public String getDefaultValue() { + return defaultValue; + } + + public Boolean getDefaultValueAsBoolean() { + if (defaultValue!=null) { + return Boolean.parseBoolean(defaultValue); + } + return null; + } + + public Integer getDefaultValueAsInteger() { + if (defaultValue!=null) { + return Integer.parseInt(defaultValue); + } + return null; + } + + public RuleParam setDefaultValue(String s) { + this.defaultValue = s; + return this; + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof RuleParam)) { + return false; + } + if (this == obj) { + return true; + } + RuleParam other = (RuleParam) obj; + return new EqualsBuilder() + //.append(rule, other.getRule()) + .append(key, other.getKey()).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37) + //.append(rule) + .append(key) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this) + .append("id", id) + .append("key", key) + .append("desc", description) + .append("type", type) + .toString(); + } }
\ No newline at end of file diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RulePriority.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RulePriority.java index cd2b00afa8a..16ddc13664b 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RulePriority.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RulePriority.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleQuery.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleQuery.java index 8d434e0654a..6357f9aea85 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleQuery.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleRepository.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleRepository.java index 755aa90c094..5b84b90549a 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleRepository.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleRepository.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleUtils.java index 5fc9ae3edc7..bbbf9be162f 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RulesCategory.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RulesCategory.java index 207a6b01d5f..f455b0a5fb4 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RulesCategory.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RulesCategory.java @@ -1,175 +1,175 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.rules;
-
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-import org.hibernate.annotations.Cache;
-import org.hibernate.annotations.CacheConcurrencyStrategy;
-import org.hibernate.annotations.Immutable;
-import org.sonar.api.database.BaseIdentifiable;
-import org.sonar.check.IsoCategory;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Table;
-
-/**
- * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007
- */
-@Deprecated
-@Immutable
-@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
-@Entity
-@Table(name = "rules_categories")
-public class RulesCategory extends BaseIdentifiable {
-
- @Column(name = "name", updatable = false, nullable = false)
- private String name;
-
- @Column(name = "description", updatable = false, nullable = true)
- private String description;
-
- /**
- * Creates a RuleCategory based on the category name
- *
- * @param name the category name
- */
- public RulesCategory(String name) {
- this.name = name;
- }
-
- /**
- * Creates a category based on the category name and description
- *
- * @param name the category name
- * @param description the category description
- */
- public RulesCategory(String name, String description) {
- this.name = name;
- this.description = description;
- }
-
- /**
- * Creates an empty category
- */
- public RulesCategory() {
- }
-
- /**
- * @return the category name
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the category name
- *
- * @param name the name
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * @return the category description
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * Sets the cay description
- *
- * @param description the description
- */
- public void setDescription(String description) {
- this.description = description;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (!(obj instanceof RulesCategory)) {
- return false;
- }
- if (this == obj) {
- return true;
- }
- RulesCategory other = (RulesCategory) obj;
- return new EqualsBuilder()
- .append(name, other.getName()).isEquals();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder(17, 37)
- .append(name)
- .toHashCode();
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this)
- .append("id", getId())
- .append("name", name)
- .append("desc", description)
- .toString();
- }
-
- public IsoCategory toIsoCategory() {
- if (name.equals(Iso9126RulesCategories.EFFICIENCY.getName())) {
- return IsoCategory.Efficiency;
- }
- if (name.equals(Iso9126RulesCategories.MAINTAINABILITY.getName())) {
- return IsoCategory.Maintainability;
- }
- if (name.equals(Iso9126RulesCategories.PORTABILITY.getName())) {
- return IsoCategory.Portability;
- }
- if (name.equals(Iso9126RulesCategories.RELIABILITY.getName())) {
- return IsoCategory.Reliability;
- }
- if (name.equals(Iso9126RulesCategories.USABILITY.getName())) {
- return IsoCategory.Usability;
- }
- return null;
- }
-
- public static RulesCategory fromIsoCategory(IsoCategory iso) {
- if (iso == IsoCategory.Efficiency) {
- return Iso9126RulesCategories.EFFICIENCY;
- }
- if (iso == IsoCategory.Maintainability) {
- return Iso9126RulesCategories.MAINTAINABILITY;
- }
- if (iso == IsoCategory.Portability) {
- return Iso9126RulesCategories.PORTABILITY;
- }
- if (iso == IsoCategory.Reliability) {
- return Iso9126RulesCategories.RELIABILITY;
- }
- if (iso == IsoCategory.Usability) {
- return Iso9126RulesCategories.USABILITY;
- }
- return null;
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.rules; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; +import org.hibernate.annotations.Immutable; +import org.sonar.api.database.BaseIdentifiable; +import org.sonar.check.IsoCategory; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007 + */ +@Deprecated +@Immutable +@Cache(usage = CacheConcurrencyStrategy.READ_ONLY) +@Entity +@Table(name = "rules_categories") +public class RulesCategory extends BaseIdentifiable { + + @Column(name = "name", updatable = false, nullable = false) + private String name; + + @Column(name = "description", updatable = false, nullable = true) + private String description; + + /** + * Creates a RuleCategory based on the category name + * + * @param name the category name + */ + public RulesCategory(String name) { + this.name = name; + } + + /** + * Creates a category based on the category name and description + * + * @param name the category name + * @param description the category description + */ + public RulesCategory(String name, String description) { + this.name = name; + this.description = description; + } + + /** + * Creates an empty category + */ + public RulesCategory() { + } + + /** + * @return the category name + */ + public String getName() { + return name; + } + + /** + * Sets the category name + * + * @param name the name + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the category description + */ + public String getDescription() { + return description; + } + + /** + * Sets the cay description + * + * @param description the description + */ + public void setDescription(String description) { + this.description = description; + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof RulesCategory)) { + return false; + } + if (this == obj) { + return true; + } + RulesCategory other = (RulesCategory) obj; + return new EqualsBuilder() + .append(name, other.getName()).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37) + .append(name) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this) + .append("id", getId()) + .append("name", name) + .append("desc", description) + .toString(); + } + + public IsoCategory toIsoCategory() { + if (name.equals(Iso9126RulesCategories.EFFICIENCY.getName())) { + return IsoCategory.Efficiency; + } + if (name.equals(Iso9126RulesCategories.MAINTAINABILITY.getName())) { + return IsoCategory.Maintainability; + } + if (name.equals(Iso9126RulesCategories.PORTABILITY.getName())) { + return IsoCategory.Portability; + } + if (name.equals(Iso9126RulesCategories.RELIABILITY.getName())) { + return IsoCategory.Reliability; + } + if (name.equals(Iso9126RulesCategories.USABILITY.getName())) { + return IsoCategory.Usability; + } + return null; + } + + public static RulesCategory fromIsoCategory(IsoCategory iso) { + if (iso == IsoCategory.Efficiency) { + return Iso9126RulesCategories.EFFICIENCY; + } + if (iso == IsoCategory.Maintainability) { + return Iso9126RulesCategories.MAINTAINABILITY; + } + if (iso == IsoCategory.Portability) { + return Iso9126RulesCategories.PORTABILITY; + } + if (iso == IsoCategory.Reliability) { + return Iso9126RulesCategories.RELIABILITY; + } + if (iso == IsoCategory.Usability) { + return Iso9126RulesCategories.USABILITY; + } + return null; + } +} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java index ceab5652c7e..284dbeffceb 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/ViolationFilter.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/ViolationFilter.java index 46995265c46..de54e229877 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/ViolationFilter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/ViolationFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/XMLRuleParser.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/XMLRuleParser.java index 8eadd746680..bd3b33af3b6 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/XMLRuleParser.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/XMLRuleParser.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/security/GroupRole.java b/sonar-plugin-api/src/main/java/org/sonar/api/security/GroupRole.java index 2493ac0b7c3..0dce5bea884 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/security/GroupRole.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/security/GroupRole.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/security/LoginPasswordAuthenticator.java b/sonar-plugin-api/src/main/java/org/sonar/api/security/LoginPasswordAuthenticator.java index 069042f048f..41dbc13cfea 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/security/LoginPasswordAuthenticator.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/security/LoginPasswordAuthenticator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/security/UserRole.java b/sonar-plugin-api/src/main/java/org/sonar/api/security/UserRole.java index 15e42b57087..eb1a8a10598 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/security/UserRole.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/security/UserRole.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/AnnotationUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/AnnotationUtils.java index bcf9e1a512e..7afb1120c94 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/AnnotationUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/AnnotationUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpDownloader.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpDownloader.java index 923e1606e10..aba708165ed 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpDownloader.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpDownloader.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/IocContainer.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/IocContainer.java index 87bb6b2c035..7791d04fd49 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/IocContainer.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/IocContainer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValue.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValue.java index ebfd9b603a0..6bfe9d62807 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValue.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValue.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValueFormat.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValueFormat.java index aac614f317b..787162c228c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValueFormat.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValueFormat.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/LocalizedMessages.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/LocalizedMessages.java index c438f2c58b7..9b3dcf6fb2e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/LocalizedMessages.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/LocalizedMessages.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/Logs.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/Logs.java index 8154c5dbfd4..ccc85fa226f 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/Logs.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/Logs.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/ManifestUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/ManifestUtils.java index d1130e26267..71df08e8478 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/ManifestUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/ManifestUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/ParsingUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/ParsingUtils.java index 6e154a59b0b..616912af755 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/ParsingUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/ParsingUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/ServerHttpClient.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/ServerHttpClient.java index 9ab2a186513..50f1933ca52 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/ServerHttpClient.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/ServerHttpClient.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/SonarException.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/SonarException.java index 44a00f3c774..1f0ed02b0bb 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/SonarException.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/SonarException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/StaxParser.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/StaxParser.java index e210f59abed..2078e831ac3 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/StaxParser.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/StaxParser.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/TempFileUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/TempFileUtils.java index 06a5b96e403..fc2a2401191 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/TempFileUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/TempFileUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/TimeProfiler.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/TimeProfiler.java index d081de68d40..38650527e00 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/TimeProfiler.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/TimeProfiler.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/ValidationMessages.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/ValidationMessages.java index c76c0bfcaf9..36a231002ac 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/ValidationMessages.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/ValidationMessages.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/WildcardPattern.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/WildcardPattern.java index 2aa913e1929..2f1a46a9a1d 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/WildcardPattern.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/WildcardPattern.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/XmlParserException.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/XmlParserException.java index e81b23b28af..3f88367caf9 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/XmlParserException.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/XmlParserException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/XpathParser.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/XpathParser.java index 6dff6e01fc9..f1266bb7bd3 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/XpathParser.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/XpathParser.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/ZipUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/ZipUtils.java index fdefda6ac62..a4d107347a5 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/ZipUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/ZipUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/dag/CyclicDependenciesException.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/dag/CyclicDependenciesException.java index b35f037da94..c8967512a1c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/dag/CyclicDependenciesException.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/dag/CyclicDependenciesException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/dag/DirectAcyclicGraph.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/dag/DirectAcyclicGraph.java index f6348e87ee0..49d0cd1f736 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/dag/DirectAcyclicGraph.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/dag/DirectAcyclicGraph.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/dag/Node.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/dag/Node.java index b47cda548d3..fcb48e0b95e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/dag/Node.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/dag/Node.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/AbstractDashboardWidget.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/AbstractDashboardWidget.java index dcc5ca2179f..78be6e14d52 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/AbstractDashboardWidget.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/AbstractDashboardWidget.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/AbstractRubyTemplate.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/AbstractRubyTemplate.java index a9f9c22428c..068de017d33 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/AbstractRubyTemplate.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/AbstractRubyTemplate.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/CodeColorizerFormat.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/CodeColorizerFormat.java index a02adf2ca2d..163b742e3f9 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/CodeColorizerFormat.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/CodeColorizerFormat.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/DefaultTab.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/DefaultTab.java index 27bb8cc9bfe..20d0a7ca39f 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/DefaultTab.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/DefaultTab.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/Description.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/Description.java index 17baa1a731d..9759c3f40ae 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/Description.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/Description.java @@ -1,31 +1,31 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.web;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-public @interface Description {
- String value();
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.web; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface Description { + String value(); +} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/Footer.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/Footer.java index 0bf9f56ee21..bfaa0816cd2 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/Footer.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/Footer.java @@ -1,33 +1,33 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.web;
-
-import org.sonar.api.ServerExtension;
-
-/**
- * @since 1.10
- */
-public interface Footer extends ServerExtension {
-
- /**
- * Static HTML (no Ruby on Rails nor GWT)
- */
- String getHtml();
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.web; + +import org.sonar.api.ServerExtension; + +/** + * @since 1.10 + */ +public interface Footer extends ServerExtension { + + /** + * Static HTML (no Ruby on Rails nor GWT) + */ + String getHtml(); +} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/GwtExtension.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/GwtExtension.java index 1281aa966c7..508af151712 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/GwtExtension.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/GwtExtension.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/GwtPage.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/GwtPage.java index b4942b2a6c8..7554d35b8dd 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/GwtPage.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/GwtPage.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/NavigationSection.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/NavigationSection.java index 3bccd751aeb..ee24976d3c5 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/NavigationSection.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/NavigationSection.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/Page.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/Page.java index ebed61f4f0a..cb4abb46495 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/Page.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/Page.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceLanguage.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceLanguage.java index 7c8a80d3af8..cc7e8f2d6af 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceLanguage.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceLanguage.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceQualifier.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceQualifier.java index 7b6a02cfa0a..ee0e9340f6d 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceQualifier.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceQualifier.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceScope.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceScope.java index 82c1e7ea4db..42689fb27c4 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceScope.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceScope.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsPage.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsPage.java index 7f802040597..ea82c1668d0 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsPage.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsPage.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWebservice.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWebservice.java index 5746873914e..94801b81221 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWebservice.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWebservice.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWidget.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWidget.java index be2d0418919..c2e645e6c5c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWidget.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWidget.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/Section.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/Section.java index 8f118df0660..2a678aac4cc 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/Section.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/Section.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/UserRole.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/UserRole.java index 491fa25d6dd..3baf1dcf48f 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/UserRole.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/UserRole.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/View.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/View.java index 3e3dfabc9d4..cc2d655b7df 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/View.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/View.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/Webservice.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/Webservice.java index 9610b0183c8..f9330af0029 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/Webservice.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/Webservice.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/Widget.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/Widget.java index 016dc481391..e28b7a70754 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/Widget.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/Widget.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetCategory.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetCategory.java index b6a72ebccb9..682accf6c0c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetCategory.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetCategory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetLayout.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetLayout.java index 81a0b872605..def49bc3ac7 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetLayout.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetLayout.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetLayoutType.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetLayoutType.java index ddf1f3c361e..0bcac0d21f1 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetLayoutType.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetLayoutType.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperties.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperties.java index b0d21e2aa22..053371c8e79 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperties.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperties.java @@ -1,28 +1,28 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.web;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-@Retention(RetentionPolicy.RUNTIME)
-public @interface WidgetProperties {
- WidgetProperty[] value() default {};
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.web; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) +public @interface WidgetProperties { + WidgetProperty[] value() default {}; +} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java index 37d2b1205df..b1b4b6a8b05 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java @@ -1,40 +1,40 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.web;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-public @interface WidgetProperty {
-
- String key();
-
- WidgetPropertyType type() default WidgetPropertyType.STRING;
-
- String defaultValue() default "";
-
- String description() default "";
-
- boolean optional() default true;
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.web; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface WidgetProperty { + + String key(); + + WidgetPropertyType type() default WidgetPropertyType.STRING; + + String defaultValue() default ""; + + String description() default ""; + + boolean optional() default true; +} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetPropertyType.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetPropertyType.java index 6481cd552c3..35c58e560f1 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetPropertyType.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetPropertyType.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/AbstractPage.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/AbstractPage.java index 9e0842af352..08ecfa30815 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/AbstractPage.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/AbstractPage.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/AbstractViewer.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/AbstractViewer.java index 0d442fd541a..1fbc0c8422a 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/AbstractViewer.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/AbstractViewer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/ResourceDictionary.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/ResourceDictionary.java index 7e45a702174..2453e5646e9 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/ResourceDictionary.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/ResourceDictionary.java @@ -1,59 +1,59 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.web.gwt.client;
-
-import com.google.gwt.i18n.client.Dictionary;
-
-public final class ResourceDictionary {
-
- public final static String CONF_PERMALINK_BASE = "permalink_url_base";
- public final static String CONF_RESOURCE_KEY = "resource_key";
- public final static String CONF_V_RESOURCE_KEY = "viewer_resource_key";
- public final static String CONF_V_PLUGIN_KEY = "viewer_plugin_key";
- public final static String CONF_V_METRIC_KEY = "metric";
-
- private ResourceDictionary() {
- }
-
- public static String getPermaLinkURLBase() {
- return Utils.getConfiguration(CONF_PERMALINK_BASE);
- }
-
- public static String getResourceKey() {
- return Utils.getConfiguration(CONF_RESOURCE_KEY);
- }
-
- public static String getViewerResourceKey() {
- return Utils.getConfiguration(CONF_V_RESOURCE_KEY);
- }
-
- public static String getViewerPluginKey() {
- return Utils.getConfiguration(CONF_V_PLUGIN_KEY);
- }
-
- public static String getViewerMetricKey() {
- return Utils.getConfiguration(CONF_V_METRIC_KEY);
- }
-
- public static Dictionary getResourceViewers() {
- return Dictionary.getDictionary("resource_viewers");
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.web.gwt.client; + +import com.google.gwt.i18n.client.Dictionary; + +public final class ResourceDictionary { + + public final static String CONF_PERMALINK_BASE = "permalink_url_base"; + public final static String CONF_RESOURCE_KEY = "resource_key"; + public final static String CONF_V_RESOURCE_KEY = "viewer_resource_key"; + public final static String CONF_V_PLUGIN_KEY = "viewer_plugin_key"; + public final static String CONF_V_METRIC_KEY = "metric"; + + private ResourceDictionary() { + } + + public static String getPermaLinkURLBase() { + return Utils.getConfiguration(CONF_PERMALINK_BASE); + } + + public static String getResourceKey() { + return Utils.getConfiguration(CONF_RESOURCE_KEY); + } + + public static String getViewerResourceKey() { + return Utils.getConfiguration(CONF_V_RESOURCE_KEY); + } + + public static String getViewerPluginKey() { + return Utils.getConfiguration(CONF_V_PLUGIN_KEY); + } + + public static String getViewerMetricKey() { + return Utils.getConfiguration(CONF_V_METRIC_KEY); + } + + public static Dictionary getResourceViewers() { + return Dictionary.getDictionary("resource_viewers"); + } + +} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/Utils.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/Utils.java index 7bcee0fe809..4c19d9cd61c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/Utils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/Utils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/AbstractResourceQuery.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/AbstractResourceQuery.java index 59eb1744f83..07873b3eff2 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/AbstractResourceQuery.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/AbstractResourceQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/BaseQueryCallback.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/BaseQueryCallback.java index 119422740a5..ba17c5ea0a8 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/BaseQueryCallback.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/BaseQueryCallback.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/FileSource.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/FileSource.java index 395687c84da..db4a15414c3 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/FileSource.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/FileSource.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/JSONHandlerDispatcher.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/JSONHandlerDispatcher.java index ee70c4993bd..4f5fa9cf9bd 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/JSONHandlerDispatcher.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/JSONHandlerDispatcher.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/JsonUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/JsonUtils.java index 42a11919474..2ed28c9ff68 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/JsonUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/JsonUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Measure.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Measure.java index 36a72215de4..51fa83584cb 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Measure.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Measure.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/MetricsQuery.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/MetricsQuery.java index 7499c0e9a14..628dc3daf23 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/MetricsQuery.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/MetricsQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Properties.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Properties.java index 0dea1ab0c78..792ca98c957 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Properties.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Properties.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/PropertiesQuery.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/PropertiesQuery.java index e71ecb9cdba..4526bbe7455 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/PropertiesQuery.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/PropertiesQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Property.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Property.java index 4ceebc39cbd..e29d8ea4f83 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Property.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Property.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Query.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Query.java index ea573ab0bb3..1509665b08b 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Query.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Query.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/QueryCallBack.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/QueryCallBack.java index 431e07ebb9b..f0d433a8815 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/QueryCallBack.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/QueryCallBack.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Resource.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Resource.java index 01814aed111..17006192956 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Resource.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Resource.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Resources.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Resources.java index dbbd9f84fe5..56cbfd9972c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Resources.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Resources.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/ResourcesQuery.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/ResourcesQuery.java index 16035d61847..b984bfe0383 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/ResourcesQuery.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/ResourcesQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/ResponsePOJO.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/ResponsePOJO.java index 7accea548bf..2f2e6abb335 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/ResponsePOJO.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/ResponsePOJO.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Rule.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Rule.java index 08bff405efe..dd4f5bf7873 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Rule.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Rule.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/SequentialQueries.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/SequentialQueries.java index dd827891912..ebbcd3926d5 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/SequentialQueries.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/SequentialQueries.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/SourcesQuery.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/SourcesQuery.java index ce0d71fcfa8..fc60936362e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/SourcesQuery.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/SourcesQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Violation.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Violation.java index a21ae80717e..9e522d2b028 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Violation.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Violation.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Violations.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Violations.java index e1101ff5f93..7cd70b466cd 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Violations.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Violations.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/ViolationsQuery.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/ViolationsQuery.java index 4314aa19050..ef699338d27 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/ViolationsQuery.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/ViolationsQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/VoidResponse.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/VoidResponse.java index 9b8879f5c04..593254c98bb 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/VoidResponse.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/VoidResponse.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/WSMetrics.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/WSMetrics.java index edbccfeb04c..ee1b5c409f1 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/WSMetrics.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/WSMetrics.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/widgets/LoadingLabel.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/widgets/LoadingLabel.java index 72d45bea4df..440485a24d8 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/widgets/LoadingLabel.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/widgets/LoadingLabel.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/BaseModelTestCase.java b/sonar-plugin-api/src/test/java/org/sonar/api/BaseModelTestCase.java index 358a3ae61e1..28d1ac15e2d 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/BaseModelTestCase.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/BaseModelTestCase.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractCoverageExtensionTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractCoverageExtensionTest.java index 036b8647878..56e5074fe82 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractCoverageExtensionTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractCoverageExtensionTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractDivisionDecoratorTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractDivisionDecoratorTest.java index 3bce6e7cc91..ffb4c6e0bc4 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractDivisionDecoratorTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractDivisionDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractFileComplexityDecoratorTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractFileComplexityDecoratorTest.java index 60ad51521be..815df0c99ff 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractFileComplexityDecoratorTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractFileComplexityDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractFunctionComplexityDecoratorTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractFunctionComplexityDecoratorTest.java index 895e2a0c445..35a9e7be525 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractFunctionComplexityDecoratorTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractFunctionComplexityDecoratorTest.java @@ -1,88 +1,88 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.batch;
-
-import org.junit.Test;
-import static org.mockito.Mockito.*;
-import org.sonar.api.measures.CoreMetrics;
-import org.sonar.api.measures.Measure;
-import org.sonar.api.resources.Directory;
-import org.sonar.api.resources.File;
-import org.sonar.api.resources.Java;
-import org.sonar.api.resources.Resource;
-
-public class AbstractFunctionComplexityDecoratorTest {
-
- @Test
- public void calculateFunctionComplexity() {
-
- Resource directory = new Directory("fake");
- DecoratorContext context = mock(DecoratorContext.class);
- when(context.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 200.0));
- when(context.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 500.0));
-
- new AbstractFunctionComplexityDecorator(Java.INSTANCE) {
- }.decorate(directory, context);
-
- verify(context).saveMeasure(CoreMetrics.FUNCTION_COMPLEXITY, 2.5);
- }
-
- @Test
- public void noAverageIfMissingData() {
-
- DecoratorContext context = mock(DecoratorContext.class);
- when(context.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 20.0));
- Resource directory = new Directory("fake");
-
- new AbstractFunctionComplexityDecorator(Java.INSTANCE) {
- }.decorate(directory, context);
-
- verify(context, never()).saveMeasure(eq(CoreMetrics.FUNCTION_COMPLEXITY), anyDouble());
- }
-
- @Test
- public void noAverageIfZeroFiles() {
- AbstractFunctionComplexityDecorator decorator = new AbstractFunctionComplexityDecorator(Java.INSTANCE) {
- };
-
- Resource directory = new Directory("fake");
- DecoratorContext context = mock(DecoratorContext.class);
- when(context.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 0.0));
- when(context.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 500.0));
-
- decorator.decorate(directory, context);
-
- verify(context, never()).saveMeasure(eq(CoreMetrics.FUNCTION_COMPLEXITY), anyDouble());
- }
-
- @Test
- public void doNotCalculateOnFiles() {
-
- Resource file = new File("fake");
- DecoratorContext context = mock(DecoratorContext.class);
- when(context.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 1.0));
- when(context.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 25.0));
-
- new AbstractFunctionComplexityDecorator(Java.INSTANCE) {
- }.decorate(file, context);
-
- verify(context).saveMeasure(eq(CoreMetrics.FUNCTION_COMPLEXITY), anyDouble());
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.batch; + +import org.junit.Test; +import static org.mockito.Mockito.*; +import org.sonar.api.measures.CoreMetrics; +import org.sonar.api.measures.Measure; +import org.sonar.api.resources.Directory; +import org.sonar.api.resources.File; +import org.sonar.api.resources.Java; +import org.sonar.api.resources.Resource; + +public class AbstractFunctionComplexityDecoratorTest { + + @Test + public void calculateFunctionComplexity() { + + Resource directory = new Directory("fake"); + DecoratorContext context = mock(DecoratorContext.class); + when(context.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 200.0)); + when(context.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 500.0)); + + new AbstractFunctionComplexityDecorator(Java.INSTANCE) { + }.decorate(directory, context); + + verify(context).saveMeasure(CoreMetrics.FUNCTION_COMPLEXITY, 2.5); + } + + @Test + public void noAverageIfMissingData() { + + DecoratorContext context = mock(DecoratorContext.class); + when(context.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 20.0)); + Resource directory = new Directory("fake"); + + new AbstractFunctionComplexityDecorator(Java.INSTANCE) { + }.decorate(directory, context); + + verify(context, never()).saveMeasure(eq(CoreMetrics.FUNCTION_COMPLEXITY), anyDouble()); + } + + @Test + public void noAverageIfZeroFiles() { + AbstractFunctionComplexityDecorator decorator = new AbstractFunctionComplexityDecorator(Java.INSTANCE) { + }; + + Resource directory = new Directory("fake"); + DecoratorContext context = mock(DecoratorContext.class); + when(context.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 0.0)); + when(context.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 500.0)); + + decorator.decorate(directory, context); + + verify(context, never()).saveMeasure(eq(CoreMetrics.FUNCTION_COMPLEXITY), anyDouble()); + } + + @Test + public void doNotCalculateOnFiles() { + + Resource file = new File("fake"); + DecoratorContext context = mock(DecoratorContext.class); + when(context.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 1.0)); + when(context.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 25.0)); + + new AbstractFunctionComplexityDecorator(Java.INSTANCE) { + }.decorate(file, context); + + verify(context).saveMeasure(eq(CoreMetrics.FUNCTION_COMPLEXITY), anyDouble()); + } +} diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractSourceImporterTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractSourceImporterTest.java index d0048d72e0c..23a237c555d 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractSourceImporterTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractSourceImporterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractSumChildrenDecoratorTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractSumChildrenDecoratorTest.java index 90a4417dc4b..15eb4858607 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractSumChildrenDecoratorTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractSumChildrenDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/BatchExtensionDictionnaryTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/BatchExtensionDictionnaryTest.java index 267bdfdd468..210da5a4c59 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/BatchExtensionDictionnaryTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/BatchExtensionDictionnaryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/DefaultFormulaDataTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/DefaultFormulaDataTest.java index 8b526306754..e98ccf5d963 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/DefaultFormulaDataTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/DefaultFormulaDataTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/SquidUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/SquidUtilsTest.java index 3b9d1a6ab6b..38378daf688 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/SquidUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/SquidUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/TimeMachineQueryTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/TimeMachineQueryTest.java index 310f0ee739c..66637d92b83 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/TimeMachineQueryTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/TimeMachineQueryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenPluginTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenPluginTest.java index 92a12cd7704..e6dacbe1afc 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenPluginTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenPluginTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenSurefireUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenSurefireUtilsTest.java index 195044b8b60..ffada43c8c8 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenSurefireUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenSurefireUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenUtilsTest.java index 8f52c63c927..06dc28eee49 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/charts/AbstractChartTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/charts/AbstractChartTest.java index d9d265e7e3e..2a653d153e0 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/charts/AbstractChartTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/charts/AbstractChartTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/charts/ChartParametersTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/charts/ChartParametersTest.java index 223d0f9b495..44f02154d80 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/charts/ChartParametersTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/charts/ChartParametersTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java index 9b0e286506c..396ec88653b 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithIntegerProperty.java b/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithIntegerProperty.java index 3df303974ec..64858732615 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithIntegerProperty.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithIntegerProperty.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithKey.java b/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithKey.java index ca8457d9ade..6d0587dc124 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithKey.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithKey.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithOverriddenPropertyKey.java b/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithOverriddenPropertyKey.java index f1ecc47e0d3..6dbc137e72d 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithOverriddenPropertyKey.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithOverriddenPropertyKey.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithPrimitiveProperties.java b/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithPrimitiveProperties.java index 35f3c7702ea..3b9669158c6 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithPrimitiveProperties.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithPrimitiveProperties.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithStringProperty.java b/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithStringProperty.java index 0167652ca10..6ef9cf34293 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithStringProperty.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithStringProperty.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithUnsupportedPropertyType.java b/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithUnsupportedPropertyType.java index 16f7fd36083..f5189b39d49 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithUnsupportedPropertyType.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithUnsupportedPropertyType.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithoutProperties.java b/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithoutProperties.java index 6667ea9efb6..59c47ef159d 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithoutProperties.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithoutProperties.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/NoSonarFilterTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/checks/NoSonarFilterTest.java index bca7706b9c6..895c38bfc97 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/NoSonarFilterTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/checks/NoSonarFilterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/database/model/RuleFailureModelTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/database/model/RuleFailureModelTest.java index 5f4d2e61fa8..776739af041 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/database/model/RuleFailureModelTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/database/model/RuleFailureModelTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/database/model/SnapshotTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/database/model/SnapshotTest.java index 29458cb9fd7..a98ffe7835f 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/database/model/SnapshotTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/database/model/SnapshotTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/design/DependencyTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/design/DependencyTest.java index 53702adb118..63815f8ec0f 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/design/DependencyTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/design/DependencyTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/measures/AverageComplexityFormulaTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/measures/AverageComplexityFormulaTest.java index 6ab8cffe522..0739e62be46 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/measures/AverageComplexityFormulaTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/measures/AverageComplexityFormulaTest.java @@ -1,130 +1,130 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.measures;
-
-import com.google.common.collect.Lists;
-import org.junit.Before;
-import org.junit.Test;
-import org.sonar.api.resources.JavaFile;
-
-import java.util.List;
-
-import static junit.framework.Assert.assertNull;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-public class AverageComplexityFormulaTest {
-
- private FormulaContext context;
- private FormulaData data;
-
- @Before
- public void before() {
- context = mock(FormulaContext.class);
- when(context.getTargetMetric()).thenReturn(CoreMetrics.FUNCTION_COMPLEXITY);
- data = mock(FormulaData.class);
- }
-
- @Test
- public void testAverageCalculation() {
- List<FormulaData> childrenData = Lists.newArrayList();
- FormulaData data1 = mock(FormulaData.class);
- childrenData.add(data1);
- when(data1.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 43.0));
- when(data1.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 107.0));
-
- FormulaData data2 = mock(FormulaData.class);
- childrenData.add(data2);
- when(data2.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 127.0));
- when(data2.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 233.0));
-
- when(data.getChildren()).thenReturn(childrenData);
-
- Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context);
-
- assertThat(measure.getValue(), is(2.0));
- }
-
- @Test
- public void testWhenNoChildrenMesaures() {
- List<FormulaData> childrenData = Lists.newArrayList();
- when(data.getChildren()).thenReturn(childrenData);
- Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context);
- assertNull(measure);
- }
-
- @Test
- public void testWhenNoComplexityMesaures() {
- List<FormulaData> childrenData = Lists.newArrayList();
- FormulaData data1 = mock(FormulaData.class);
- childrenData.add(data1);
- when(data1.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 43.0));
-
- when(data.getChildren()).thenReturn(childrenData);
- Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context);
-
- assertNull(measure);
- }
-
- @Test
- public void testWhenNoByMetricMesaures() {
- List<FormulaData> childrenData = Lists.newArrayList();
- FormulaData data1 = mock(FormulaData.class);
- childrenData.add(data1);
- when(data1.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 43.0));
-
- when(data.getChildren()).thenReturn(childrenData);
- Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context);
-
- assertNull(measure);
- }
-
- @Test
- public void testWhenMixedMetrics() {
- List<FormulaData> childrenData = Lists.newArrayList();
- FormulaData data1 = mock(FormulaData.class);
- childrenData.add(data1);
- when(data1.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 43.0));
- when(data1.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 107.0));
-
- FormulaData data2 = mock(FormulaData.class);
- childrenData.add(data2);
- when(data2.getMeasure(CoreMetrics.PARAGRAPHS)).thenReturn(new Measure(CoreMetrics.PARAGRAPHS, 127.0));
- when(data2.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 233.0));
-
- when(data.getChildren()).thenReturn(childrenData);
-
- Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context);
-
- assertThat(measure.getValue(), is(2.5));
- }
-
- @Test
- public void testCalculationForFIle() {
- when(data.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 60.0));
- when(data.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 20.0));
- when(context.getResource()).thenReturn(new JavaFile("foo"));
-
- Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context);
- assertThat(measure.getValue(), is(3.0));
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.measures; + +import com.google.common.collect.Lists; +import org.junit.Before; +import org.junit.Test; +import org.sonar.api.resources.JavaFile; + +import java.util.List; + +import static junit.framework.Assert.assertNull; +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +public class AverageComplexityFormulaTest { + + private FormulaContext context; + private FormulaData data; + + @Before + public void before() { + context = mock(FormulaContext.class); + when(context.getTargetMetric()).thenReturn(CoreMetrics.FUNCTION_COMPLEXITY); + data = mock(FormulaData.class); + } + + @Test + public void testAverageCalculation() { + List<FormulaData> childrenData = Lists.newArrayList(); + FormulaData data1 = mock(FormulaData.class); + childrenData.add(data1); + when(data1.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 43.0)); + when(data1.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 107.0)); + + FormulaData data2 = mock(FormulaData.class); + childrenData.add(data2); + when(data2.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 127.0)); + when(data2.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 233.0)); + + when(data.getChildren()).thenReturn(childrenData); + + Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context); + + assertThat(measure.getValue(), is(2.0)); + } + + @Test + public void testWhenNoChildrenMesaures() { + List<FormulaData> childrenData = Lists.newArrayList(); + when(data.getChildren()).thenReturn(childrenData); + Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context); + assertNull(measure); + } + + @Test + public void testWhenNoComplexityMesaures() { + List<FormulaData> childrenData = Lists.newArrayList(); + FormulaData data1 = mock(FormulaData.class); + childrenData.add(data1); + when(data1.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 43.0)); + + when(data.getChildren()).thenReturn(childrenData); + Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context); + + assertNull(measure); + } + + @Test + public void testWhenNoByMetricMesaures() { + List<FormulaData> childrenData = Lists.newArrayList(); + FormulaData data1 = mock(FormulaData.class); + childrenData.add(data1); + when(data1.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 43.0)); + + when(data.getChildren()).thenReturn(childrenData); + Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context); + + assertNull(measure); + } + + @Test + public void testWhenMixedMetrics() { + List<FormulaData> childrenData = Lists.newArrayList(); + FormulaData data1 = mock(FormulaData.class); + childrenData.add(data1); + when(data1.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 43.0)); + when(data1.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 107.0)); + + FormulaData data2 = mock(FormulaData.class); + childrenData.add(data2); + when(data2.getMeasure(CoreMetrics.PARAGRAPHS)).thenReturn(new Measure(CoreMetrics.PARAGRAPHS, 127.0)); + when(data2.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 233.0)); + + when(data.getChildren()).thenReturn(childrenData); + + Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context); + + assertThat(measure.getValue(), is(2.5)); + } + + @Test + public void testCalculationForFIle() { + when(data.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 60.0)); + when(data.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 20.0)); + when(context.getResource()).thenReturn(new JavaFile("foo")); + + Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context); + assertThat(measure.getValue(), is(3.0)); + } +} diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/measures/CountDistributionBuilderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/measures/CountDistributionBuilderTest.java index 2870e5911a9..8d793c1be21 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/measures/CountDistributionBuilderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/measures/CountDistributionBuilderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeanAggregationFormulaTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeanAggregationFormulaTest.java index 1ff79ef1f8d..0d34d5bf5b1 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeanAggregationFormulaTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeanAggregationFormulaTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasureTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasureTest.java index 430e2131e98..50f2a329574 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasureTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasureTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasureUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasureUtilsTest.java index cb1a653f764..81faf56e385 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasureUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasureUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasuresFiltersTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasuresFiltersTest.java index 7d0e417f734..82bb96efad2 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasuresFiltersTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasuresFiltersTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/measures/PersistenceModeTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/measures/PersistenceModeTest.java index 0f5425013a4..1103978f5fc 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/measures/PersistenceModeTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/measures/PersistenceModeTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/measures/PropertiesBuilderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/measures/PropertiesBuilderTest.java index 6c2aa919f38..781e783bdcd 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/measures/PropertiesBuilderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/measures/PropertiesBuilderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/measures/RangeDistributionBuilderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/measures/RangeDistributionBuilderTest.java index fd51bc32fb7..cd26092601f 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/measures/RangeDistributionBuilderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/measures/RangeDistributionBuilderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/measures/RuleMeasureTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/measures/RuleMeasureTest.java index 92c601e1d7f..12e25cb675a 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/measures/RuleMeasureTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/measures/RuleMeasureTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/measures/SumChildDistributionFormulaTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/measures/SumChildDistributionFormulaTest.java index 6c6b6100c50..1e307e47237 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/measures/SumChildDistributionFormulaTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/measures/SumChildDistributionFormulaTest.java @@ -1,141 +1,141 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.measures;
-
-import com.google.common.collect.Lists;
-import org.junit.Before;
-import org.junit.Test;
-import org.sonar.api.resources.File;
-import org.sonar.api.resources.JavaFile;
-import org.sonar.api.resources.JavaPackage;
-import org.sonar.api.resources.Scopes;
-
-import java.util.Collections;
-import java.util.List;
-
-import static junit.framework.Assert.assertNull;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-public class SumChildDistributionFormulaTest {
- SumChildDistributionFormula formula;
- FormulaContext context;
- FormulaData data;
-
- @Before
- public void init() {
- formula = new SumChildDistributionFormula();
- context = mock(FormulaContext.class);
- when(context.getResource()).thenReturn(new File("foo"));
- data = mock(FormulaData.class);
- }
-
- @Test
- public void testWhenGetChildrenReturnsNull() {
- when(context.getTargetMetric()).thenReturn(new Metric("foo"));
- when(data.getChildrenMeasures(new Metric("foo"))).thenReturn(null);
- assertNull(formula.calculate(data, context));
- }
-
- @Test
- public void testWhenGetChildrenReturnsEmpty() {
- when(context.getTargetMetric()).thenReturn(new Metric("foo"));
- when(data.getChildrenMeasures(new Metric("foo"))).thenReturn((List) Collections.emptyList());
- assertNull(formula.calculate(data, context));
- }
-
- @Test
- public void shouldNotSumDifferentRanges() {
- Metric m = new Metric("foo", Metric.ValueType.DATA);
- when(context.getTargetMetric()).thenReturn(m);
-
- List<Measure> list = Lists.newArrayList(
- new Measure(m, "1=0;2=2;5=0;10=10;20=2"),
- new Measure(m, "1=0;2=2;5=0;10=10;30=3")
- );
- when(data.getChildrenMeasures(new Metric("foo"))).thenReturn(list);
- assertThat(formula.calculate(data, context), nullValue());
- }
-
- @Test
- public void shouldSumSameIntRanges() {
- Metric m = new Metric("foo", Metric.ValueType.DATA);
- when(context.getTargetMetric()).thenReturn(m);
-
- List<Measure> list = Lists.newArrayList(
- new Measure(m, "1=0;2=2;5=0;10=10;20=2"),
- new Measure(m, "1=3;2=2;5=3;10=12;20=0")
- );
- when(data.getChildrenMeasures(new Metric("foo"))).thenReturn(list);
- assertThat(formula.calculate(data, context).getData(), is("1=3;2=4;5=3;10=22;20=2"));
- }
-
- @Test
- public void shouldSumSameDoubleRanges() {
- initContextWithChildren();
- assertThat(formula.calculate(data, context).getData(), is("0.5=3;2.5=6"));
- }
-
- @Test
- public void shouldNotPersistWhenScopeLowerThanMinimun() throws Exception {
- when(context.getResource()).thenReturn(JavaFile.fromRelativePath("org/Foo.java", false));
-
- initContextWithChildren();
- formula.setMinimumScopeToPersist(Scopes.DIRECTORY);
-
- Measure distribution = formula.calculate(data, context);
- assertThat(distribution.getPersistenceMode().useDatabase(), is(false));
- }
-
- @Test
- public void shouldPersistWhenScopeEqualsMinimun() throws Exception {
- when(context.getResource()).thenReturn(JavaFile.fromRelativePath("org/Foo.java", false));
-
- initContextWithChildren();
- formula.setMinimumScopeToPersist(Scopes.FILE);
-
- Measure distribution = formula.calculate(data, context);
- assertThat(distribution.getPersistenceMode().useDatabase(), is(true));
- }
-
- @Test
- public void shouldPersistWhenScopeHigherThanMinimun() throws Exception {
- when(context.getResource()).thenReturn(new JavaPackage("org.foo"));
-
- initContextWithChildren();
- formula.setMinimumScopeToPersist(Scopes.FILE);
-
- Measure distribution = formula.calculate(data, context);
- assertThat(distribution.getPersistenceMode().useDatabase(), is(true));
- }
-
- private void initContextWithChildren() {
- Metric m = new Metric("foo", Metric.ValueType.DATA);
- when(context.getTargetMetric()).thenReturn(m);
- List<Measure> list = Lists.newArrayList(
- new Measure(m, "0.5=0;2.5=2"),
- new Measure(m, "0.5=3;2.5=4")
- );
- when(data.getChildrenMeasures(new Metric("foo"))).thenReturn(list);
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.measures; + +import com.google.common.collect.Lists; +import org.junit.Before; +import org.junit.Test; +import org.sonar.api.resources.File; +import org.sonar.api.resources.JavaFile; +import org.sonar.api.resources.JavaPackage; +import org.sonar.api.resources.Scopes; + +import java.util.Collections; +import java.util.List; + +import static junit.framework.Assert.assertNull; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.nullValue; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +public class SumChildDistributionFormulaTest { + SumChildDistributionFormula formula; + FormulaContext context; + FormulaData data; + + @Before + public void init() { + formula = new SumChildDistributionFormula(); + context = mock(FormulaContext.class); + when(context.getResource()).thenReturn(new File("foo")); + data = mock(FormulaData.class); + } + + @Test + public void testWhenGetChildrenReturnsNull() { + when(context.getTargetMetric()).thenReturn(new Metric("foo")); + when(data.getChildrenMeasures(new Metric("foo"))).thenReturn(null); + assertNull(formula.calculate(data, context)); + } + + @Test + public void testWhenGetChildrenReturnsEmpty() { + when(context.getTargetMetric()).thenReturn(new Metric("foo")); + when(data.getChildrenMeasures(new Metric("foo"))).thenReturn((List) Collections.emptyList()); + assertNull(formula.calculate(data, context)); + } + + @Test + public void shouldNotSumDifferentRanges() { + Metric m = new Metric("foo", Metric.ValueType.DATA); + when(context.getTargetMetric()).thenReturn(m); + + List<Measure> list = Lists.newArrayList( + new Measure(m, "1=0;2=2;5=0;10=10;20=2"), + new Measure(m, "1=0;2=2;5=0;10=10;30=3") + ); + when(data.getChildrenMeasures(new Metric("foo"))).thenReturn(list); + assertThat(formula.calculate(data, context), nullValue()); + } + + @Test + public void shouldSumSameIntRanges() { + Metric m = new Metric("foo", Metric.ValueType.DATA); + when(context.getTargetMetric()).thenReturn(m); + + List<Measure> list = Lists.newArrayList( + new Measure(m, "1=0;2=2;5=0;10=10;20=2"), + new Measure(m, "1=3;2=2;5=3;10=12;20=0") + ); + when(data.getChildrenMeasures(new Metric("foo"))).thenReturn(list); + assertThat(formula.calculate(data, context).getData(), is("1=3;2=4;5=3;10=22;20=2")); + } + + @Test + public void shouldSumSameDoubleRanges() { + initContextWithChildren(); + assertThat(formula.calculate(data, context).getData(), is("0.5=3;2.5=6")); + } + + @Test + public void shouldNotPersistWhenScopeLowerThanMinimun() throws Exception { + when(context.getResource()).thenReturn(JavaFile.fromRelativePath("org/Foo.java", false)); + + initContextWithChildren(); + formula.setMinimumScopeToPersist(Scopes.DIRECTORY); + + Measure distribution = formula.calculate(data, context); + assertThat(distribution.getPersistenceMode().useDatabase(), is(false)); + } + + @Test + public void shouldPersistWhenScopeEqualsMinimun() throws Exception { + when(context.getResource()).thenReturn(JavaFile.fromRelativePath("org/Foo.java", false)); + + initContextWithChildren(); + formula.setMinimumScopeToPersist(Scopes.FILE); + + Measure distribution = formula.calculate(data, context); + assertThat(distribution.getPersistenceMode().useDatabase(), is(true)); + } + + @Test + public void shouldPersistWhenScopeHigherThanMinimun() throws Exception { + when(context.getResource()).thenReturn(new JavaPackage("org.foo")); + + initContextWithChildren(); + formula.setMinimumScopeToPersist(Scopes.FILE); + + Measure distribution = formula.calculate(data, context); + assertThat(distribution.getPersistenceMode().useDatabase(), is(true)); + } + + private void initContextWithChildren() { + Metric m = new Metric("foo", Metric.ValueType.DATA); + when(context.getTargetMetric()).thenReturn(m); + List<Measure> list = Lists.newArrayList( + new Measure(m, "0.5=0;2.5=2"), + new Measure(m, "0.5=3;2.5=4") + ); + when(data.getChildrenMeasures(new Metric("foo"))).thenReturn(list); + } +} diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/measures/SumChildValuesFormulaTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/measures/SumChildValuesFormulaTest.java index b4cd0d3c88e..db4b96ed33e 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/measures/SumChildValuesFormulaTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/measures/SumChildValuesFormulaTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/platform/EnvironmentTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/platform/EnvironmentTest.java index 1ca9a50518f..81ecf2389c4 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/platform/EnvironmentTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/platform/EnvironmentTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/AnnotationProfileParserTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/AnnotationProfileParserTest.java index f80beac42c7..997ba213b73 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/AnnotationProfileParserTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/AnnotationProfileParserTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/ProfileExporterTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/ProfileExporterTest.java index 7db9a3f6897..f8955ead0ef 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/ProfileExporterTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/ProfileExporterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/ProfileImporterTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/ProfileImporterTest.java index f13af1eaae2..c21d8ce499f 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/ProfileImporterTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/ProfileImporterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/RulesProfileTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/RulesProfileTest.java index 0e54a3a824d..944805f866c 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/RulesProfileTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/RulesProfileTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileParserTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileParserTest.java index 765c58ae667..1ec43920ffd 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileParserTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileParserTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileSerializerTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileSerializerTest.java index 23df4ead208..e75d87e6a32 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileSerializerTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileSerializerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/CharacteristicPropertyTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/CharacteristicPropertyTest.java index 77062d8a372..73b08a80ddd 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/CharacteristicPropertyTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/CharacteristicPropertyTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/CharacteristicTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/CharacteristicTest.java index 6d6a23ce5ea..16232faa310 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/CharacteristicTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/CharacteristicTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/ModelTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/ModelTest.java index e9fcf8053ec..3f610c7d25a 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/ModelTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/ModelTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/AbstractLanguageTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/AbstractLanguageTest.java index 7e673064348..8f1fbae73ef 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/AbstractLanguageTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/AbstractLanguageTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/CoreMetricsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/CoreMetricsTest.java index 7861c2cd2c5..4dbc3c59035 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/CoreMetricsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/CoreMetricsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/DefaultProjectFileSystemTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/DefaultProjectFileSystemTest.java index 64733907b85..a32c84bc3dd 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/DefaultProjectFileSystemTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/DefaultProjectFileSystemTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/DirectoryTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/DirectoryTest.java index cb10b2d7ef9..57a0e1d64c6 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/DirectoryTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/DirectoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/FileTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/FileTest.java index 2e0f718b46c..e96122c5aa6 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/FileTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/FileTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/JavaFileTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/JavaFileTest.java index 123a56ce252..33b597c7f68 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/JavaFileTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/JavaFileTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/JavaPackageTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/JavaPackageTest.java index 827bbd55d61..7c157c591aa 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/JavaPackageTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/JavaPackageTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/LanguagesTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/LanguagesTest.java index 1b621f2d092..d4eb5114704 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/LanguagesTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/LanguagesTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/LibraryTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/LibraryTest.java index 473e127f384..92d9f8c2ea5 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/LibraryTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/LibraryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/ProjectLinkTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/ProjectLinkTest.java index 5d65d1e1aaa..32f682ae3cd 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/ProjectLinkTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/ProjectLinkTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/ProjectTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/ProjectTest.java index 5ebd9565d24..d52bbd6a746 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/ProjectTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/ProjectTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/QualifiersTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/QualifiersTest.java index 5927017cd95..f5c809c335b 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/QualifiersTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/QualifiersTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/ResourceUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/ResourceUtilsTest.java index 319b2975954..a5240345f6d 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/ResourceUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/ResourceUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/ScopesTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/ScopesTest.java index 71fff1d16e4..1cd288c5543 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/ScopesTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/ScopesTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotatedCheck.java b/sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotatedCheck.java index 38bd46e2149..c2439df2151 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotatedCheck.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotatedCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotatedCheckWithParameters.java b/sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotatedCheckWithParameters.java index 9780f4b18a1..4e960708d25 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotatedCheckWithParameters.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotatedCheckWithParameters.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotationRuleParserTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotationRuleParserTest.java index eb1258c82da..73a5185f57a 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotationRuleParserTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotationRuleParserTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rules/DeprecatedAnnotatedCheck.java b/sonar-plugin-api/src/test/java/org/sonar/api/rules/DeprecatedAnnotatedCheck.java index 8455d02e5ac..cc9e709eea9 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/rules/DeprecatedAnnotatedCheck.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/rules/DeprecatedAnnotatedCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleAnnotationUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleAnnotationUtilsTest.java index 455102461d1..0a715dafbf4 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleAnnotationUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleAnnotationUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rules/RulePriorityTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/rules/RulePriorityTest.java index a3ed40321b8..0751628b403 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/rules/RulePriorityTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/rules/RulePriorityTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java index 56285ed10f2..95d76b48ea0 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleUtilsTest.java index c60a5fdf604..d7256fd23a7 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rules/XMLRuleParserTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/rules/XMLRuleParserTest.java index dab65bfc564..bb76ef7a4c4 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/rules/XMLRuleParserTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/rules/XMLRuleParserTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/security/GroupRoleTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/security/GroupRoleTest.java index db82ca57482..8de913abd9b 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/security/GroupRoleTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/security/GroupRoleTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/test/IsMeasure.java b/sonar-plugin-api/src/test/java/org/sonar/api/test/IsMeasure.java index 4f738f15111..5156a28e931 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/test/IsMeasure.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/test/IsMeasure.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/test/IsResource.java b/sonar-plugin-api/src/test/java/org/sonar/api/test/IsResource.java index 2dfb8cb7311..98df8d4a8a5 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/test/IsResource.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/test/IsResource.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/test/IsRuleMeasure.java b/sonar-plugin-api/src/test/java/org/sonar/api/test/IsRuleMeasure.java index 8a86d4414ec..61469320dbb 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/test/IsRuleMeasure.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/test/IsRuleMeasure.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/test/IsViolation.java b/sonar-plugin-api/src/test/java/org/sonar/api/test/IsViolation.java index cecea4005d6..f348ef3af87 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/test/IsViolation.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/test/IsViolation.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/test/MavenTestUtils.java b/sonar-plugin-api/src/test/java/org/sonar/api/test/MavenTestUtils.java index 609d86cc913..6986d4bfe93 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/test/MavenTestUtils.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/test/MavenTestUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/test/ProjectTestBuilder.java b/sonar-plugin-api/src/test/java/org/sonar/api/test/ProjectTestBuilder.java index 895c29a436d..47725aebd79 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/test/ProjectTestBuilder.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/test/ProjectTestBuilder.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/test/SimpleProjectFileSystem.java b/sonar-plugin-api/src/test/java/org/sonar/api/test/SimpleProjectFileSystem.java index 32e7670176a..0f2ba88c5db 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/test/SimpleProjectFileSystem.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/test/SimpleProjectFileSystem.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/AnnotationUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/AnnotationUtilsTest.java index b29a86787c9..55ff0903f19 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/AnnotationUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/AnnotationUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/FakeServlet.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/FakeServlet.java index 9bf5eda61a2..c9862e79ea7 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/FakeServlet.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/FakeServlet.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java index 18324b4e799..9378f5be342 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/IocContainerTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/IocContainerTest.java index 08fa942029d..abe3578c40c 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/IocContainerTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/IocContainerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/KeyValueFormatTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/KeyValueFormatTest.java index 61cb7f02a52..6c041417eca 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/KeyValueFormatTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/KeyValueFormatTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/LocalizedMessagesTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/LocalizedMessagesTest.java index 0d7f35b79b8..038462a914e 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/LocalizedMessagesTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/LocalizedMessagesTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/ManifestUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/ManifestUtilsTest.java index c7a5870e602..f95d5a91b5d 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/ManifestUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/ManifestUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/ParsingUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/ParsingUtilsTest.java index c589230007d..8f90ceeb1f7 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/ParsingUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/ParsingUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/RedirectServlet.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/RedirectServlet.java index 902bb45932f..a46d1f94f31 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/RedirectServlet.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/RedirectServlet.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/ServerHttpClientTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/ServerHttpClientTest.java index f5108fd9c80..1798123d7c1 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/ServerHttpClientTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/ServerHttpClientTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/StaxParserTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/StaxParserTest.java index cafb64169ed..ed916e1ee98 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/StaxParserTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/StaxParserTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/TempFileUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/TempFileUtilsTest.java index a6a48a303bf..034d052f0ed 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/TempFileUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/TempFileUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/TimeProfilerTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/TimeProfilerTest.java index a46e941549c..bc82b2c529f 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/TimeProfilerTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/TimeProfilerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/ValidationMessagesTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/ValidationMessagesTest.java index ea52c4c3c73..f202e439b1b 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/ValidationMessagesTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/ValidationMessagesTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/WildcardPatternTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/WildcardPatternTest.java index 970544c7152..98396d0e4a5 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/WildcardPatternTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/WildcardPatternTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/XpathParserTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/XpathParserTest.java index 7a1ddd71926..aca0ef5c75e 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/XpathParserTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/XpathParserTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/ZipUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/ZipUtilsTest.java index 62a00f11e01..024d994f7a5 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/ZipUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/ZipUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/dag/DirectAcyclicGraphTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/dag/DirectAcyclicGraphTest.java index 599c8b5c8ef..f255a1a9a59 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/dag/DirectAcyclicGraphTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/dag/DirectAcyclicGraphTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/web/AbstractRubyTemplateTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/web/AbstractRubyTemplateTest.java index 03fe60171a8..3f300194c61 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/web/AbstractRubyTemplateTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/web/AbstractRubyTemplateTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/web/CodeColorizerFormatTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/web/CodeColorizerFormatTest.java index 142262ee0a5..a6b9dc1702d 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/web/CodeColorizerFormatTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/web/CodeColorizerFormatTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/charts/ChartFactory.java b/sonar-server/src/main/java/org/sonar/server/charts/ChartFactory.java index bb24effd0d0..bf515efe8b7 100644 --- a/sonar-server/src/main/java/org/sonar/server/charts/ChartFactory.java +++ b/sonar-server/src/main/java/org/sonar/server/charts/ChartFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/charts/ChartsServlet.java b/sonar-server/src/main/java/org/sonar/server/charts/ChartsServlet.java index 047c89b7fd4..f54967ee5a7 100644 --- a/sonar-server/src/main/java/org/sonar/server/charts/ChartsServlet.java +++ b/sonar-server/src/main/java/org/sonar/server/charts/ChartsServlet.java @@ -1,159 +1,159 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.server.charts;
-
-import org.apache.commons.io.IOUtils;
-import org.jfree.chart.encoders.KeypointPNGEncoderAdapter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.sonar.api.charts.Chart;
-import org.sonar.api.charts.ChartParameters;
-import org.sonar.server.charts.deprecated.*;
-import org.sonar.server.platform.Platform;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-
-public class ChartsServlet extends HttpServlet {
-
- private static final Logger LOG = LoggerFactory.getLogger(ChartsServlet.class);
-
- @Override
- public void doGet(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException {
- if (isDeprecatedChart(request)) {
- deprecatedDoGet(request, response);
-
- } else {
- ChartFactory chartFactory = Platform.getInstance().getContainer().getComponent(ChartFactory.class);
- Chart chart = chartFactory.getChart(request.getParameter("ck"));
- if (chart != null) {
- BufferedImage image = chart.generateImage(getParams(request));
- OutputStream out = response.getOutputStream();
- try {
- response.setContentType("image/png");
- exportAsPNG(image, out);
-
- } catch (Exception e) {
- LOG.error("Generating chart " + chart.getClass().getName(), e);
-
- } finally {
- out.close();
- }
- }
- }
- }
-
- private ChartParameters getParams(HttpServletRequest request) {
- Map<String, String> map = new HashMap<String, String>();
- Enumeration keys = request.getParameterNames();
- while (keys.hasMoreElements()) {
- String key = (String) keys.nextElement();
- String value = request.getParameter(key);
- map.put(key, value);
- }
- return new ChartParameters(map);
- }
-
- private void exportAsPNG(BufferedImage image, OutputStream out) throws IOException {
- KeypointPNGEncoderAdapter encoder = new KeypointPNGEncoderAdapter();
- encoder.setEncodingAlpha(true);
- encoder.encode(image, out);
- }
-
- public boolean isDeprecatedChart(HttpServletRequest request) {
- String chartType = request.getParameter(BaseChartWeb.CHART_PARAM_TYPE);
- if (BaseChartWeb.BAR_CHART_HORIZONTAL.equals(chartType) || BaseChartWeb.BAR_CHART_VERTICAL.equals(chartType) || BaseChartWeb.STACKED_BAR_CHART.equals(chartType)) {
- return true;
- }
- if (BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM.equals(chartType)) {
- return true;
- }
- if (BaseChartWeb.PIE_CHART.equals(chartType)) {
- return true;
- }
- if (BaseChartWeb.SPARKLINES_CHART.equals(chartType)) {
- return true;
- }
- return false;
- }
-
- public void deprecatedDoGet(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException {
-
- Map<String, String> params = new HashMap<String, String>();
- params.put(BaseChartWeb.CHART_PARAM_TYPE, request.getParameter(BaseChartWeb.CHART_PARAM_TYPE));
- params.put(BaseChartWeb.CHART_PARAM_VALUES, request.getParameter(BaseChartWeb.CHART_PARAM_VALUES));
- params.put(BaseChartWeb.CHART_PARAM_COLORS, request.getParameter(BaseChartWeb.CHART_PARAM_COLORS));
- params.put(BaseChartWeb.CHART_PARAM_RANGEMAX, request.getParameter(BaseChartWeb.CHART_PARAM_RANGEMAX));
- params.put(BaseChartWeb.CHART_PARAM_TITLE, request.getParameter(BaseChartWeb.CHART_PARAM_TITLE));
- params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, request.getParameter(BaseChartWeb.CHART_PARAM_DIMENSIONS));
- params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE, request.getParameter(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE));
- params.put(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE, request.getParameter(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE));
- params.put(BaseChartWeb.CHART_PARAM_SERIES, request.getParameter(BaseChartWeb.CHART_PARAM_SERIES));
- params.put(BaseChartWeb.CHART_PARAM_CATEGORIES, request.getParameter(BaseChartWeb.CHART_PARAM_CATEGORIES));
- params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_LOWER, request.getParameter(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_LOWER));
- params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER, request.getParameter(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER));
- params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_LOWER, request.getParameter(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_LOWER));
- params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER, request.getParameter(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER));
- params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_TICKUNIT, request.getParameter(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_TICKUNIT));
- params.put(BaseChartWeb.CHART_PARAM_INSETS, request.getParameter(BaseChartWeb.CHART_PARAM_INSETS));
- params.put(BaseChartWeb.CHART_PARAM_OUTLINE_RANGEGRIDLINES_VISIBLE, request.getParameter(BaseChartWeb.CHART_PARAM_OUTLINE_RANGEGRIDLINES_VISIBLE));
- params.put(BaseChartWeb.CHART_PARAM_OUTLINE_VISIBLE, request.getParameter(BaseChartWeb.CHART_PARAM_OUTLINE_VISIBLE));
-
- String chartType = params.get(BaseChartWeb.CHART_PARAM_TYPE);
-
- DeprecatedChart chart = null;
-
- if (BaseChartWeb.BAR_CHART_HORIZONTAL.equals(chartType) || BaseChartWeb.BAR_CHART_VERTICAL.equals(chartType) || BaseChartWeb.STACKED_BAR_CHART.equals(chartType)) {
- chart = new BarChart(params);
- } else if (BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM.equals(chartType)) {
- chart = new CustomBarChart(params);
- } else if (BaseChartWeb.PIE_CHART.equals(chartType)) {
- chart = new PieChart(params);
- } else if (BaseChartWeb.SPARKLINES_CHART.equals(chartType)) {
- chart = new SparkLinesChart(params);
- }
-
- OutputStream out = null;
- try {
- if (chart != null) {
- out = response.getOutputStream();
- response.setContentType("image/png");
- chart.exportChartAsPNG(out);
- }
-
- } catch (Exception e) {
- LOG.error("Generating chart " + chart.getClass().getName(), e);
-
- } finally {
- IOUtils.closeQuietly(out);
- }
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.server.charts; + +import org.apache.commons.io.IOUtils; +import org.jfree.chart.encoders.KeypointPNGEncoderAdapter; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.sonar.api.charts.Chart; +import org.sonar.api.charts.ChartParameters; +import org.sonar.server.charts.deprecated.*; +import org.sonar.server.platform.Platform; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.io.OutputStream; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Map; + +public class ChartsServlet extends HttpServlet { + + private static final Logger LOG = LoggerFactory.getLogger(ChartsServlet.class); + + @Override + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + if (isDeprecatedChart(request)) { + deprecatedDoGet(request, response); + + } else { + ChartFactory chartFactory = Platform.getInstance().getContainer().getComponent(ChartFactory.class); + Chart chart = chartFactory.getChart(request.getParameter("ck")); + if (chart != null) { + BufferedImage image = chart.generateImage(getParams(request)); + OutputStream out = response.getOutputStream(); + try { + response.setContentType("image/png"); + exportAsPNG(image, out); + + } catch (Exception e) { + LOG.error("Generating chart " + chart.getClass().getName(), e); + + } finally { + out.close(); + } + } + } + } + + private ChartParameters getParams(HttpServletRequest request) { + Map<String, String> map = new HashMap<String, String>(); + Enumeration keys = request.getParameterNames(); + while (keys.hasMoreElements()) { + String key = (String) keys.nextElement(); + String value = request.getParameter(key); + map.put(key, value); + } + return new ChartParameters(map); + } + + private void exportAsPNG(BufferedImage image, OutputStream out) throws IOException { + KeypointPNGEncoderAdapter encoder = new KeypointPNGEncoderAdapter(); + encoder.setEncodingAlpha(true); + encoder.encode(image, out); + } + + public boolean isDeprecatedChart(HttpServletRequest request) { + String chartType = request.getParameter(BaseChartWeb.CHART_PARAM_TYPE); + if (BaseChartWeb.BAR_CHART_HORIZONTAL.equals(chartType) || BaseChartWeb.BAR_CHART_VERTICAL.equals(chartType) || BaseChartWeb.STACKED_BAR_CHART.equals(chartType)) { + return true; + } + if (BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM.equals(chartType)) { + return true; + } + if (BaseChartWeb.PIE_CHART.equals(chartType)) { + return true; + } + if (BaseChartWeb.SPARKLINES_CHART.equals(chartType)) { + return true; + } + return false; + } + + public void deprecatedDoGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + Map<String, String> params = new HashMap<String, String>(); + params.put(BaseChartWeb.CHART_PARAM_TYPE, request.getParameter(BaseChartWeb.CHART_PARAM_TYPE)); + params.put(BaseChartWeb.CHART_PARAM_VALUES, request.getParameter(BaseChartWeb.CHART_PARAM_VALUES)); + params.put(BaseChartWeb.CHART_PARAM_COLORS, request.getParameter(BaseChartWeb.CHART_PARAM_COLORS)); + params.put(BaseChartWeb.CHART_PARAM_RANGEMAX, request.getParameter(BaseChartWeb.CHART_PARAM_RANGEMAX)); + params.put(BaseChartWeb.CHART_PARAM_TITLE, request.getParameter(BaseChartWeb.CHART_PARAM_TITLE)); + params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, request.getParameter(BaseChartWeb.CHART_PARAM_DIMENSIONS)); + params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE, request.getParameter(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE)); + params.put(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE, request.getParameter(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE)); + params.put(BaseChartWeb.CHART_PARAM_SERIES, request.getParameter(BaseChartWeb.CHART_PARAM_SERIES)); + params.put(BaseChartWeb.CHART_PARAM_CATEGORIES, request.getParameter(BaseChartWeb.CHART_PARAM_CATEGORIES)); + params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_LOWER, request.getParameter(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_LOWER)); + params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER, request.getParameter(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER)); + params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_LOWER, request.getParameter(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_LOWER)); + params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER, request.getParameter(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER)); + params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_TICKUNIT, request.getParameter(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_TICKUNIT)); + params.put(BaseChartWeb.CHART_PARAM_INSETS, request.getParameter(BaseChartWeb.CHART_PARAM_INSETS)); + params.put(BaseChartWeb.CHART_PARAM_OUTLINE_RANGEGRIDLINES_VISIBLE, request.getParameter(BaseChartWeb.CHART_PARAM_OUTLINE_RANGEGRIDLINES_VISIBLE)); + params.put(BaseChartWeb.CHART_PARAM_OUTLINE_VISIBLE, request.getParameter(BaseChartWeb.CHART_PARAM_OUTLINE_VISIBLE)); + + String chartType = params.get(BaseChartWeb.CHART_PARAM_TYPE); + + DeprecatedChart chart = null; + + if (BaseChartWeb.BAR_CHART_HORIZONTAL.equals(chartType) || BaseChartWeb.BAR_CHART_VERTICAL.equals(chartType) || BaseChartWeb.STACKED_BAR_CHART.equals(chartType)) { + chart = new BarChart(params); + } else if (BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM.equals(chartType)) { + chart = new CustomBarChart(params); + } else if (BaseChartWeb.PIE_CHART.equals(chartType)) { + chart = new PieChart(params); + } else if (BaseChartWeb.SPARKLINES_CHART.equals(chartType)) { + chart = new SparkLinesChart(params); + } + + OutputStream out = null; + try { + if (chart != null) { + out = response.getOutputStream(); + response.setContentType("image/png"); + chart.exportChartAsPNG(out); + } + + } catch (Exception e) { + LOG.error("Generating chart " + chart.getClass().getName(), e); + + } finally { + IOUtils.closeQuietly(out); + } + } + +} diff --git a/sonar-server/src/main/java/org/sonar/server/charts/deprecated/BarChart.java b/sonar-server/src/main/java/org/sonar/server/charts/deprecated/BarChart.java index 6ccbf1af2dc..d3194d5d873 100644 --- a/sonar-server/src/main/java/org/sonar/server/charts/deprecated/BarChart.java +++ b/sonar-server/src/main/java/org/sonar/server/charts/deprecated/BarChart.java @@ -1,209 +1,209 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.server.charts.deprecated;
-
-import org.jfree.chart.JFreeChart;
-import org.jfree.chart.axis.CategoryAxis;
-import org.jfree.chart.axis.NumberAxis;
-import org.jfree.chart.axis.NumberTickUnit;
-import org.jfree.chart.plot.CategoryPlot;
-import org.jfree.chart.plot.PlotOrientation;
-import org.jfree.chart.renderer.category.BarRenderer;
-import org.jfree.chart.renderer.category.StackedBarRenderer;
-import org.jfree.chart.title.TextTitle;
-import org.jfree.data.category.DefaultCategoryDataset;
-import org.jfree.ui.RectangleInsets;
-
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-public class BarChart extends BaseChartWeb implements DeprecatedChart {
-
- private BarRenderer renderer = null;
- protected DefaultCategoryDataset dataset = null;
- protected CategoryAxis categoryAxis = null;
- protected NumberAxis numberAxis = null;
-
- public BarChart(Map<String, String> params) {
- super(params);
- jfreechart = new JFreeChart(null, TextTitle.DEFAULT_FONT, new CategoryPlot(), false);
- }
-
- @Override
- protected BufferedImage getChartImage() throws IOException {
- configure();
- return getBufferedImage(jfreechart);
- }
-
- protected void configure() {
- configureChart(jfreechart, false);
- configureCategoryDataset();
- configureCategoryAxis();
- configureRenderer();
- configureRangeAxis();
- configureCategoryPlot();
- applyParams();
- }
-
- protected void configureCategoryPlot() {
- CategoryPlot plot = jfreechart.getCategoryPlot();
- plot.setNoDataMessage(DEFAULT_MESSAGE_NODATA);
- plot.setInsets(RectangleInsets.ZERO_INSETS); // To remove inner space around chart
- plot.setDataset(dataset);
- plot.setDomainAxis(categoryAxis);
- plot.setRenderer(renderer);
- plot.setRangeAxis(numberAxis);
- }
-
- protected void configureCategoryDataset() {
- dataset = new DefaultCategoryDataset();
- }
-
- protected void configureCategoryAxis() {
- categoryAxis = new CategoryAxis();
- categoryAxis.setLabelFont(DEFAULT_FONT);
- categoryAxis.setLabelPaint(BASE_COLOR);
- categoryAxis.setTickLabelFont(DEFAULT_FONT);
- categoryAxis.setTickLabelPaint(BASE_COLOR);
- categoryAxis.setVisible(false);
- }
-
- protected void configureRenderer() {
- if (params.get(BaseChartWeb.CHART_PARAM_TYPE).equals(BaseChartWeb.STACKED_BAR_CHART)) {
- renderer = new StackedBarRenderer();
- } else {
- renderer = new BarRenderer();
- }
- renderer.setItemMargin(0.0);
- renderer.setDrawBarOutline(false);
- }
-
- protected void configureRangeAxis() {
- numberAxis = new NumberAxis();
- numberAxis.setLabelFont(DEFAULT_FONT);
- numberAxis.setLabelPaint(BASE_COLOR);
- numberAxis.setTickLabelFont(DEFAULT_FONT);
- numberAxis.setTickLabelPaint(BASE_COLOR);
- numberAxis.setTickMarksVisible(true);
- numberAxis.setVisible(false);
- numberAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
- }
-
- protected void applyCommomParamsBar() {
- // -- Plot
- CategoryPlot plot = jfreechart.getCategoryPlot();
- plot.setOrientation(BaseChartWeb.BAR_CHART_VERTICAL.equals(params.get(BaseChartWeb.CHART_PARAM_TYPE)) || BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM.equals(params.get(BaseChartWeb.CHART_PARAM_TYPE)) ? PlotOrientation.VERTICAL : PlotOrientation.HORIZONTAL);
- plot.setOutlineVisible("y".equals(params.get(BaseChartWeb.CHART_PARAM_OUTLINE_VISIBLE)));
- plot.setRangeGridlinesVisible("y".equals(params.get(BaseChartWeb.CHART_PARAM_OUTLINE_RANGEGRIDLINES_VISIBLE)));
- String insetsParam = params.get(CHART_PARAM_INSETS);
- if (isParamValueValid(insetsParam)) {
- double insets = convertParamToDouble(insetsParam);
- RectangleInsets rectangleInsets = new RectangleInsets(insets, insets, insets, insets);
- plot.setInsets(rectangleInsets);
- }
-
- // -- Category Axis
- boolean categoryAxisIsVisible = "y".equals(params.get(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE));
- double categoryAxisUpperMargin = convertParamToDouble(params.get(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER), DEFAULT_CATEGORIES_AXISMARGIN);
- double categoryAxisLowerMargin = convertParamToDouble(params.get(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_LOWER), DEFAULT_CATEGORIES_AXISMARGIN);
- categoryAxis.setVisible(categoryAxisIsVisible);
- categoryAxis.setTickLabelsVisible(categoryAxisIsVisible);
- categoryAxis.setLowerMargin(categoryAxisLowerMargin);
- categoryAxis.setUpperMargin(categoryAxisUpperMargin);
-
- // -- Range Axis
- boolean rangeAxisIsVisible = "y".equals(params.get(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE));
- double rangeAxisUpperMargin = convertParamToDouble(params.get(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER), DEFAULT_SERIES_AXISMARGIN);
- double rangeAxisLowerMargin = convertParamToDouble(params.get(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_LOWER), DEFAULT_SERIES_AXISMARGIN);
- numberAxis.setTickLabelsVisible(rangeAxisIsVisible);
- numberAxis.setVisible(rangeAxisIsVisible);
- numberAxis.setLowerMargin(rangeAxisLowerMargin);
- numberAxis.setUpperMargin(rangeAxisUpperMargin);
- String rangeMax = params.get(BaseChartWeb.CHART_PARAM_RANGEMAX);
- if (isParamValueValid(rangeMax)) {
- double iRangeMax = Double.parseDouble(rangeMax);
- numberAxis.setRange(0.0, iRangeMax);
- }
- String tickUnit = params.get(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_TICKUNIT);
- if (isParamValueValid(tickUnit)) {
- numberAxis.setTickUnit(new NumberTickUnit(convertParamToDouble(tickUnit)));
- }
- }
-
- private void applyParams() {
- applyCommonParams();
- applyCommomParamsBar();
-
- configureColors(params.get(BaseChartWeb.CHART_PARAM_COLORS), renderer);
- addMeasures(params.get(BaseChartWeb.CHART_PARAM_VALUES));
- }
-
- private void addMeasures(String values) {
- if (values != null && values.length() > 0) {
- // Values
- StringTokenizer stValues = new StringTokenizer(values, ",");
- int nbValues = stValues.countTokens();
-
- // Categories
- String categoriesParam = params.get(BaseChartWeb.CHART_PARAM_CATEGORIES);
- boolean categoriesPresent = categoriesParam != null && categoriesParam.length() > 0;
- String[] categoriesSplit = null;
- if (categoriesPresent) {
- categoriesSplit = categoriesParam.split(",");
- } else {
- categoriesSplit = new String[1];
- categoriesSplit[0] = BaseChartWeb.DEFAULT_NAME_CATEGORY;
- }
- int nbCategories = categoriesSplit.length;
-
- // Series
- String seriesParam = params.get(BaseChartWeb.CHART_PARAM_SERIES);
- boolean seriesPresent = seriesParam != null && seriesParam.length() > 0;
- String[] seriesSplit = null;
- if (seriesPresent) {
- seriesSplit = seriesParam.split(",");
- } else {
- seriesSplit = new String[nbValues];
- for (int i = 0; i < nbValues; i++) {
- seriesSplit[i] = BaseChartWeb.DEFAULT_NAME_SERIE + i;
- }
- }
- int nbSeries = seriesSplit.length;
-
- for (int iCategories = 0; iCategories < nbCategories; iCategories++) {
- String currentCategory = categoriesSplit[iCategories];
- for (int iSeries = 0; iSeries < nbSeries; iSeries++) {
- String currentSerie = seriesSplit[iSeries];
- double currentValue = 0.0;
- if (stValues.hasMoreTokens()) {
- try {
- currentValue = Double.parseDouble(stValues.nextToken());
- } catch (NumberFormatException e) {
- }
- }
- dataset.addValue(currentValue, currentSerie, currentCategory);
- }
- }
- }
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.server.charts.deprecated; + +import org.jfree.chart.JFreeChart; +import org.jfree.chart.axis.CategoryAxis; +import org.jfree.chart.axis.NumberAxis; +import org.jfree.chart.axis.NumberTickUnit; +import org.jfree.chart.plot.CategoryPlot; +import org.jfree.chart.plot.PlotOrientation; +import org.jfree.chart.renderer.category.BarRenderer; +import org.jfree.chart.renderer.category.StackedBarRenderer; +import org.jfree.chart.title.TextTitle; +import org.jfree.data.category.DefaultCategoryDataset; +import org.jfree.ui.RectangleInsets; + +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.util.Map; +import java.util.StringTokenizer; + +public class BarChart extends BaseChartWeb implements DeprecatedChart { + + private BarRenderer renderer = null; + protected DefaultCategoryDataset dataset = null; + protected CategoryAxis categoryAxis = null; + protected NumberAxis numberAxis = null; + + public BarChart(Map<String, String> params) { + super(params); + jfreechart = new JFreeChart(null, TextTitle.DEFAULT_FONT, new CategoryPlot(), false); + } + + @Override + protected BufferedImage getChartImage() throws IOException { + configure(); + return getBufferedImage(jfreechart); + } + + protected void configure() { + configureChart(jfreechart, false); + configureCategoryDataset(); + configureCategoryAxis(); + configureRenderer(); + configureRangeAxis(); + configureCategoryPlot(); + applyParams(); + } + + protected void configureCategoryPlot() { + CategoryPlot plot = jfreechart.getCategoryPlot(); + plot.setNoDataMessage(DEFAULT_MESSAGE_NODATA); + plot.setInsets(RectangleInsets.ZERO_INSETS); // To remove inner space around chart + plot.setDataset(dataset); + plot.setDomainAxis(categoryAxis); + plot.setRenderer(renderer); + plot.setRangeAxis(numberAxis); + } + + protected void configureCategoryDataset() { + dataset = new DefaultCategoryDataset(); + } + + protected void configureCategoryAxis() { + categoryAxis = new CategoryAxis(); + categoryAxis.setLabelFont(DEFAULT_FONT); + categoryAxis.setLabelPaint(BASE_COLOR); + categoryAxis.setTickLabelFont(DEFAULT_FONT); + categoryAxis.setTickLabelPaint(BASE_COLOR); + categoryAxis.setVisible(false); + } + + protected void configureRenderer() { + if (params.get(BaseChartWeb.CHART_PARAM_TYPE).equals(BaseChartWeb.STACKED_BAR_CHART)) { + renderer = new StackedBarRenderer(); + } else { + renderer = new BarRenderer(); + } + renderer.setItemMargin(0.0); + renderer.setDrawBarOutline(false); + } + + protected void configureRangeAxis() { + numberAxis = new NumberAxis(); + numberAxis.setLabelFont(DEFAULT_FONT); + numberAxis.setLabelPaint(BASE_COLOR); + numberAxis.setTickLabelFont(DEFAULT_FONT); + numberAxis.setTickLabelPaint(BASE_COLOR); + numberAxis.setTickMarksVisible(true); + numberAxis.setVisible(false); + numberAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); + } + + protected void applyCommomParamsBar() { + // -- Plot + CategoryPlot plot = jfreechart.getCategoryPlot(); + plot.setOrientation(BaseChartWeb.BAR_CHART_VERTICAL.equals(params.get(BaseChartWeb.CHART_PARAM_TYPE)) || BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM.equals(params.get(BaseChartWeb.CHART_PARAM_TYPE)) ? PlotOrientation.VERTICAL : PlotOrientation.HORIZONTAL); + plot.setOutlineVisible("y".equals(params.get(BaseChartWeb.CHART_PARAM_OUTLINE_VISIBLE))); + plot.setRangeGridlinesVisible("y".equals(params.get(BaseChartWeb.CHART_PARAM_OUTLINE_RANGEGRIDLINES_VISIBLE))); + String insetsParam = params.get(CHART_PARAM_INSETS); + if (isParamValueValid(insetsParam)) { + double insets = convertParamToDouble(insetsParam); + RectangleInsets rectangleInsets = new RectangleInsets(insets, insets, insets, insets); + plot.setInsets(rectangleInsets); + } + + // -- Category Axis + boolean categoryAxisIsVisible = "y".equals(params.get(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE)); + double categoryAxisUpperMargin = convertParamToDouble(params.get(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER), DEFAULT_CATEGORIES_AXISMARGIN); + double categoryAxisLowerMargin = convertParamToDouble(params.get(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_LOWER), DEFAULT_CATEGORIES_AXISMARGIN); + categoryAxis.setVisible(categoryAxisIsVisible); + categoryAxis.setTickLabelsVisible(categoryAxisIsVisible); + categoryAxis.setLowerMargin(categoryAxisLowerMargin); + categoryAxis.setUpperMargin(categoryAxisUpperMargin); + + // -- Range Axis + boolean rangeAxisIsVisible = "y".equals(params.get(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE)); + double rangeAxisUpperMargin = convertParamToDouble(params.get(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER), DEFAULT_SERIES_AXISMARGIN); + double rangeAxisLowerMargin = convertParamToDouble(params.get(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_LOWER), DEFAULT_SERIES_AXISMARGIN); + numberAxis.setTickLabelsVisible(rangeAxisIsVisible); + numberAxis.setVisible(rangeAxisIsVisible); + numberAxis.setLowerMargin(rangeAxisLowerMargin); + numberAxis.setUpperMargin(rangeAxisUpperMargin); + String rangeMax = params.get(BaseChartWeb.CHART_PARAM_RANGEMAX); + if (isParamValueValid(rangeMax)) { + double iRangeMax = Double.parseDouble(rangeMax); + numberAxis.setRange(0.0, iRangeMax); + } + String tickUnit = params.get(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_TICKUNIT); + if (isParamValueValid(tickUnit)) { + numberAxis.setTickUnit(new NumberTickUnit(convertParamToDouble(tickUnit))); + } + } + + private void applyParams() { + applyCommonParams(); + applyCommomParamsBar(); + + configureColors(params.get(BaseChartWeb.CHART_PARAM_COLORS), renderer); + addMeasures(params.get(BaseChartWeb.CHART_PARAM_VALUES)); + } + + private void addMeasures(String values) { + if (values != null && values.length() > 0) { + // Values + StringTokenizer stValues = new StringTokenizer(values, ","); + int nbValues = stValues.countTokens(); + + // Categories + String categoriesParam = params.get(BaseChartWeb.CHART_PARAM_CATEGORIES); + boolean categoriesPresent = categoriesParam != null && categoriesParam.length() > 0; + String[] categoriesSplit = null; + if (categoriesPresent) { + categoriesSplit = categoriesParam.split(","); + } else { + categoriesSplit = new String[1]; + categoriesSplit[0] = BaseChartWeb.DEFAULT_NAME_CATEGORY; + } + int nbCategories = categoriesSplit.length; + + // Series + String seriesParam = params.get(BaseChartWeb.CHART_PARAM_SERIES); + boolean seriesPresent = seriesParam != null && seriesParam.length() > 0; + String[] seriesSplit = null; + if (seriesPresent) { + seriesSplit = seriesParam.split(","); + } else { + seriesSplit = new String[nbValues]; + for (int i = 0; i < nbValues; i++) { + seriesSplit[i] = BaseChartWeb.DEFAULT_NAME_SERIE + i; + } + } + int nbSeries = seriesSplit.length; + + for (int iCategories = 0; iCategories < nbCategories; iCategories++) { + String currentCategory = categoriesSplit[iCategories]; + for (int iSeries = 0; iSeries < nbSeries; iSeries++) { + String currentSerie = seriesSplit[iSeries]; + double currentValue = 0.0; + if (stValues.hasMoreTokens()) { + try { + currentValue = Double.parseDouble(stValues.nextToken()); + } catch (NumberFormatException e) { + } + } + dataset.addValue(currentValue, currentSerie, currentCategory); + } + } + } + } + +} diff --git a/sonar-server/src/main/java/org/sonar/server/charts/deprecated/BaseChart.java b/sonar-server/src/main/java/org/sonar/server/charts/deprecated/BaseChart.java index f139bf07143..d1776177fc0 100644 --- a/sonar-server/src/main/java/org/sonar/server/charts/deprecated/BaseChart.java +++ b/sonar-server/src/main/java/org/sonar/server/charts/deprecated/BaseChart.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/charts/deprecated/BaseChartWeb.java b/sonar-server/src/main/java/org/sonar/server/charts/deprecated/BaseChartWeb.java index c401fc32518..8cef9b3b296 100644 --- a/sonar-server/src/main/java/org/sonar/server/charts/deprecated/BaseChartWeb.java +++ b/sonar-server/src/main/java/org/sonar/server/charts/deprecated/BaseChartWeb.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/charts/deprecated/CustomBarChart.java b/sonar-server/src/main/java/org/sonar/server/charts/deprecated/CustomBarChart.java index c0b8c1fb645..bf60669ac0e 100644 --- a/sonar-server/src/main/java/org/sonar/server/charts/deprecated/CustomBarChart.java +++ b/sonar-server/src/main/java/org/sonar/server/charts/deprecated/CustomBarChart.java @@ -1,145 +1,145 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.server.charts.deprecated;
-
-import org.jfree.chart.plot.CategoryPlot;
-import org.jfree.data.category.DefaultCategoryDataset;
-import org.jfree.ui.RectangleInsets;
-
-import java.awt.*;
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-public class CustomBarChart extends BarChart {
-
- private CustomBarRenderer renderer = null;
-
- public CustomBarChart(Map<String, String> params) {
- super(params);
- }
-
- @Override
- protected BufferedImage getChartImage() throws IOException {
- configure();
- return getBufferedImage(jfreechart);
- }
-
- @Override
- protected void configure() {
- configureChart(jfreechart, false);
- configureCategoryDataset();
- configureCategoryAxis();
- configureRenderer();
- configureRangeAxis();
- configureCategoryPlot();
- applyParams();
- }
-
- @Override
- protected void configureCategoryDataset() {
- dataset = new DefaultCategoryDataset();
- }
-
- @Override
- protected void configureRenderer() {
- renderer = new CustomBarRenderer(null);
- renderer.setItemMargin(0.0);
- renderer.setDrawBarOutline(false);
- }
-
- @Override
- protected void configureCategoryPlot() {
- CategoryPlot plot = jfreechart.getCategoryPlot();
- plot.setNoDataMessage(DEFAULT_MESSAGE_NODATA);
- plot.setInsets(RectangleInsets.ZERO_INSETS); // To remove inner space around chart
- plot.setDataset(dataset);
- plot.setDomainAxis(categoryAxis);
- plot.setRenderer(renderer);
- plot.setRangeAxis(numberAxis);
- }
-
- protected void applyParams() {
- applyCommonParams();
- applyCommomParamsBar();
-
- configureColors(params.get(CHART_PARAM_COLORS));
- addMeasures(params.get(CHART_PARAM_VALUES));
- }
-
- private void configureColors(String colorsParam) {
- Paint[] colors = CustomBarRenderer.COLORS;
- if (colorsParam != null && colorsParam.length() > 0) {
- StringTokenizer stColors = new StringTokenizer(colorsParam, ",");
- colors = new Paint[stColors.countTokens()];
- int i = 0;
- while (stColors.hasMoreTokens()) {
- colors[i] = Color.decode("0x" + stColors.nextToken());
- i++;
- }
- }
-
- renderer.setColors(colors);
- }
-
- private void addMeasures(String values) {
- if (values != null && values.length() > 0) {
- // Values
- StringTokenizer stValues = new StringTokenizer(values, ",");
- int nbValues = stValues.countTokens();
-
- // Categories
- String categoriesParam = params.get(CHART_PARAM_CATEGORIES);
- boolean categoriesPresent = categoriesParam != null && categoriesParam.length() > 0;
- String[] categoriesSplit = null;
- if (categoriesPresent) {
- categoriesSplit = categoriesParam.split(",");
- } else {
- categoriesSplit = new String[nbValues];
- for (int i = 0; i < nbValues; i++) {
- categoriesSplit[i] = DEFAULT_NAME_CATEGORY + i;
- }
- }
- int nbCategories = categoriesSplit.length;
-
- // Series
- String[] seriesSplit = {DEFAULT_NAME_SERIE};
- int nbSeries = 1;
-
- //
- for (int iCategories = 0; iCategories < nbCategories; iCategories++) {
- String currentCategory = categoriesSplit[iCategories];
- for (int iSeries = 0; iSeries < nbSeries; iSeries++) {
- String currentSerie = seriesSplit[iSeries];
- double currentValue = 0.0;
- if (stValues.hasMoreTokens()) {
- try {
- currentValue = Double.parseDouble(stValues.nextToken());
- } catch (NumberFormatException e) {
- }
- }
- dataset.addValue(currentValue, currentSerie, currentCategory);
- }
- }
- }
- }
-
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.server.charts.deprecated; + +import org.jfree.chart.plot.CategoryPlot; +import org.jfree.data.category.DefaultCategoryDataset; +import org.jfree.ui.RectangleInsets; + +import java.awt.*; +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.util.Map; +import java.util.StringTokenizer; + +public class CustomBarChart extends BarChart { + + private CustomBarRenderer renderer = null; + + public CustomBarChart(Map<String, String> params) { + super(params); + } + + @Override + protected BufferedImage getChartImage() throws IOException { + configure(); + return getBufferedImage(jfreechart); + } + + @Override + protected void configure() { + configureChart(jfreechart, false); + configureCategoryDataset(); + configureCategoryAxis(); + configureRenderer(); + configureRangeAxis(); + configureCategoryPlot(); + applyParams(); + } + + @Override + protected void configureCategoryDataset() { + dataset = new DefaultCategoryDataset(); + } + + @Override + protected void configureRenderer() { + renderer = new CustomBarRenderer(null); + renderer.setItemMargin(0.0); + renderer.setDrawBarOutline(false); + } + + @Override + protected void configureCategoryPlot() { + CategoryPlot plot = jfreechart.getCategoryPlot(); + plot.setNoDataMessage(DEFAULT_MESSAGE_NODATA); + plot.setInsets(RectangleInsets.ZERO_INSETS); // To remove inner space around chart + plot.setDataset(dataset); + plot.setDomainAxis(categoryAxis); + plot.setRenderer(renderer); + plot.setRangeAxis(numberAxis); + } + + protected void applyParams() { + applyCommonParams(); + applyCommomParamsBar(); + + configureColors(params.get(CHART_PARAM_COLORS)); + addMeasures(params.get(CHART_PARAM_VALUES)); + } + + private void configureColors(String colorsParam) { + Paint[] colors = CustomBarRenderer.COLORS; + if (colorsParam != null && colorsParam.length() > 0) { + StringTokenizer stColors = new StringTokenizer(colorsParam, ","); + colors = new Paint[stColors.countTokens()]; + int i = 0; + while (stColors.hasMoreTokens()) { + colors[i] = Color.decode("0x" + stColors.nextToken()); + i++; + } + } + + renderer.setColors(colors); + } + + private void addMeasures(String values) { + if (values != null && values.length() > 0) { + // Values + StringTokenizer stValues = new StringTokenizer(values, ","); + int nbValues = stValues.countTokens(); + + // Categories + String categoriesParam = params.get(CHART_PARAM_CATEGORIES); + boolean categoriesPresent = categoriesParam != null && categoriesParam.length() > 0; + String[] categoriesSplit = null; + if (categoriesPresent) { + categoriesSplit = categoriesParam.split(","); + } else { + categoriesSplit = new String[nbValues]; + for (int i = 0; i < nbValues; i++) { + categoriesSplit[i] = DEFAULT_NAME_CATEGORY + i; + } + } + int nbCategories = categoriesSplit.length; + + // Series + String[] seriesSplit = {DEFAULT_NAME_SERIE}; + int nbSeries = 1; + + // + for (int iCategories = 0; iCategories < nbCategories; iCategories++) { + String currentCategory = categoriesSplit[iCategories]; + for (int iSeries = 0; iSeries < nbSeries; iSeries++) { + String currentSerie = seriesSplit[iSeries]; + double currentValue = 0.0; + if (stValues.hasMoreTokens()) { + try { + currentValue = Double.parseDouble(stValues.nextToken()); + } catch (NumberFormatException e) { + } + } + dataset.addValue(currentValue, currentSerie, currentCategory); + } + } + } + } + }
\ No newline at end of file diff --git a/sonar-server/src/main/java/org/sonar/server/charts/deprecated/CustomBarRenderer.java b/sonar-server/src/main/java/org/sonar/server/charts/deprecated/CustomBarRenderer.java index 75991330b39..7bc2e1fa0dc 100644 --- a/sonar-server/src/main/java/org/sonar/server/charts/deprecated/CustomBarRenderer.java +++ b/sonar-server/src/main/java/org/sonar/server/charts/deprecated/CustomBarRenderer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/charts/deprecated/DeprecatedChart.java b/sonar-server/src/main/java/org/sonar/server/charts/deprecated/DeprecatedChart.java index 1918f366134..d8cfe05fd2e 100644 --- a/sonar-server/src/main/java/org/sonar/server/charts/deprecated/DeprecatedChart.java +++ b/sonar-server/src/main/java/org/sonar/server/charts/deprecated/DeprecatedChart.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/charts/deprecated/PieChart.java b/sonar-server/src/main/java/org/sonar/server/charts/deprecated/PieChart.java index ad09729b7c6..83d22a15e51 100644 --- a/sonar-server/src/main/java/org/sonar/server/charts/deprecated/PieChart.java +++ b/sonar-server/src/main/java/org/sonar/server/charts/deprecated/PieChart.java @@ -1,129 +1,129 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.server.charts.deprecated;
-
-import org.jfree.chart.JFreeChart;
-import org.jfree.chart.plot.PiePlot;
-import org.jfree.chart.title.TextTitle;
-import org.jfree.data.general.DefaultPieDataset;
-import org.jfree.ui.RectangleInsets;
-
-import java.awt.*;
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-public class PieChart extends BaseChartWeb implements DeprecatedChart {
-
- private DefaultPieDataset dataset = null;
-
- public PieChart(Map<String, String> params) {
- super(params);
- jfreechart = new JFreeChart(null, TextTitle.DEFAULT_FONT, new PiePlot(), false);
- }
-
- @Override
- protected BufferedImage getChartImage() throws IOException {
- configure();
- return getBufferedImage(jfreechart);
- }
-
- private void configure() {
- configureChart(jfreechart, false);
- configureDataset();
- configurePlot();
- applyParams();
- }
-
- private void configureDataset() {
- dataset = new DefaultPieDataset();
- }
-
- private void configurePlot() {
- PiePlot plot = (PiePlot) jfreechart.getPlot();
- plot.setNoDataMessage(DEFAULT_MESSAGE_NODATA);
- plot.setInsets(RectangleInsets.ZERO_INSETS);
- plot.setDataset(dataset);
- plot.setBackgroundAlpha(0.0f);
- plot.setCircular(true);
- plot.setLabelGenerator(null);
- plot.setIgnoreNullValues(true);
- plot.setIgnoreZeroValues(true);
- plot.setShadowPaint(null);
- plot.setLabelLinkMargin(0.0);
- plot.setInteriorGap(0.02);
- plot.setMaximumLabelWidth(0.10);
- }
-
- private void configureColors(String colors) {
- try {
- if (colors != null && colors.length() > 0) {
- StringTokenizer stringTokenizer = new StringTokenizer(colors, ",");
- int i = 0;
- while (stringTokenizer.hasMoreTokens()) {
- ((PiePlot) jfreechart.getPlot()).setSectionPaint(Integer.toString(i), Color.decode("0x" + stringTokenizer.nextToken()));
- i++;
- }
- } else {
- configureDefaultColors();
- }
- }
- catch (Exception e) {
- configureDefaultColors();
- }
- }
-
- private void configureDefaultColors() {
- PiePlot plot = (PiePlot) jfreechart.getPlot();
- for (int i=0 ; i<COLORS.length ; i++) {
- plot.setSectionPaint("" + i, COLORS[i]);
- }
- }
-
- private void applyParams() {
- applyCommonParams();
-
- configureColors(params.get(CHART_PARAM_COLORS));
- addMeasures(params.get(CHART_PARAM_VALUES));
-
- // -- Plot
- PiePlot plot = (PiePlot) jfreechart.getPlot();
- plot.setOutlineVisible(isParamValueValid(params.get(CHART_PARAM_OUTLINE_VISIBLE)) && Boolean.getBoolean(params.get(CHART_PARAM_OUTLINE_VISIBLE)));
- }
-
- private void addMeasures(String values) {
- if (values != null && values.length() > 0) {
- StringTokenizer st = new StringTokenizer(values, ",");
- int i = 0;
- while (st.hasMoreTokens()) {
- double measure = 0;
- try {
- measure = Double.parseDouble(st.nextToken());
- }
- catch (NumberFormatException e) {
- }
- dataset.setValue(Integer.toString(i), measure);
- i++;
- }
- }
- }
-
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.server.charts.deprecated; + +import org.jfree.chart.JFreeChart; +import org.jfree.chart.plot.PiePlot; +import org.jfree.chart.title.TextTitle; +import org.jfree.data.general.DefaultPieDataset; +import org.jfree.ui.RectangleInsets; + +import java.awt.*; +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.util.Map; +import java.util.StringTokenizer; + +public class PieChart extends BaseChartWeb implements DeprecatedChart { + + private DefaultPieDataset dataset = null; + + public PieChart(Map<String, String> params) { + super(params); + jfreechart = new JFreeChart(null, TextTitle.DEFAULT_FONT, new PiePlot(), false); + } + + @Override + protected BufferedImage getChartImage() throws IOException { + configure(); + return getBufferedImage(jfreechart); + } + + private void configure() { + configureChart(jfreechart, false); + configureDataset(); + configurePlot(); + applyParams(); + } + + private void configureDataset() { + dataset = new DefaultPieDataset(); + } + + private void configurePlot() { + PiePlot plot = (PiePlot) jfreechart.getPlot(); + plot.setNoDataMessage(DEFAULT_MESSAGE_NODATA); + plot.setInsets(RectangleInsets.ZERO_INSETS); + plot.setDataset(dataset); + plot.setBackgroundAlpha(0.0f); + plot.setCircular(true); + plot.setLabelGenerator(null); + plot.setIgnoreNullValues(true); + plot.setIgnoreZeroValues(true); + plot.setShadowPaint(null); + plot.setLabelLinkMargin(0.0); + plot.setInteriorGap(0.02); + plot.setMaximumLabelWidth(0.10); + } + + private void configureColors(String colors) { + try { + if (colors != null && colors.length() > 0) { + StringTokenizer stringTokenizer = new StringTokenizer(colors, ","); + int i = 0; + while (stringTokenizer.hasMoreTokens()) { + ((PiePlot) jfreechart.getPlot()).setSectionPaint(Integer.toString(i), Color.decode("0x" + stringTokenizer.nextToken())); + i++; + } + } else { + configureDefaultColors(); + } + } + catch (Exception e) { + configureDefaultColors(); + } + } + + private void configureDefaultColors() { + PiePlot plot = (PiePlot) jfreechart.getPlot(); + for (int i=0 ; i<COLORS.length ; i++) { + plot.setSectionPaint("" + i, COLORS[i]); + } + } + + private void applyParams() { + applyCommonParams(); + + configureColors(params.get(CHART_PARAM_COLORS)); + addMeasures(params.get(CHART_PARAM_VALUES)); + + // -- Plot + PiePlot plot = (PiePlot) jfreechart.getPlot(); + plot.setOutlineVisible(isParamValueValid(params.get(CHART_PARAM_OUTLINE_VISIBLE)) && Boolean.getBoolean(params.get(CHART_PARAM_OUTLINE_VISIBLE))); + } + + private void addMeasures(String values) { + if (values != null && values.length() > 0) { + StringTokenizer st = new StringTokenizer(values, ","); + int i = 0; + while (st.hasMoreTokens()) { + double measure = 0; + try { + measure = Double.parseDouble(st.nextToken()); + } + catch (NumberFormatException e) { + } + dataset.setValue(Integer.toString(i), measure); + i++; + } + } + } + }
\ No newline at end of file diff --git a/sonar-server/src/main/java/org/sonar/server/charts/deprecated/SparkLinesChart.java b/sonar-server/src/main/java/org/sonar/server/charts/deprecated/SparkLinesChart.java index 202353846a8..d46790c0244 100644 --- a/sonar-server/src/main/java/org/sonar/server/charts/deprecated/SparkLinesChart.java +++ b/sonar-server/src/main/java/org/sonar/server/charts/deprecated/SparkLinesChart.java @@ -1,142 +1,142 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.server.charts.deprecated;
-
-import org.jfree.chart.JFreeChart;
-import org.jfree.chart.axis.DateAxis;
-import org.jfree.chart.axis.DateTickUnit;
-import org.jfree.chart.axis.NumberAxis;
-import org.jfree.chart.plot.XYPlot;
-import org.jfree.chart.renderer.xy.StandardXYItemRenderer;
-import org.jfree.chart.title.TextTitle;
-import org.jfree.data.xy.XYSeries;
-import org.jfree.data.xy.XYSeriesCollection;
-import org.jfree.ui.RectangleInsets;
-
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-public class SparkLinesChart extends BaseChartWeb implements DeprecatedChart {
-
- private XYSeriesCollection dataset = null;
- private DateAxis x = null;
- private NumberAxis y = null;
- private StandardXYItemRenderer renderer = null;
-
- public SparkLinesChart(Map<String, String> params) {
- super(params);
- jfreechart = new JFreeChart(null, TextTitle.DEFAULT_FONT, new XYPlot(), false);
- }
-
- @Override
- protected BufferedImage getChartImage() throws IOException {
- configure();
- return getBufferedImage(jfreechart);
- }
-
- private void configure() {
- configureChart(jfreechart, false);
- configureXAxis();
- configureYAxis();
- configureRenderer();
- configureDataset();
- configurePlot();
- applyParams();
- }
-
- private void configureRenderer() {
- renderer = new StandardXYItemRenderer(StandardXYItemRenderer.LINES);
- }
-
- private void configureYAxis() {
- y = new NumberAxis();
- y.setTickLabelsVisible(false);
- y.setTickMarksVisible(false);
- y.setAxisLineVisible(false);
- y.setNegativeArrowVisible(false);
- y.setPositiveArrowVisible(false);
- y.setVisible(false);
- }
-
- private void configureXAxis() {
- x = new DateAxis();
- x.setTickUnit(new DateTickUnit(DateTickUnit.MONTH, 1));
- x.setTickLabelsVisible(false);
- x.setTickMarksVisible(false);
- x.setAxisLineVisible(false);
- x.setNegativeArrowVisible(false);
- x.setPositiveArrowVisible(false);
- x.setVisible(false);
- }
-
- private void configureDataset() {
- dataset = new XYSeriesCollection();
- }
-
- private void configurePlot() {
- XYPlot plot = (XYPlot) jfreechart.getPlot();
- plot.setInsets(RectangleInsets.ZERO_INSETS);
- plot.setDataset(dataset);
- plot.setDomainAxis(x);
- plot.setDomainGridlinesVisible(false);
- plot.setDomainCrosshairVisible(false);
- plot.setRangeGridlinesVisible(false);
- plot.setRangeCrosshairVisible(false);
- plot.setRangeAxis(y);
- plot.setRenderer(renderer);
- plot.setBackgroundAlpha(0.0f);
- }
-
- private void applyParams() {
- applyCommonParams();
-
- configureColors(params.get(CHART_PARAM_COLORS), renderer);
- addMeasures(params.get(CHART_PARAM_VALUES));
-
- // -- Plot
- XYPlot plot = (XYPlot) jfreechart.getPlot();
- plot.setOutlineVisible(isParamValueValid(params.get(CHART_PARAM_OUTLINE_VISIBLE)) && Boolean.getBoolean(params.get(CHART_PARAM_OUTLINE_VISIBLE)));
- }
-
- private void addMeasures(String values) {
- double min = Double.MAX_VALUE;
- double max = Double.MIN_VALUE;
- XYSeries series1 = new XYSeries("");
- if (values != null && values.length() > 0) {
- StringTokenizer st = new StringTokenizer(values, ",");
- while (st.hasMoreTokens()) {
- double v_x = convertParamToDouble(st.nextToken());
- double v_y = 0.0;
- if (st.hasMoreTokens()) {
- v_y = convertParamToDouble(st.nextToken());
- }
- series1.add(v_x, v_y);
-
- min = (v_y < min ? v_y : min);
- max = (v_y > max ? v_y : max);
- }
- dataset.addSeries(series1);
- y.setRange(min-1, max+1);
- }
- }
-
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.server.charts.deprecated; + +import org.jfree.chart.JFreeChart; +import org.jfree.chart.axis.DateAxis; +import org.jfree.chart.axis.DateTickUnit; +import org.jfree.chart.axis.NumberAxis; +import org.jfree.chart.plot.XYPlot; +import org.jfree.chart.renderer.xy.StandardXYItemRenderer; +import org.jfree.chart.title.TextTitle; +import org.jfree.data.xy.XYSeries; +import org.jfree.data.xy.XYSeriesCollection; +import org.jfree.ui.RectangleInsets; + +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.util.Map; +import java.util.StringTokenizer; + +public class SparkLinesChart extends BaseChartWeb implements DeprecatedChart { + + private XYSeriesCollection dataset = null; + private DateAxis x = null; + private NumberAxis y = null; + private StandardXYItemRenderer renderer = null; + + public SparkLinesChart(Map<String, String> params) { + super(params); + jfreechart = new JFreeChart(null, TextTitle.DEFAULT_FONT, new XYPlot(), false); + } + + @Override + protected BufferedImage getChartImage() throws IOException { + configure(); + return getBufferedImage(jfreechart); + } + + private void configure() { + configureChart(jfreechart, false); + configureXAxis(); + configureYAxis(); + configureRenderer(); + configureDataset(); + configurePlot(); + applyParams(); + } + + private void configureRenderer() { + renderer = new StandardXYItemRenderer(StandardXYItemRenderer.LINES); + } + + private void configureYAxis() { + y = new NumberAxis(); + y.setTickLabelsVisible(false); + y.setTickMarksVisible(false); + y.setAxisLineVisible(false); + y.setNegativeArrowVisible(false); + y.setPositiveArrowVisible(false); + y.setVisible(false); + } + + private void configureXAxis() { + x = new DateAxis(); + x.setTickUnit(new DateTickUnit(DateTickUnit.MONTH, 1)); + x.setTickLabelsVisible(false); + x.setTickMarksVisible(false); + x.setAxisLineVisible(false); + x.setNegativeArrowVisible(false); + x.setPositiveArrowVisible(false); + x.setVisible(false); + } + + private void configureDataset() { + dataset = new XYSeriesCollection(); + } + + private void configurePlot() { + XYPlot plot = (XYPlot) jfreechart.getPlot(); + plot.setInsets(RectangleInsets.ZERO_INSETS); + plot.setDataset(dataset); + plot.setDomainAxis(x); + plot.setDomainGridlinesVisible(false); + plot.setDomainCrosshairVisible(false); + plot.setRangeGridlinesVisible(false); + plot.setRangeCrosshairVisible(false); + plot.setRangeAxis(y); + plot.setRenderer(renderer); + plot.setBackgroundAlpha(0.0f); + } + + private void applyParams() { + applyCommonParams(); + + configureColors(params.get(CHART_PARAM_COLORS), renderer); + addMeasures(params.get(CHART_PARAM_VALUES)); + + // -- Plot + XYPlot plot = (XYPlot) jfreechart.getPlot(); + plot.setOutlineVisible(isParamValueValid(params.get(CHART_PARAM_OUTLINE_VISIBLE)) && Boolean.getBoolean(params.get(CHART_PARAM_OUTLINE_VISIBLE))); + } + + private void addMeasures(String values) { + double min = Double.MAX_VALUE; + double max = Double.MIN_VALUE; + XYSeries series1 = new XYSeries(""); + if (values != null && values.length() > 0) { + StringTokenizer st = new StringTokenizer(values, ","); + while (st.hasMoreTokens()) { + double v_x = convertParamToDouble(st.nextToken()); + double v_y = 0.0; + if (st.hasMoreTokens()) { + v_y = convertParamToDouble(st.nextToken()); + } + series1.add(v_x, v_y); + + min = (v_y < min ? v_y : min); + max = (v_y > max ? v_y : max); + } + dataset.addSeries(series1); + y.setRange(min-1, max+1); + } + } + }
\ No newline at end of file diff --git a/sonar-server/src/main/java/org/sonar/server/charts/jruby/TrendsChart.java b/sonar-server/src/main/java/org/sonar/server/charts/jruby/TrendsChart.java index bb5037f9440..e8f62192a6f 100644 --- a/sonar-server/src/main/java/org/sonar/server/charts/jruby/TrendsChart.java +++ b/sonar-server/src/main/java/org/sonar/server/charts/jruby/TrendsChart.java @@ -1,140 +1,140 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.server.charts.jruby;
-
-import org.apache.commons.lang.LocaleUtils;
-import org.jfree.chart.JFreeChart;
-import org.jfree.chart.axis.AxisLocation;
-import org.jfree.chart.axis.DateAxis;
-import org.jfree.chart.axis.NumberAxis;
-import org.jfree.chart.plot.Marker;
-import org.jfree.chart.plot.ValueMarker;
-import org.jfree.chart.plot.XYPlot;
-import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;
-import org.jfree.chart.title.TextTitle;
-import org.jfree.data.time.Day;
-import org.jfree.data.time.TimeSeries;
-import org.jfree.data.time.TimeSeriesCollection;
-import org.jfree.ui.RectangleAnchor;
-import org.jfree.ui.RectangleEdge;
-import org.jfree.ui.RectangleInsets;
-import org.jfree.ui.TextAnchor;
-import org.sonar.server.charts.deprecated.BaseChart;
-
-import java.awt.*;
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.text.DateFormat;
-import java.text.DecimalFormat;
-import java.text.ParseException;
-import java.util.Date;
-import java.util.TreeMap;
-
-public class TrendsChart extends BaseChart {
-
- private XYPlot plot;
- private TreeMap<Long, TimeSeries> seriesById;
- private int percentAxisId = -1;
- private boolean displayLegend;
-
- public TrendsChart(int width, int height, String localeKey, boolean displayLegend) {
- super(width, height);
- this.displayLegend = displayLegend;
- seriesById = new TreeMap<Long, TimeSeries>();
- plot = new XYPlot();
- DateAxis dateAxis = new DateAxis();
- dateAxis.setDateFormatOverride(DateFormat.getDateInstance(DateFormat.SHORT, LocaleUtils.toLocale(localeKey)));
- plot.setDomainAxis(dateAxis);
- }
-
- public void initSerie(Long serieId, String legend, boolean isPercent) {
- TimeSeries series = new TimeSeries(legend);
-
- int index=seriesById.size();
- seriesById.put(serieId, series);
-
- TimeSeriesCollection timeSeriesColl = new TimeSeriesCollection();
- timeSeriesColl.addSeries(series);
- plot.setDataset(index, timeSeriesColl);
-
- if (isPercent) {
- if (percentAxisId == -1) {
- NumberAxis rangeAxis = new NumberAxis();
- rangeAxis.setNumberFormatOverride(new DecimalFormat("0'%'"));
- rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
- rangeAxis.setUpperBound(100.0);
- rangeAxis.setLowerBound(0.0);
- plot.setRangeAxisLocation(index, AxisLocation.TOP_OR_LEFT);
- plot.setRangeAxis(index, rangeAxis);
- plot.mapDatasetToRangeAxis(index, index);
- percentAxisId = index;
-
- } else {
- plot.mapDatasetToRangeAxis(index, percentAxisId);
- }
- } else {
- NumberAxis rangeAxis = new NumberAxis(displayLegend ? legend : null);
- rangeAxis.setAutoRangeIncludesZero(false);
- rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
- rangeAxis.setAutoRangeMinimumSize(2.0);
- plot.setRangeAxisLocation(index, AxisLocation.TOP_OR_RIGHT);
- plot.setRangeAxis(index, rangeAxis);
- plot.mapDatasetToRangeAxis(index, index);
- }
-
- XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
- renderer.setBaseShapesVisible(false);
- renderer.setSeriesStroke(0, new BasicStroke(2.0f));
- renderer.setSeriesPaint(0, COLORS[index % COLORS.length]);
- plot.setRenderer(index, renderer);
- }
-
- public void addMeasure(Double value, Date date, Long serieId) {
- seriesById.get(serieId).addOrUpdate(new Day(date), value);
- }
-
- public void addLabel(Date date, String label) throws ParseException {
- addLabel(date, label, false);
- }
-
- public void addLabel(Date date, String label, boolean lower) throws ParseException {
- Day d = new Day(date);
- double millis = d.getFirstMillisecond();
- Marker marker = new ValueMarker(millis);
- marker.setLabel(label);
- marker.setLabelAnchor(RectangleAnchor.TOP_RIGHT);
- marker.setLabelTextAnchor(TextAnchor.TOP_LEFT);
- Color c = new Color(17, 40, 95);
- marker.setLabelPaint(c);
- marker.setPaint(c);
- marker.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 3.0f, new float[]{5f, 5f, 5f, 5f}, 2.0f));
- if (lower) {
- marker.setLabelOffset(new RectangleInsets(18, 0, 0, 5));
- }
- plot.addDomainMarker(marker);
- }
-
- @Override
- protected BufferedImage getChartImage() throws IOException {
- JFreeChart chart = new JFreeChart(null, TextTitle.DEFAULT_FONT, plot, true);
- configureChart(chart, displayLegend ? RectangleEdge.BOTTOM : null);
- return super.getBufferedImage(chart);
- }
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.server.charts.jruby; + +import org.apache.commons.lang.LocaleUtils; +import org.jfree.chart.JFreeChart; +import org.jfree.chart.axis.AxisLocation; +import org.jfree.chart.axis.DateAxis; +import org.jfree.chart.axis.NumberAxis; +import org.jfree.chart.plot.Marker; +import org.jfree.chart.plot.ValueMarker; +import org.jfree.chart.plot.XYPlot; +import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; +import org.jfree.chart.title.TextTitle; +import org.jfree.data.time.Day; +import org.jfree.data.time.TimeSeries; +import org.jfree.data.time.TimeSeriesCollection; +import org.jfree.ui.RectangleAnchor; +import org.jfree.ui.RectangleEdge; +import org.jfree.ui.RectangleInsets; +import org.jfree.ui.TextAnchor; +import org.sonar.server.charts.deprecated.BaseChart; + +import java.awt.*; +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.text.DateFormat; +import java.text.DecimalFormat; +import java.text.ParseException; +import java.util.Date; +import java.util.TreeMap; + +public class TrendsChart extends BaseChart { + + private XYPlot plot; + private TreeMap<Long, TimeSeries> seriesById; + private int percentAxisId = -1; + private boolean displayLegend; + + public TrendsChart(int width, int height, String localeKey, boolean displayLegend) { + super(width, height); + this.displayLegend = displayLegend; + seriesById = new TreeMap<Long, TimeSeries>(); + plot = new XYPlot(); + DateAxis dateAxis = new DateAxis(); + dateAxis.setDateFormatOverride(DateFormat.getDateInstance(DateFormat.SHORT, LocaleUtils.toLocale(localeKey))); + plot.setDomainAxis(dateAxis); + } + + public void initSerie(Long serieId, String legend, boolean isPercent) { + TimeSeries series = new TimeSeries(legend); + + int index=seriesById.size(); + seriesById.put(serieId, series); + + TimeSeriesCollection timeSeriesColl = new TimeSeriesCollection(); + timeSeriesColl.addSeries(series); + plot.setDataset(index, timeSeriesColl); + + if (isPercent) { + if (percentAxisId == -1) { + NumberAxis rangeAxis = new NumberAxis(); + rangeAxis.setNumberFormatOverride(new DecimalFormat("0'%'")); + rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); + rangeAxis.setUpperBound(100.0); + rangeAxis.setLowerBound(0.0); + plot.setRangeAxisLocation(index, AxisLocation.TOP_OR_LEFT); + plot.setRangeAxis(index, rangeAxis); + plot.mapDatasetToRangeAxis(index, index); + percentAxisId = index; + + } else { + plot.mapDatasetToRangeAxis(index, percentAxisId); + } + } else { + NumberAxis rangeAxis = new NumberAxis(displayLegend ? legend : null); + rangeAxis.setAutoRangeIncludesZero(false); + rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); + rangeAxis.setAutoRangeMinimumSize(2.0); + plot.setRangeAxisLocation(index, AxisLocation.TOP_OR_RIGHT); + plot.setRangeAxis(index, rangeAxis); + plot.mapDatasetToRangeAxis(index, index); + } + + XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer(); + renderer.setBaseShapesVisible(false); + renderer.setSeriesStroke(0, new BasicStroke(2.0f)); + renderer.setSeriesPaint(0, COLORS[index % COLORS.length]); + plot.setRenderer(index, renderer); + } + + public void addMeasure(Double value, Date date, Long serieId) { + seriesById.get(serieId).addOrUpdate(new Day(date), value); + } + + public void addLabel(Date date, String label) throws ParseException { + addLabel(date, label, false); + } + + public void addLabel(Date date, String label, boolean lower) throws ParseException { + Day d = new Day(date); + double millis = d.getFirstMillisecond(); + Marker marker = new ValueMarker(millis); + marker.setLabel(label); + marker.setLabelAnchor(RectangleAnchor.TOP_RIGHT); + marker.setLabelTextAnchor(TextAnchor.TOP_LEFT); + Color c = new Color(17, 40, 95); + marker.setLabelPaint(c); + marker.setPaint(c); + marker.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 3.0f, new float[]{5f, 5f, 5f, 5f}, 2.0f)); + if (lower) { + marker.setLabelOffset(new RectangleInsets(18, 0, 0, 5)); + } + plot.addDomainMarker(marker); + } + + @Override + protected BufferedImage getChartImage() throws IOException { + JFreeChart chart = new JFreeChart(null, TextTitle.DEFAULT_FONT, plot, true); + configureChart(chart, displayLegend ? RectangleEdge.BOTTOM : null); + return super.getBufferedImage(chart); + } }
\ No newline at end of file diff --git a/sonar-server/src/main/java/org/sonar/server/configuration/Backup.java b/sonar-server/src/main/java/org/sonar/server/configuration/Backup.java index c610f065535..635f256bb79 100644 --- a/sonar-server/src/main/java/org/sonar/server/configuration/Backup.java +++ b/sonar-server/src/main/java/org/sonar/server/configuration/Backup.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/configuration/Backupable.java b/sonar-server/src/main/java/org/sonar/server/configuration/Backupable.java index 5636e5bc151..2079f4c66ae 100644 --- a/sonar-server/src/main/java/org/sonar/server/configuration/Backupable.java +++ b/sonar-server/src/main/java/org/sonar/server/configuration/Backupable.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/configuration/ConfigurationException.java b/sonar-server/src/main/java/org/sonar/server/configuration/ConfigurationException.java index 7f67320aec2..827f77cbc85 100644 --- a/sonar-server/src/main/java/org/sonar/server/configuration/ConfigurationException.java +++ b/sonar-server/src/main/java/org/sonar/server/configuration/ConfigurationException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/configuration/ConfigurationFactory.java b/sonar-server/src/main/java/org/sonar/server/configuration/ConfigurationFactory.java index 342515a1c7a..e4d3b9d0586 100644 --- a/sonar-server/src/main/java/org/sonar/server/configuration/ConfigurationFactory.java +++ b/sonar-server/src/main/java/org/sonar/server/configuration/ConfigurationFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/configuration/ConfigurationLogger.java b/sonar-server/src/main/java/org/sonar/server/configuration/ConfigurationLogger.java index f9a8287052f..b63d156e787 100644 --- a/sonar-server/src/main/java/org/sonar/server/configuration/ConfigurationLogger.java +++ b/sonar-server/src/main/java/org/sonar/server/configuration/ConfigurationLogger.java @@ -1,52 +1,52 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.server.configuration;
-
-import org.apache.commons.configuration.Configuration;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Iterator;
-
-public final class ConfigurationLogger {
-
- private ConfigurationLogger() {
- // only static methods
- }
-
- public static void log(Configuration configuration) {
- Logger log = LoggerFactory.getLogger(ConfigurationLogger.class);
- if (log.isDebugEnabled()) {
- Iterator<String> keys = configuration.getKeys();
- while (keys.hasNext()) {
- String key = keys.next();
- String property = getTruncatedProperty(configuration, key);
- log.debug("Property: " + key + " is: '" + property + "'");
- }
- }
- }
-
- static String getTruncatedProperty(Configuration configuration, String key) {
- String property = StringUtils.join(configuration.getStringArray(key), ",");
- return StringUtils.abbreviate(property, 100);
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.server.configuration; + +import org.apache.commons.configuration.Configuration; +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.Iterator; + +public final class ConfigurationLogger { + + private ConfigurationLogger() { + // only static methods + } + + public static void log(Configuration configuration) { + Logger log = LoggerFactory.getLogger(ConfigurationLogger.class); + if (log.isDebugEnabled()) { + Iterator<String> keys = configuration.getKeys(); + while (keys.hasNext()) { + String key = keys.next(); + String property = getTruncatedProperty(configuration, key); + log.debug("Property: " + key + " is: '" + property + "'"); + } + } + } + + static String getTruncatedProperty(Configuration configuration, String key) { + String property = StringUtils.join(configuration.getStringArray(key), ","); + return StringUtils.abbreviate(property, 100); + } + +} diff --git a/sonar-server/src/main/java/org/sonar/server/configuration/CoreConfiguration.java b/sonar-server/src/main/java/org/sonar/server/configuration/CoreConfiguration.java index c550a0d692b..8e018e52af0 100644 --- a/sonar-server/src/main/java/org/sonar/server/configuration/CoreConfiguration.java +++ b/sonar-server/src/main/java/org/sonar/server/configuration/CoreConfiguration.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/configuration/MetricsBackup.java b/sonar-server/src/main/java/org/sonar/server/configuration/MetricsBackup.java index 1fc7fd5c24b..d4859c546d3 100644 --- a/sonar-server/src/main/java/org/sonar/server/configuration/MetricsBackup.java +++ b/sonar-server/src/main/java/org/sonar/server/configuration/MetricsBackup.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesBackup.java b/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesBackup.java index 4067d83d37a..143427d6457 100644 --- a/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesBackup.java +++ b/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesBackup.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesManager.java b/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesManager.java index 02564ab0475..4734352e979 100644 --- a/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesManager.java +++ b/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesManager.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/configuration/PropertiesBackup.java b/sonar-server/src/main/java/org/sonar/server/configuration/PropertiesBackup.java index 374f04fc867..5b8dbc943f3 100644 --- a/sonar-server/src/main/java/org/sonar/server/configuration/PropertiesBackup.java +++ b/sonar-server/src/main/java/org/sonar/server/configuration/PropertiesBackup.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/configuration/RulesBackup.java b/sonar-server/src/main/java/org/sonar/server/configuration/RulesBackup.java index 5a9112237d9..d82f76cb8fd 100644 --- a/sonar-server/src/main/java/org/sonar/server/configuration/RulesBackup.java +++ b/sonar-server/src/main/java/org/sonar/server/configuration/RulesBackup.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/configuration/SonarConfig.java b/sonar-server/src/main/java/org/sonar/server/configuration/SonarConfig.java index 123fc534b54..688a6d30ce4 100644 --- a/sonar-server/src/main/java/org/sonar/server/configuration/SonarConfig.java +++ b/sonar-server/src/main/java/org/sonar/server/configuration/SonarConfig.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/database/EmbeddedDatabase.java b/sonar-server/src/main/java/org/sonar/server/database/EmbeddedDatabase.java index c9a5a7da3df..16b907b3592 100644 --- a/sonar-server/src/main/java/org/sonar/server/database/EmbeddedDatabase.java +++ b/sonar-server/src/main/java/org/sonar/server/database/EmbeddedDatabase.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/database/EmbeddedDatabaseFactory.java b/sonar-server/src/main/java/org/sonar/server/database/EmbeddedDatabaseFactory.java index d700a493c88..92787dee792 100644 --- a/sonar-server/src/main/java/org/sonar/server/database/EmbeddedDatabaseFactory.java +++ b/sonar-server/src/main/java/org/sonar/server/database/EmbeddedDatabaseFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/database/JndiDatabaseConnector.java b/sonar-server/src/main/java/org/sonar/server/database/JndiDatabaseConnector.java index 47fe6be9b73..1d235ef0cf1 100644 --- a/sonar-server/src/main/java/org/sonar/server/database/JndiDatabaseConnector.java +++ b/sonar-server/src/main/java/org/sonar/server/database/JndiDatabaseConnector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/database/JndiException.java b/sonar-server/src/main/java/org/sonar/server/database/JndiException.java index e92d266104b..3f7a0887b04 100644 --- a/sonar-server/src/main/java/org/sonar/server/database/JndiException.java +++ b/sonar-server/src/main/java/org/sonar/server/database/JndiException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/database/UniqueDatasourceFactory.java b/sonar-server/src/main/java/org/sonar/server/database/UniqueDatasourceFactory.java index 1bb4722ae50..58f8e515f7b 100644 --- a/sonar-server/src/main/java/org/sonar/server/database/UniqueDatasourceFactory.java +++ b/sonar-server/src/main/java/org/sonar/server/database/UniqueDatasourceFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/filters/DateCriterion.java b/sonar-server/src/main/java/org/sonar/server/filters/DateCriterion.java index 6b26e55a0a9..04a6ee12b43 100644 --- a/sonar-server/src/main/java/org/sonar/server/filters/DateCriterion.java +++ b/sonar-server/src/main/java/org/sonar/server/filters/DateCriterion.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/filters/Filter.java b/sonar-server/src/main/java/org/sonar/server/filters/Filter.java index d2c864ff181..070c360c94d 100644 --- a/sonar-server/src/main/java/org/sonar/server/filters/Filter.java +++ b/sonar-server/src/main/java/org/sonar/server/filters/Filter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/filters/FilterExecutor.java b/sonar-server/src/main/java/org/sonar/server/filters/FilterExecutor.java index 27ad79fe382..5015f4ac326 100644 --- a/sonar-server/src/main/java/org/sonar/server/filters/FilterExecutor.java +++ b/sonar-server/src/main/java/org/sonar/server/filters/FilterExecutor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/filters/FilterResult.java b/sonar-server/src/main/java/org/sonar/server/filters/FilterResult.java index 5408eff8497..c0b54e1c8ad 100644 --- a/sonar-server/src/main/java/org/sonar/server/filters/FilterResult.java +++ b/sonar-server/src/main/java/org/sonar/server/filters/FilterResult.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/filters/MeasureCriterion.java b/sonar-server/src/main/java/org/sonar/server/filters/MeasureCriterion.java index 810b24d0c03..5e0d352fbb8 100644 --- a/sonar-server/src/main/java/org/sonar/server/filters/MeasureCriterion.java +++ b/sonar-server/src/main/java/org/sonar/server/filters/MeasureCriterion.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/mavendeployer/Artifact.java b/sonar-server/src/main/java/org/sonar/server/mavendeployer/Artifact.java index f1e8501f1ae..cf1793dd085 100644 --- a/sonar-server/src/main/java/org/sonar/server/mavendeployer/Artifact.java +++ b/sonar-server/src/main/java/org/sonar/server/mavendeployer/Artifact.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/mavendeployer/MavenRepository.java b/sonar-server/src/main/java/org/sonar/server/mavendeployer/MavenRepository.java index f5b99fc183a..8dbd3e57d59 100644 --- a/sonar-server/src/main/java/org/sonar/server/mavendeployer/MavenRepository.java +++ b/sonar-server/src/main/java/org/sonar/server/mavendeployer/MavenRepository.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/mavendeployer/Mojo.java b/sonar-server/src/main/java/org/sonar/server/mavendeployer/Mojo.java index 154a512fc5b..bd90adea321 100644 --- a/sonar-server/src/main/java/org/sonar/server/mavendeployer/Mojo.java +++ b/sonar-server/src/main/java/org/sonar/server/mavendeployer/Mojo.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/platform/DefaultServerFileSystem.java b/sonar-server/src/main/java/org/sonar/server/platform/DefaultServerFileSystem.java index 2962289e48a..1810d8e5d89 100644 --- a/sonar-server/src/main/java/org/sonar/server/platform/DefaultServerFileSystem.java +++ b/sonar-server/src/main/java/org/sonar/server/platform/DefaultServerFileSystem.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/platform/DefaultServerUpgradeStatus.java b/sonar-server/src/main/java/org/sonar/server/platform/DefaultServerUpgradeStatus.java index 0230b53708e..69bc39280cf 100644 --- a/sonar-server/src/main/java/org/sonar/server/platform/DefaultServerUpgradeStatus.java +++ b/sonar-server/src/main/java/org/sonar/server/platform/DefaultServerUpgradeStatus.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/platform/Platform.java b/sonar-server/src/main/java/org/sonar/server/platform/Platform.java index 1d0ab614b67..aaa69ba8047 100644 --- a/sonar-server/src/main/java/org/sonar/server/platform/Platform.java +++ b/sonar-server/src/main/java/org/sonar/server/platform/Platform.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/platform/PlatformLifecycleListener.java b/sonar-server/src/main/java/org/sonar/server/platform/PlatformLifecycleListener.java index 954e96575cb..31bb8bf0f09 100644 --- a/sonar-server/src/main/java/org/sonar/server/platform/PlatformLifecycleListener.java +++ b/sonar-server/src/main/java/org/sonar/server/platform/PlatformLifecycleListener.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/platform/ServerImpl.java b/sonar-server/src/main/java/org/sonar/server/platform/ServerImpl.java index 6a8f10ea2fd..5267fbcc8eb 100644 --- a/sonar-server/src/main/java/org/sonar/server/platform/ServerImpl.java +++ b/sonar-server/src/main/java/org/sonar/server/platform/ServerImpl.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/platform/ServerLifecycleNotifier.java b/sonar-server/src/main/java/org/sonar/server/platform/ServerLifecycleNotifier.java index 42d6bc229c6..4edc5db0428 100644 --- a/sonar-server/src/main/java/org/sonar/server/platform/ServerLifecycleNotifier.java +++ b/sonar-server/src/main/java/org/sonar/server/platform/ServerLifecycleNotifier.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/platform/ServerStartException.java b/sonar-server/src/main/java/org/sonar/server/platform/ServerStartException.java index 5638bfd0bf8..828c80505e2 100644 --- a/sonar-server/src/main/java/org/sonar/server/platform/ServerStartException.java +++ b/sonar-server/src/main/java/org/sonar/server/platform/ServerStartException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/plugins/BatchResourcesServlet.java b/sonar-server/src/main/java/org/sonar/server/plugins/BatchResourcesServlet.java index b47258bb802..bf83fa6961b 100644 --- a/sonar-server/src/main/java/org/sonar/server/plugins/BatchResourcesServlet.java +++ b/sonar-server/src/main/java/org/sonar/server/plugins/BatchResourcesServlet.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/plugins/PluginClassLoaders.java b/sonar-server/src/main/java/org/sonar/server/plugins/PluginClassLoaders.java index d76f3dcfa7d..eee0237bf3e 100644 --- a/sonar-server/src/main/java/org/sonar/server/plugins/PluginClassLoaders.java +++ b/sonar-server/src/main/java/org/sonar/server/plugins/PluginClassLoaders.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/plugins/PluginDeployer.java b/sonar-server/src/main/java/org/sonar/server/plugins/PluginDeployer.java index 6da8ea3fd49..2c5406cdf5e 100644 --- a/sonar-server/src/main/java/org/sonar/server/plugins/PluginDeployer.java +++ b/sonar-server/src/main/java/org/sonar/server/plugins/PluginDeployer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/plugins/PluginDownloader.java b/sonar-server/src/main/java/org/sonar/server/plugins/PluginDownloader.java index f3d9c23c631..aa58429eac5 100644 --- a/sonar-server/src/main/java/org/sonar/server/plugins/PluginDownloader.java +++ b/sonar-server/src/main/java/org/sonar/server/plugins/PluginDownloader.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/plugins/PluginMetadata.java b/sonar-server/src/main/java/org/sonar/server/plugins/PluginMetadata.java index 58410f2cbd8..b4e0fbad137 100644 --- a/sonar-server/src/main/java/org/sonar/server/plugins/PluginMetadata.java +++ b/sonar-server/src/main/java/org/sonar/server/plugins/PluginMetadata.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/plugins/PluginUpdate.java b/sonar-server/src/main/java/org/sonar/server/plugins/PluginUpdate.java index 2effefe822d..0d65664b4c1 100644 --- a/sonar-server/src/main/java/org/sonar/server/plugins/PluginUpdate.java +++ b/sonar-server/src/main/java/org/sonar/server/plugins/PluginUpdate.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/plugins/ServerPluginRepository.java b/sonar-server/src/main/java/org/sonar/server/plugins/ServerPluginRepository.java index 5cc2def52d2..a5cc852215b 100644 --- a/sonar-server/src/main/java/org/sonar/server/plugins/ServerPluginRepository.java +++ b/sonar-server/src/main/java/org/sonar/server/plugins/ServerPluginRepository.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/plugins/SonarUpdate.java b/sonar-server/src/main/java/org/sonar/server/plugins/SonarUpdate.java index e79ec2e8602..e9d8612a55a 100644 --- a/sonar-server/src/main/java/org/sonar/server/plugins/SonarUpdate.java +++ b/sonar-server/src/main/java/org/sonar/server/plugins/SonarUpdate.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/plugins/StaticResourcesServlet.java b/sonar-server/src/main/java/org/sonar/server/plugins/StaticResourcesServlet.java index 0481fcbae90..9d1a60a01df 100644 --- a/sonar-server/src/main/java/org/sonar/server/plugins/StaticResourcesServlet.java +++ b/sonar-server/src/main/java/org/sonar/server/plugins/StaticResourcesServlet.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterClient.java b/sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterClient.java index a85570f1a01..7dbcc8543d1 100644 --- a/sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterClient.java +++ b/sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterClient.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterMatrix.java b/sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterMatrix.java index 82c1cc773c1..c37e99eb447 100644 --- a/sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterMatrix.java +++ b/sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterMatrix.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterMatrixFactory.java b/sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterMatrixFactory.java index 6e33ace2d42..fb29dfe807b 100644 --- a/sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterMatrixFactory.java +++ b/sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterMatrixFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/qualitymodel/DefaultModelManager.java b/sonar-server/src/main/java/org/sonar/server/qualitymodel/DefaultModelManager.java index 0e5290a0012..9f2a3e06741 100644 --- a/sonar-server/src/main/java/org/sonar/server/qualitymodel/DefaultModelManager.java +++ b/sonar-server/src/main/java/org/sonar/server/qualitymodel/DefaultModelManager.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/qualitymodel/ModelManager.java b/sonar-server/src/main/java/org/sonar/server/qualitymodel/ModelManager.java index 8bd0f005e9e..213051e6cbc 100644 --- a/sonar-server/src/main/java/org/sonar/server/qualitymodel/ModelManager.java +++ b/sonar-server/src/main/java/org/sonar/server/qualitymodel/ModelManager.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/rules/DeprecatedProfileExporters.java b/sonar-server/src/main/java/org/sonar/server/rules/DeprecatedProfileExporters.java index 623f6c0abf6..dbb7f2eac44 100644 --- a/sonar-server/src/main/java/org/sonar/server/rules/DeprecatedProfileExporters.java +++ b/sonar-server/src/main/java/org/sonar/server/rules/DeprecatedProfileExporters.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/rules/DeprecatedProfileImporters.java b/sonar-server/src/main/java/org/sonar/server/rules/DeprecatedProfileImporters.java index c55ec758f1c..4d49738ca50 100644 --- a/sonar-server/src/main/java/org/sonar/server/rules/DeprecatedProfileImporters.java +++ b/sonar-server/src/main/java/org/sonar/server/rules/DeprecatedProfileImporters.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/rules/DeprecatedProfiles.java b/sonar-server/src/main/java/org/sonar/server/rules/DeprecatedProfiles.java index ee0628f76dc..40ed1877b07 100644 --- a/sonar-server/src/main/java/org/sonar/server/rules/DeprecatedProfiles.java +++ b/sonar-server/src/main/java/org/sonar/server/rules/DeprecatedProfiles.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/rules/DeprecatedRuleRepositories.java b/sonar-server/src/main/java/org/sonar/server/rules/DeprecatedRuleRepositories.java index 55de2e4efb5..0a0bfa5705b 100644 --- a/sonar-server/src/main/java/org/sonar/server/rules/DeprecatedRuleRepositories.java +++ b/sonar-server/src/main/java/org/sonar/server/rules/DeprecatedRuleRepositories.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/rules/ProfilesConsole.java b/sonar-server/src/main/java/org/sonar/server/rules/ProfilesConsole.java index 8217194761a..e70f785c438 100644 --- a/sonar-server/src/main/java/org/sonar/server/rules/ProfilesConsole.java +++ b/sonar-server/src/main/java/org/sonar/server/rules/ProfilesConsole.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/rules/RulesConsole.java b/sonar-server/src/main/java/org/sonar/server/rules/RulesConsole.java index 62bd8867a73..a7ed65b5e7c 100644 --- a/sonar-server/src/main/java/org/sonar/server/rules/RulesConsole.java +++ b/sonar-server/src/main/java/org/sonar/server/rules/RulesConsole.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/startup/ActivateDefaultProfiles.java b/sonar-server/src/main/java/org/sonar/server/startup/ActivateDefaultProfiles.java index b608d35cbf0..c780c14e719 100644 --- a/sonar-server/src/main/java/org/sonar/server/startup/ActivateDefaultProfiles.java +++ b/sonar-server/src/main/java/org/sonar/server/startup/ActivateDefaultProfiles.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/startup/DeleteDeprecatedMeasures.java b/sonar-server/src/main/java/org/sonar/server/startup/DeleteDeprecatedMeasures.java index eed02cc31b4..cce7eeae5b4 100644 --- a/sonar-server/src/main/java/org/sonar/server/startup/DeleteDeprecatedMeasures.java +++ b/sonar-server/src/main/java/org/sonar/server/startup/DeleteDeprecatedMeasures.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/startup/EnableProfiles.java b/sonar-server/src/main/java/org/sonar/server/startup/EnableProfiles.java index 9dc2fcccf81..2ae0845dd02 100644 --- a/sonar-server/src/main/java/org/sonar/server/startup/EnableProfiles.java +++ b/sonar-server/src/main/java/org/sonar/server/startup/EnableProfiles.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/startup/GwtPublisher.java b/sonar-server/src/main/java/org/sonar/server/startup/GwtPublisher.java index 2b54debd20d..fd7fb4a501d 100644 --- a/sonar-server/src/main/java/org/sonar/server/startup/GwtPublisher.java +++ b/sonar-server/src/main/java/org/sonar/server/startup/GwtPublisher.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/startup/JdbcDriverDeployer.java b/sonar-server/src/main/java/org/sonar/server/startup/JdbcDriverDeployer.java index 941be544f2e..e22e66ea861 100644 --- a/sonar-server/src/main/java/org/sonar/server/startup/JdbcDriverDeployer.java +++ b/sonar-server/src/main/java/org/sonar/server/startup/JdbcDriverDeployer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/startup/RegisterMetrics.java b/sonar-server/src/main/java/org/sonar/server/startup/RegisterMetrics.java index 769371519e6..7d25cc57208 100644 --- a/sonar-server/src/main/java/org/sonar/server/startup/RegisterMetrics.java +++ b/sonar-server/src/main/java/org/sonar/server/startup/RegisterMetrics.java @@ -1,97 +1,97 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.server.startup;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import org.sonar.api.database.DatabaseSession;
-import org.sonar.api.measures.CoreMetrics;
-import org.sonar.api.measures.Metric;
-import org.sonar.api.measures.Metrics;
-import org.sonar.api.profiles.Alert;
-import org.sonar.api.utils.Logs;
-import org.sonar.api.utils.TimeProfiler;
-import org.sonar.jpa.dao.MeasuresDao;
-import org.sonar.server.platform.ServerStartException;
-
-import javax.persistence.Query;
-
-import java.util.List;
-import java.util.Map;
-
-public class RegisterMetrics {
-
- private MeasuresDao measuresDao;
- private Metrics[] metricsRepositories = null;
- private DatabaseSession session;
-
- public RegisterMetrics(DatabaseSession session, MeasuresDao measuresDao, Metrics[] metricsRepositories) {
- this.session = session;
- this.measuresDao = measuresDao;
- this.metricsRepositories = metricsRepositories;
- }
-
- public void start() {
- TimeProfiler profiler = new TimeProfiler().start("Load metrics");
- measuresDao.disableAutomaticMetrics();
-
- List<Metric> metricsToRegister = Lists.newArrayList();
- metricsToRegister.addAll(CoreMetrics.getMetrics());
-
- Map<String, Metrics> metricsByRepository = Maps.newHashMap();
- if (metricsRepositories != null) {
- for (Metrics metrics : metricsRepositories) {
- checkMetrics(metricsByRepository, metrics);
- metricsToRegister.addAll(metrics.getMetrics());
- }
- }
- register(metricsToRegister);
- cleanAlerts();
- profiler.stop();
- }
-
- private void checkMetrics(Map<String, Metrics> metricsByRepository, Metrics metrics) {
- for (Metric metric : metrics.getMetrics()) {
- String metricKey = metric.getKey();
- if (CoreMetrics.metrics.contains(metric)) {
- throw new ServerStartException("The following metric is already defined in sonar: " + metricKey);
- }
- Metrics anotherRepository = metricsByRepository.get(metricKey);
- if (anotherRepository != null) {
- throw new ServerStartException("The metric '" + metricKey + "' is already defined in the extension: " + anotherRepository);
- }
- metricsByRepository.put(metricKey, metrics);
- }
- }
-
- protected void cleanAlerts() {
- Logs.INFO.info("cleaning alert thresholds...");
- Query query = session.createQuery("delete from " + Alert.class.getSimpleName() + " a where NOT EXISTS(FROM Metric m WHERE m=a.metric))");
- query.executeUpdate();
-
- query = session.createQuery("delete from " + Alert.class.getSimpleName() + " a where NOT EXISTS(FROM Metric m WHERE m=a.metric and m.enabled=true))");
- query.executeUpdate();
- session.commit();
- }
-
- protected void register(List<Metric> metrics) {
- measuresDao.registerMetrics(metrics);
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.server.startup; + +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import org.sonar.api.database.DatabaseSession; +import org.sonar.api.measures.CoreMetrics; +import org.sonar.api.measures.Metric; +import org.sonar.api.measures.Metrics; +import org.sonar.api.profiles.Alert; +import org.sonar.api.utils.Logs; +import org.sonar.api.utils.TimeProfiler; +import org.sonar.jpa.dao.MeasuresDao; +import org.sonar.server.platform.ServerStartException; + +import javax.persistence.Query; + +import java.util.List; +import java.util.Map; + +public class RegisterMetrics { + + private MeasuresDao measuresDao; + private Metrics[] metricsRepositories = null; + private DatabaseSession session; + + public RegisterMetrics(DatabaseSession session, MeasuresDao measuresDao, Metrics[] metricsRepositories) { + this.session = session; + this.measuresDao = measuresDao; + this.metricsRepositories = metricsRepositories; + } + + public void start() { + TimeProfiler profiler = new TimeProfiler().start("Load metrics"); + measuresDao.disableAutomaticMetrics(); + + List<Metric> metricsToRegister = Lists.newArrayList(); + metricsToRegister.addAll(CoreMetrics.getMetrics()); + + Map<String, Metrics> metricsByRepository = Maps.newHashMap(); + if (metricsRepositories != null) { + for (Metrics metrics : metricsRepositories) { + checkMetrics(metricsByRepository, metrics); + metricsToRegister.addAll(metrics.getMetrics()); + } + } + register(metricsToRegister); + cleanAlerts(); + profiler.stop(); + } + + private void checkMetrics(Map<String, Metrics> metricsByRepository, Metrics metrics) { + for (Metric metric : metrics.getMetrics()) { + String metricKey = metric.getKey(); + if (CoreMetrics.metrics.contains(metric)) { + throw new ServerStartException("The following metric is already defined in sonar: " + metricKey); + } + Metrics anotherRepository = metricsByRepository.get(metricKey); + if (anotherRepository != null) { + throw new ServerStartException("The metric '" + metricKey + "' is already defined in the extension: " + anotherRepository); + } + metricsByRepository.put(metricKey, metrics); + } + } + + protected void cleanAlerts() { + Logs.INFO.info("cleaning alert thresholds..."); + Query query = session.createQuery("delete from " + Alert.class.getSimpleName() + " a where NOT EXISTS(FROM Metric m WHERE m=a.metric))"); + query.executeUpdate(); + + query = session.createQuery("delete from " + Alert.class.getSimpleName() + " a where NOT EXISTS(FROM Metric m WHERE m=a.metric and m.enabled=true))"); + query.executeUpdate(); + session.commit(); + } + + protected void register(List<Metric> metrics) { + measuresDao.registerMetrics(metrics); + } +} diff --git a/sonar-server/src/main/java/org/sonar/server/startup/RegisterProvidedProfiles.java b/sonar-server/src/main/java/org/sonar/server/startup/RegisterProvidedProfiles.java index 99af8cfc275..5f36e4b84b2 100644 --- a/sonar-server/src/main/java/org/sonar/server/startup/RegisterProvidedProfiles.java +++ b/sonar-server/src/main/java/org/sonar/server/startup/RegisterProvidedProfiles.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/startup/RegisterQualityModels.java b/sonar-server/src/main/java/org/sonar/server/startup/RegisterQualityModels.java index 424bd7378bc..bc9cc902396 100644 --- a/sonar-server/src/main/java/org/sonar/server/startup/RegisterQualityModels.java +++ b/sonar-server/src/main/java/org/sonar/server/startup/RegisterQualityModels.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/startup/RegisterRules.java b/sonar-server/src/main/java/org/sonar/server/startup/RegisterRules.java index 2e2d31defed..3ad4ae210c9 100644 --- a/sonar-server/src/main/java/org/sonar/server/startup/RegisterRules.java +++ b/sonar-server/src/main/java/org/sonar/server/startup/RegisterRules.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/startup/ServerMetadataPersister.java b/sonar-server/src/main/java/org/sonar/server/startup/ServerMetadataPersister.java index 2159465e877..6a6e4092c52 100644 --- a/sonar-server/src/main/java/org/sonar/server/startup/ServerMetadataPersister.java +++ b/sonar-server/src/main/java/org/sonar/server/startup/ServerMetadataPersister.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/ui/AuthenticatorFactory.java b/sonar-server/src/main/java/org/sonar/server/ui/AuthenticatorFactory.java index 8f4a8404811..ed42799fd97 100644 --- a/sonar-server/src/main/java/org/sonar/server/ui/AuthenticatorFactory.java +++ b/sonar-server/src/main/java/org/sonar/server/ui/AuthenticatorFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/ui/AuthenticatorNotFoundException.java b/sonar-server/src/main/java/org/sonar/server/ui/AuthenticatorNotFoundException.java index 1e0c17f2cab..0e57e6bbfc5 100644 --- a/sonar-server/src/main/java/org/sonar/server/ui/AuthenticatorNotFoundException.java +++ b/sonar-server/src/main/java/org/sonar/server/ui/AuthenticatorNotFoundException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/ui/CodeColorizers.java b/sonar-server/src/main/java/org/sonar/server/ui/CodeColorizers.java index 87e5ca667ce..f6f346fdd44 100644 --- a/sonar-server/src/main/java/org/sonar/server/ui/CodeColorizers.java +++ b/sonar-server/src/main/java/org/sonar/server/ui/CodeColorizers.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/ui/DatabaseSessionFilter.java b/sonar-server/src/main/java/org/sonar/server/ui/DatabaseSessionFilter.java index c0ac1d62cd8..1c7d6f43123 100644 --- a/sonar-server/src/main/java/org/sonar/server/ui/DatabaseSessionFilter.java +++ b/sonar-server/src/main/java/org/sonar/server/ui/DatabaseSessionFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java b/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java index 60a792f5cc3..f540eda5a93 100644 --- a/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java +++ b/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/ui/SonarRackFilter.java b/sonar-server/src/main/java/org/sonar/server/ui/SonarRackFilter.java index 52a67f10ec9..e29fd9cd442 100644 --- a/sonar-server/src/main/java/org/sonar/server/ui/SonarRackFilter.java +++ b/sonar-server/src/main/java/org/sonar/server/ui/SonarRackFilter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/ui/ViewProxy.java b/sonar-server/src/main/java/org/sonar/server/ui/ViewProxy.java index 59fae3ac6a5..d36e9562dab 100644 --- a/sonar-server/src/main/java/org/sonar/server/ui/ViewProxy.java +++ b/sonar-server/src/main/java/org/sonar/server/ui/ViewProxy.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/java/org/sonar/server/ui/Views.java b/sonar-server/src/main/java/org/sonar/server/ui/Views.java index 69e4c8ee643..94b789eda46 100644 --- a/sonar-server/src/main/java/org/sonar/server/ui/Views.java +++ b/sonar-server/src/main/java/org/sonar/server/ui/Views.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb index ff16ea8ce3f..340ce2bfc3a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_dashboards_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_dashboards_controller.rb index 41f3f2c2e69..d57f4dd806b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_dashboards_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_dashboards_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_filters_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_filters_controller.rb index e7654f7fdc7..8ac69071732 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_filters_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_filters_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb index 487b371d866..19bc6c75c92 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/api_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/api_controller.rb index 999af3c8901..709b7d103fe 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/api_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/api_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/dependencies_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/dependencies_controller.rb index 19accdd5ec0..cfbb9bc07f0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/dependencies_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/dependencies_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/dependency_tree_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/dependency_tree_controller.rb index 89d22f6002d..c91ad4b2445 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/dependency_tree_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/dependency_tree_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/events_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/events_controller.rb index 55729ce6829..e22c280a179 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/events_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/events_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/favourites_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/favourites_controller.rb index e2d2a42bbe0..4d119778824 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/favourites_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/favourites_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/gwp_resources_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/gwp_resources_controller.rb index 9bf22ae9c0d..6e1c880d968 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/gwp_resources_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/gwp_resources_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/metrics_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/metrics_controller.rb index 2572296030d..c1ce7058cd9 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/metrics_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/metrics_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/projects_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/projects_controller.rb index 4d28149b5b1..e0beb3c8233 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/projects_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/projects_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/properties_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/properties_controller.rb index 89b78929d1b..0f854e084ee 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/properties_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/properties_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resource_rest_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resource_rest_controller.rb index 45e161969bb..2db651e784c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resource_rest_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resource_rest_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb index 2daf8b9d568..a7e01d541d0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/rest_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/rest_controller.rb index c073a69d793..814ba1c9950 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/rest_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/rest_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/rules_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/rules_controller.rb index e3d78fba99f..0d9a4bb5394 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/rules_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/rules_controller.rb @@ -1,99 +1,99 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar 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.
-#
-# Sonar 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 Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-require 'fastercsv'
-require "json"
-
-class Api::RulesController < Api::RestController
-
- def rest_call
- set_backward_compatibility_params
- language = params[:language] || ''
- options= {}
-
- options[:plugins]=params[:plugins].split(',') if params[:plugins]
- options[:language]=language
- options[:priorities]=params[:priorities].split(',') if params[:priorities]
- options[:status]=params[:status]
- options[:searchtext]=params[:searchtext]
- options[:include_parameters]=true
- options[:inheritance]=params[:inheritance]
-
-
- if params[:profile]
- profile = Profile.find_by_name_and_language(params[:profile], language)
- if profile.nil?
- rest_render([])
- else
- options[:profile]=profile
- rules = Rule.search(java_facade, options)
- rest_render(rules, profile)
- end
- else
- rules = Rule.search(java_facade, options)
- rest_render(rules)
- end
- end
-
- def set_backward_compatibility_params
- params[:plugins]=params[:plugin] if params[:plugin]
- params[:priorities]=params[:levels] if params[:levels]
- end
-
-
- private
-
- def rest_render(rules=[], profile=nil)
- respond_to do |format|
- format.json{ render :json => rest_to_json(rules, profile) }
- format.xml { render :xml => rest_to_xml(rules, profile) }
- format.csv {
- send_data(rest_to_csv(rules, profile),
- :type => 'text/csv; charset=utf-8; header=present',
- :disposition => 'attachment; filename=rules.csv')
- }
- end
- end
-
- def rest_to_json(rules, profile)
- JSON(rules.collect{|rule| rule.to_hash_json(profile)})
- end
-
- def rest_to_xml(rules, profile)
- xml = Builder::XmlMarkup.new(:indent => 0)
- xml.instruct!
- xml.rules do
- rules.each do |rule|
- xml << rule.to_xml(profile)
- end
- end
- end
-
- def rest_to_csv(rules, profile)
- FasterCSV.generate do |csv|
- header = ["title", "key", "plugin"]
- header.concat(["priority","status"]) if profile
- csv << header
- rules.each do |rule|
- csv << rule.to_csv(profile)
- end
- end
- end
-
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar 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. +# +# Sonar 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 Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +require 'fastercsv' +require "json" + +class Api::RulesController < Api::RestController + + def rest_call + set_backward_compatibility_params + language = params[:language] || '' + options= {} + + options[:plugins]=params[:plugins].split(',') if params[:plugins] + options[:language]=language + options[:priorities]=params[:priorities].split(',') if params[:priorities] + options[:status]=params[:status] + options[:searchtext]=params[:searchtext] + options[:include_parameters]=true + options[:inheritance]=params[:inheritance] + + + if params[:profile] + profile = Profile.find_by_name_and_language(params[:profile], language) + if profile.nil? + rest_render([]) + else + options[:profile]=profile + rules = Rule.search(java_facade, options) + rest_render(rules, profile) + end + else + rules = Rule.search(java_facade, options) + rest_render(rules) + end + end + + def set_backward_compatibility_params + params[:plugins]=params[:plugin] if params[:plugin] + params[:priorities]=params[:levels] if params[:levels] + end + + + private + + def rest_render(rules=[], profile=nil) + respond_to do |format| + format.json{ render :json => rest_to_json(rules, profile) } + format.xml { render :xml => rest_to_xml(rules, profile) } + format.csv { + send_data(rest_to_csv(rules, profile), + :type => 'text/csv; charset=utf-8; header=present', + :disposition => 'attachment; filename=rules.csv') + } + end + end + + def rest_to_json(rules, profile) + JSON(rules.collect{|rule| rule.to_hash_json(profile)}) + end + + def rest_to_xml(rules, profile) + xml = Builder::XmlMarkup.new(:indent => 0) + xml.instruct! + xml.rules do + rules.each do |rule| + xml << rule.to_xml(profile) + end + end + end + + def rest_to_csv(rules, profile) + FasterCSV.generate do |csv| + header = ["title", "key", "plugin"] + header.concat(["priority","status"]) if profile + csv << header + rules.each do |rule| + csv << rule.to_csv(profile) + end + end + end + end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/server_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/server_controller.rb index d8ac970bcb0..00d93e56597 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/server_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/server_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/sources_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/sources_controller.rb index 23b4df1405a..4dff8559b9a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/sources_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/sources_controller.rb @@ -1,66 +1,66 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar 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.
-#
-# Sonar 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 Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-
-require "json"
-
-class Api::SourcesController < Api::RestController
-
- def rest_call
- resource_id=params[:resource]
- if resource_id
- @resource=Project.by_key(resource_id)
- if @resource.nil?
- rest_status_ko("Resource [#{resource_id}] not found", 404)
- return
- end
- end
- return access_denied unless has_role?(:codeviewer, @resource)
-
- source = @resource.last_snapshot.source
- if !source
- rest_status_ko("Resource [#{@resource.id}] has no sources", 404)
- else
- #optimization
- #source.snapshot.project=@resource
- rest_render({:source => source, :params => params})
- end
- end
-
- def rest_to_json(objects)
- source = objects[:source]
- params = objects[:params]
- JSON([source.to_hash_json(params)])
- end
-
- def rest_to_xml(objects)
- source = objects[:source]
- params = objects[:params]
- xml = Builder::XmlMarkup.new(:indent => 0)
- xml.instruct!
- source.to_xml(xml, params)
- end
-
- def rest_to_text(objects)
- source = objects[:source]
- params = objects[:params]
- source.to_txt(params)
- end
-
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar 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. +# +# Sonar 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 Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# + +require "json" + +class Api::SourcesController < Api::RestController + + def rest_call + resource_id=params[:resource] + if resource_id + @resource=Project.by_key(resource_id) + if @resource.nil? + rest_status_ko("Resource [#{resource_id}] not found", 404) + return + end + end + return access_denied unless has_role?(:codeviewer, @resource) + + source = @resource.last_snapshot.source + if !source + rest_status_ko("Resource [#{@resource.id}] has no sources", 404) + else + #optimization + #source.snapshot.project=@resource + rest_render({:source => source, :params => params}) + end + end + + def rest_to_json(objects) + source = objects[:source] + params = objects[:params] + JSON([source.to_hash_json(params)]) + end + + def rest_to_xml(objects) + source = objects[:source] + params = objects[:params] + xml = Builder::XmlMarkup.new(:indent => 0) + xml.instruct! + source.to_xml(xml, params) + end + + def rest_to_text(objects) + source = objects[:source] + params = objects[:params] + source.to_txt(params) + end + end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb index d795f6bfddd..e0e710a3b74 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/updatecenter_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/updatecenter_controller.rb index 03f9e53daa7..329d681338c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/updatecenter_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/updatecenter_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/user_properties_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/user_properties_controller.rb index c07628d67c8..e90f6cc9c20 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/user_properties_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/user_properties_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/violations_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/violations_controller.rb index e8b62eafa90..d114af18ba4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/violations_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/violations_controller.rb @@ -1,100 +1,100 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar 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.
-#
-# Sonar 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 Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-
-require "json"
-
-class Api::ViolationsController < Api::ResourceRestController
-
- def rest_call
- snapshot = @resource.last_snapshot
-
- conditions=[]
- values={}
- if params['scopes']
- conditions << 'snapshots.scope in (:scopes)'
- values[:scopes]=params['scopes'].split(',')
- end
- if params['qualifiers']
- conditions << 'snapshots.qualifier in (:qualifiers)'
- values[:qualifiers]=params['qualifiers'].split(',')
- end
-
- depth=(params['depth'] ? params['depth'].to_i : 0)
- if depth==0
- conditions << 'snapshots.id=:sid'
- values[:sid]=snapshot.id
-
- elsif depth>0
- # all the resource tree
- conditions << 'snapshots.root_snapshot_id=:root_sid'
- values[:root_sid] = (snapshot.root_snapshot_id || snapshot.id)
-
- conditions << 'snapshots.path LIKE :path'
- values[:path]="#{snapshot.path}#{snapshot.id}.%"
-
- conditions << 'snapshots.depth=:depth'
- values[:depth] = snapshot.depth + depth
-
- else
- # negative : all the resource tree
- conditions << '(snapshots.id=:sid OR (snapshots.root_snapshot_id=:root_sid AND snapshots.path LIKE :path))'
- values[:sid] = snapshot.id
- values[:root_sid] = (snapshot.root_snapshot_id || snapshot.id)
- values[:path]="#{snapshot.path}#{snapshot.id}.%"
- end
-
- if params[:rules]
- rule_ids=params[:rules].split(',').map do |key_or_id|
- Rule.to_i(key_or_id)
- end.compact
- conditions << 'rule_id IN (:rule_ids)'
- values[:rule_ids] = rule_ids
- end
- if params[:priorities]
- conditions << 'rule_failures.failure_level IN (:priorities)'
- values[:priorities]=params[:priorities].split(',').map do |p|
- Sonar::RulePriority.id(p)
- end.compact
- end
-
- limit = (params[:limit] ? [params[:limit].to_i,5000].min : 5000)
- violations = RuleFailure.find(:all,
- :conditions => [ conditions.join(' AND '), values],
- :include => [:snapshot, {:snapshot => :project}, :rule],
- :order => 'rule_failures.failure_level DESC',
- :limit => limit)
- rest_render(violations)
- end
-
- def rest_to_json(rule_failures)
- JSON(rule_failures.collect{|rule_failure| rule_failure.to_hash_json})
- end
-
- def rest_to_xml(rule_failures)
- xml = Builder::XmlMarkup.new(:indent => 0)
- xml.instruct!
- xml.violations do
- rule_failures.each do |rule_failure|
- rule_failure.to_xml(xml)
- end
- end
- end
-
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar 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. +# +# Sonar 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 Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# + +require "json" + +class Api::ViolationsController < Api::ResourceRestController + + def rest_call + snapshot = @resource.last_snapshot + + conditions=[] + values={} + if params['scopes'] + conditions << 'snapshots.scope in (:scopes)' + values[:scopes]=params['scopes'].split(',') + end + if params['qualifiers'] + conditions << 'snapshots.qualifier in (:qualifiers)' + values[:qualifiers]=params['qualifiers'].split(',') + end + + depth=(params['depth'] ? params['depth'].to_i : 0) + if depth==0 + conditions << 'snapshots.id=:sid' + values[:sid]=snapshot.id + + elsif depth>0 + # all the resource tree + conditions << 'snapshots.root_snapshot_id=:root_sid' + values[:root_sid] = (snapshot.root_snapshot_id || snapshot.id) + + conditions << 'snapshots.path LIKE :path' + values[:path]="#{snapshot.path}#{snapshot.id}.%" + + conditions << 'snapshots.depth=:depth' + values[:depth] = snapshot.depth + depth + + else + # negative : all the resource tree + conditions << '(snapshots.id=:sid OR (snapshots.root_snapshot_id=:root_sid AND snapshots.path LIKE :path))' + values[:sid] = snapshot.id + values[:root_sid] = (snapshot.root_snapshot_id || snapshot.id) + values[:path]="#{snapshot.path}#{snapshot.id}.%" + end + + if params[:rules] + rule_ids=params[:rules].split(',').map do |key_or_id| + Rule.to_i(key_or_id) + end.compact + conditions << 'rule_id IN (:rule_ids)' + values[:rule_ids] = rule_ids + end + if params[:priorities] + conditions << 'rule_failures.failure_level IN (:priorities)' + values[:priorities]=params[:priorities].split(',').map do |p| + Sonar::RulePriority.id(p) + end.compact + end + + limit = (params[:limit] ? [params[:limit].to_i,5000].min : 5000) + violations = RuleFailure.find(:all, + :conditions => [ conditions.join(' AND '), values], + :include => [:snapshot, {:snapshot => :project}, :rule], + :order => 'rule_failures.failure_level DESC', + :limit => limit) + rest_render(violations) + end + + def rest_to_json(rule_failures) + JSON(rule_failures.collect{|rule_failure| rule_failure.to_hash_json}) + end + + def rest_to_xml(rule_failures) + xml = Builder::XmlMarkup.new(:indent => 0) + xml.instruct! + xml.violations do + rule_failures.each do |rule_failure| + rule_failure.to_xml(xml) + end + end + end + end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb index 830fbde36b6..cc87fe0dc86 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/backup_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/backup_controller.rb index 93a3a94adac..61f6c9748c8 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/backup_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/backup_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/charts_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/charts_controller.rb index 7724a16a5fd..69e07954865 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/charts_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/charts_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/columns_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/columns_controller.rb index 96849e2bf03..4114927a77e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/columns_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/columns_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/components_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/components_controller.rb index 737936ab11c..f70f303af8b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/components_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/components_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb index c56dab9ba68..38afc36f524 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb index 6379054c6b8..86dcb004482 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dependencies_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dependencies_controller.rb index 4fcc2dbf621..7eb59a26328 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dependencies_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dependencies_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/drilldown_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/drilldown_controller.rb index 7f1e27281b6..5462e264960 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/drilldown_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/drilldown_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/event_categories_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/event_categories_controller.rb index 82d3cf4a8f9..31a1eb4175c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/event_categories_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/event_categories_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/events_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/events_controller.rb index 4c232f9bc49..d4f030e2651 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/events_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/events_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/favourites_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/favourites_controller.rb index 7f67c4035d4..e96f30a6db8 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/favourites_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/favourites_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/feeds_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/feeds_controller.rb index 1387add3e79..0b1110c0448 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/feeds_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/feeds_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb index 30cc0c01038..0522b63a718 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/groups_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/groups_controller.rb index 6bf27fa6d26..f2efd7b09f1 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/groups_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/groups_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/ie6_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/ie6_controller.rb index 29af2b1c3a9..9d89aa58a7b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/ie6_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/ie6_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/maintenance_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/maintenance_controller.rb index 11d82ad57cd..8869b59a5ae 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/maintenance_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/maintenance_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/metrics_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/metrics_controller.rb index e0dc56cd941..d206ed13d0b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/metrics_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/metrics_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/configuration_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/configuration_controller.rb index 967f482213d..f5ea76a519d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/configuration_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/configuration_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/home_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/home_controller.rb index 6225668b563..59ce20ce328 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/home_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/home_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb index 05aae87c7bf..83ad7be1879 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb index 30ea3658d13..9121feb7e60 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb index 1cbe2a1c06a..cb68a4218cb 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_roles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_roles_controller.rb index 234cfa27c90..4ae8ae62694 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_roles_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_roles_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb index 67e94f7aba7..d7500963952 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb index fa9563cd03a..b420f46502a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb index e85524a7c75..291a95f217b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb @@ -1,348 +1,348 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar 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.
-#
-# Sonar 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 Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-require 'cgi'
-
-class RulesConfigurationController < ApplicationController
-
- SECTION=Navigation::SECTION_CONFIGURATION
-
- STATUS_ACTIVE = "ACTIVE"
- STATUS_INACTIVE = "INACTIVE"
- ANY_SELECTION = [["Any", '']]
- RULE_PRIORITIES = Sonar::RulePriority.as_options.reverse
-
- # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
- verify :method => :post, :only => ['activate_rule', 'update_param', 'bulk_edit', 'create', 'update', 'delete', 'revert_rule'], :redirect_to => { :action => 'index' }
-
- before_filter :admin_required, :except => [ 'index', 'export' ]
-
- def index
- unless params[:id].blank?
- if params[:id].to_i<=0
- redirect_to :controller => 'profiles'
- return
- end
- begin
- @profile = Profile.find(params[:id].to_i)
- rescue
- redirect_to :controller => 'profiles'
- return
- end
- else
- @profile = Profile.default_profile
- end
-
- init_params()
-
- @select_plugins = ANY_SELECTION + java_facade.getRuleRepositoriesByLanguage(@profile.language).collect { |repo| [repo.getName(true), repo.getKey()]}.sort
- @select_priority = ANY_SELECTION + RULE_PRIORITIES
- @select_status = [['Any',''], ["Active", STATUS_ACTIVE], ["Inactive", STATUS_INACTIVE]]
- @select_inheritance = [['Any',''], ["Not inherited", 'NOT'], ["Inherited", 'INHERITED'], ["Overrides", 'OVERRIDES']]
-
- @rules = Rule.search(java_facade, {
- :profile => @profile, :status => @status, :priorities => @priorities, :inheritance => @inheritance,
- :plugins => @plugins, :searchtext => @searchtext, :include_parameters => true, :language => @profile.language})
-
- unless @searchtext.blank?
- if @status==STATUS_ACTIVE
- @hidden_inactives=Rule.search(java_facade, {
- :profile => @profile, :status => STATUS_INACTIVE, :priorities => @priorities,
- :plugins => @plugins, :language => @profile.language, :searchtext => @searchtext, :include_parameters => false}).size
-
- elsif @status==STATUS_INACTIVE
- @hidden_actives=Rule.search(java_facade, {
- :profile => @profile, :status => STATUS_ACTIVE, :priorities => @priorities,
- :plugins => @plugins, :language => @profile.language, :searchtext => @searchtext, :include_parameters => false}).size
- end
- end
-
- end
-
-
- #
- #
- # POST /rules_configuration/revert_rule?id=<profile id>&active_rule_id=<active rule id>
- #
- #
- def revert_rule
- id = params[:id].to_i
- rule_id = params[:active_rule_id].to_i
- java_facade.revertRule(id, rule_id)
- redirect_to request.query_parameters.merge({:action => 'index', :id => params[:id], :commit => nil})
- end
-
-
- #
- #
- # POST /rules_configuration/activate_rule?id=<profile id>&rule_id=<rule id>&level=<priority>
- #
- # If the parameter "level" is blank or null, then the rule is removed from the profile.
- #
- #
- def activate_rule
- profile = Profile.find(params[:id].to_i)
- if profile && !profile.provided?
- rule=Rule.find(:first, :conditions => {:id => params[:rule_id].to_i, :enabled => true})
- priority=params[:level]
-
- active_rule=profile.active_by_rule_id(rule.id)
- if priority.blank?
- # deactivate the rule
- active_rule.destroy if active_rule
- active_rule=nil
- java_facade.ruleDeactivated(profile.id, rule.id)
- else
- # activate the rule
- if active_rule.nil?
- active_rule = ActiveRule.new(:profile_id => profile.id, :rule => rule)
- rule.parameters.select{|p| p.default_value.present?}.each do |p|
- active_rule.active_rule_parameters.build(:rules_parameter => p, :value => p.default_value)
- end
- end
- active_rule.failure_level=Sonar::RulePriority.id(priority)
- active_rule.save!
- java_facade.ruleActivatedOrChanged(profile.id, active_rule.id)
- end
- if active_rule
- active_rule.reload
- end
-
- is_admin=true # security has already been checked by controller filters
- render :update do |page|
- page.replace_html("rule_#{rule.id}", :partial => 'rule', :object => rule, :locals => {:profile => profile, :active_rule => active_rule, :is_admin => is_admin})
- page.assign('localModifications', true)
- end
- end
- end
-
-
- #
- #
- # GET /rules_configuration/new/<profile id>?rule_id=<rule id>
- #
- #
- def new
- # form to duplicate a rule
- @profile = Profile.find(params[:id].to_i)
- @rule = Rule.find(params[:rule_id])
- end
-
- #
- #
- # POST /rules_configuration/create/<profile id>?rule_id=<rule id>&rule[name]=<new name>&...
- #
- #
- def create
- template=Rule.find(params[:rule_id])
- rule=Rule.create(params[:rule].merge(
- {
- :priority => Sonar::RulePriority.id(params[:rule][:priority]),
- :parent_id => template.id,
- :plugin_name => template.plugin_name,
- :cardinality => 'SINGLE',
- :plugin_rule_key => "#{template.plugin_rule_key}_#{Time.now.to_i}",
- :plugin_config_key => template.plugin_config_key,
- :enabled => true}))
-
- template.parameters.each do |template_parameter|
- rule.rules_parameters.build(:name => template_parameter.name, :param_type => template_parameter.param_type, :description => template_parameter.description,
- :default_value => params[:rule_param][template_parameter.name])
- end
-
- if rule.save
- redirect_to :action => 'index', :id => params[:id], :searchtext => rule.name, :rule_status => 'INACTIVE', "plugins[]" => rule.plugin_name
-
- else
- flash[:error]="Rule is not valid: <br/>#{rule.errors.full_messages.join('<br/>')}"
- redirect_to :action => 'new', :id => params[:id], :rule_id => params[:rule_id]
- end
- end
-
-
- # deprecated since 2.3
- def export
- redirect_to request.query_parameters.merge({:controller => 'profiles', :action => 'export'})
- end
-
- #
- #
- # GET /rules_configuration/new/<profile id>?rule_id=<rule id>
- #
- #
- def edit
- # form to edit a rule
- @profile = Profile.find(params[:id])
- @rule = Rule.find(params[:rule_id])
- if !@rule.editable?
- redirect_to :action => 'index', :id => params[:id]
- end
- end
-
- #
- #
- # POST /rules_configuration/update/<profile id>?rule_id=<rule id>&rule[name]=<new name>&...
- #
- #
- def update
- rule=Rule.find(params[:rule_id])
- if rule.editable?
- rule.name=params[:rule][:name]
- rule.description=params[:rule][:description]
- rule.priority=Sonar::RulePriority.id(params[:rule][:priority])
- rule.parameters.each do |parameter|
- parameter.default_value=params[:rule_param][parameter.name]
- parameter.save
- end
- if rule.save
- redirect_to :action => 'index', :id => params[:id], :searchtext => rule.name, :rule_status => '', "plugins[]" => rule.plugin_name
- else
- flash[:error]="Rule is not valid: <br/>#{rule.errors.full_messages.join('<br/>')}"
- redirect_to :action => 'new', :id => params[:id], :rule_id => params[:rule_id]
- end
- else
- flash[:error]='Unknown rule'
- redirect_to :action => 'index', :id => params[:id]
- end
- end
-
-
- #
- #
- # POST /rules_configuration/delete/<profile id>?rule_id=<rule id>
- #
- #
- def delete
- rule=Rule.find(params[:rule_id])
- if rule.editable?
- rule.enabled=false
- rule.save
-
- # it's mandatory to execute 'destroy_all' but not 'delete_all' because active_rule_parameters must
- # also be destroyed in cascade.
- ActiveRule.destroy_all("rule_id=#{rule.id}")
- flash[:notice]='Rule deleted'
- else
- flash[:error]='Unknown rule'
- end
- redirect_to :action => 'index', :id => params[:id]
- end
-
- #
- #
- # POST /rules_configuration/bulk_edit?id=<profile id>&bulk_rule_ids=<list of rule ids>&bulk_action=<action>
- #
- # Values of the parameter 'bulk_action' :
- # - 'activate' : activate all the selected rules with their default priority
- # - 'deactivate' : deactivate all the selected rules
- #
- #
- def bulk_edit
- profile = Profile.find(params[:id].to_i)
- rule_ids = params[:bulk_rule_ids].split(',').map{|id| id.to_i}
- status=params[:rule_status]
-
- case params[:bulk_action]
- when 'activate'
- count=activate_rules(profile, rule_ids)
- flash[:notice]="#{count} rules have been activated."
- status=STATUS_ACTIVE if status==STATUS_INACTIVE
-
- when 'deactivate'
- count=deactivate_rules(profile, rule_ids)
- flash[:notice]="#{count} rules have been deactivated."
- status=STATUS_INACTIVE if status==STATUS_ACTIVE
- end
-
- url_parameters=request.query_parameters.merge({:action => 'index', :bulk_action => nil, :bulk_rule_ids => nil, :id => profile.id, :rule_status => status})
- redirect_to url_parameters
- end
-
-
-
- def update_param
- is_admin=true # security has already been checked by controller filters
- profile = Profile.find(params[:profile_id].to_i)
- rule_param = RulesParameter.find(params[:param_id].to_i)
- active_rule = ActiveRule.find(params[:active_rule_id].to_i)
- active_param = ActiveRuleParameter.find(params[:id].to_i) if params[:id].to_i > 0
- value = params[:value]
- if !profile.provided?
- if value != ""
- active_param = ActiveRuleParameter.new(:rules_parameter => rule_param, :active_rule => active_rule ) if active_param.nil?
- active_param.value = value
- active_param.save
- active_param.valid?
- active_param.reload
- elsif !active_param.nil?
- active_param.destroy
- active_param = nil
- end
- java_facade.ruleActivatedOrChanged(profile.id, active_rule.id)
- end
- render :partial => 'rule_param', :object => nil,
- :locals => {:parameter => rule_param, :active_parameter => active_param, :profile => profile, :active_rule => active_rule, :is_admin => is_admin }
- end
-
- private
-
- # return the number of newly activated rules
- def activate_rules(profile, rule_ids)
- count=0
- rule_ids_to_activate=(rule_ids - profile.active_rules.map{|ar| ar.rule_id})
- unless rule_ids_to_activate.empty?
- rules_to_activate=Rule.find(:all, :conditions => {:enabled=>true, :id => rule_ids_to_activate})
- count = rules_to_activate.size
- rules_to_activate.each do |rule|
- active_rule = profile.active_rules.create(:rule => rule, :failure_level => rule.priority)
- java_facade.ruleActivatedOrChanged(profile.id, active_rule.id)
- end
- end
- count
- end
-
- def deactivate_rules(profile, rule_ids)
- count=0
- profile.active_rules.each do |ar|
- if rule_ids.include?(ar.rule_id) && !ar.inheritance.present?
- ar.destroy
- java_facade.ruleDeactivated(profile.id, ar.rule_id)
- count+=1
- end
- end
- count
- end
-
- def init_params
- @id = params[:id]
- @priorities = filter_any(params[:priorities]) || ['']
- @plugins=filter_any(params[:plugins]) || ['']
- @status=params[:rule_status] || STATUS_ACTIVE
- @inheritance=params[:inheritance] || ''
- @searchtext=params[:searchtext]
- end
-
- def filter_any(array)
- if array && array.size>1 && array.include?('')
- array=[''] #keep only 'any'
- end
- array
- end
-
-end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar 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. +# +# Sonar 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 Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +require 'cgi' + +class RulesConfigurationController < ApplicationController + + SECTION=Navigation::SECTION_CONFIGURATION + + STATUS_ACTIVE = "ACTIVE" + STATUS_INACTIVE = "INACTIVE" + ANY_SELECTION = [["Any", '']] + RULE_PRIORITIES = Sonar::RulePriority.as_options.reverse + + # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) + verify :method => :post, :only => ['activate_rule', 'update_param', 'bulk_edit', 'create', 'update', 'delete', 'revert_rule'], :redirect_to => { :action => 'index' } + + before_filter :admin_required, :except => [ 'index', 'export' ] + + def index + unless params[:id].blank? + if params[:id].to_i<=0 + redirect_to :controller => 'profiles' + return + end + begin + @profile = Profile.find(params[:id].to_i) + rescue + redirect_to :controller => 'profiles' + return + end + else + @profile = Profile.default_profile + end + + init_params() + + @select_plugins = ANY_SELECTION + java_facade.getRuleRepositoriesByLanguage(@profile.language).collect { |repo| [repo.getName(true), repo.getKey()]}.sort + @select_priority = ANY_SELECTION + RULE_PRIORITIES + @select_status = [['Any',''], ["Active", STATUS_ACTIVE], ["Inactive", STATUS_INACTIVE]] + @select_inheritance = [['Any',''], ["Not inherited", 'NOT'], ["Inherited", 'INHERITED'], ["Overrides", 'OVERRIDES']] + + @rules = Rule.search(java_facade, { + :profile => @profile, :status => @status, :priorities => @priorities, :inheritance => @inheritance, + :plugins => @plugins, :searchtext => @searchtext, :include_parameters => true, :language => @profile.language}) + + unless @searchtext.blank? + if @status==STATUS_ACTIVE + @hidden_inactives=Rule.search(java_facade, { + :profile => @profile, :status => STATUS_INACTIVE, :priorities => @priorities, + :plugins => @plugins, :language => @profile.language, :searchtext => @searchtext, :include_parameters => false}).size + + elsif @status==STATUS_INACTIVE + @hidden_actives=Rule.search(java_facade, { + :profile => @profile, :status => STATUS_ACTIVE, :priorities => @priorities, + :plugins => @plugins, :language => @profile.language, :searchtext => @searchtext, :include_parameters => false}).size + end + end + + end + + + # + # + # POST /rules_configuration/revert_rule?id=<profile id>&active_rule_id=<active rule id> + # + # + def revert_rule + id = params[:id].to_i + rule_id = params[:active_rule_id].to_i + java_facade.revertRule(id, rule_id) + redirect_to request.query_parameters.merge({:action => 'index', :id => params[:id], :commit => nil}) + end + + + # + # + # POST /rules_configuration/activate_rule?id=<profile id>&rule_id=<rule id>&level=<priority> + # + # If the parameter "level" is blank or null, then the rule is removed from the profile. + # + # + def activate_rule + profile = Profile.find(params[:id].to_i) + if profile && !profile.provided? + rule=Rule.find(:first, :conditions => {:id => params[:rule_id].to_i, :enabled => true}) + priority=params[:level] + + active_rule=profile.active_by_rule_id(rule.id) + if priority.blank? + # deactivate the rule + active_rule.destroy if active_rule + active_rule=nil + java_facade.ruleDeactivated(profile.id, rule.id) + else + # activate the rule + if active_rule.nil? + active_rule = ActiveRule.new(:profile_id => profile.id, :rule => rule) + rule.parameters.select{|p| p.default_value.present?}.each do |p| + active_rule.active_rule_parameters.build(:rules_parameter => p, :value => p.default_value) + end + end + active_rule.failure_level=Sonar::RulePriority.id(priority) + active_rule.save! + java_facade.ruleActivatedOrChanged(profile.id, active_rule.id) + end + if active_rule + active_rule.reload + end + + is_admin=true # security has already been checked by controller filters + render :update do |page| + page.replace_html("rule_#{rule.id}", :partial => 'rule', :object => rule, :locals => {:profile => profile, :active_rule => active_rule, :is_admin => is_admin}) + page.assign('localModifications', true) + end + end + end + + + # + # + # GET /rules_configuration/new/<profile id>?rule_id=<rule id> + # + # + def new + # form to duplicate a rule + @profile = Profile.find(params[:id].to_i) + @rule = Rule.find(params[:rule_id]) + end + + # + # + # POST /rules_configuration/create/<profile id>?rule_id=<rule id>&rule[name]=<new name>&... + # + # + def create + template=Rule.find(params[:rule_id]) + rule=Rule.create(params[:rule].merge( + { + :priority => Sonar::RulePriority.id(params[:rule][:priority]), + :parent_id => template.id, + :plugin_name => template.plugin_name, + :cardinality => 'SINGLE', + :plugin_rule_key => "#{template.plugin_rule_key}_#{Time.now.to_i}", + :plugin_config_key => template.plugin_config_key, + :enabled => true})) + + template.parameters.each do |template_parameter| + rule.rules_parameters.build(:name => template_parameter.name, :param_type => template_parameter.param_type, :description => template_parameter.description, + :default_value => params[:rule_param][template_parameter.name]) + end + + if rule.save + redirect_to :action => 'index', :id => params[:id], :searchtext => rule.name, :rule_status => 'INACTIVE', "plugins[]" => rule.plugin_name + + else + flash[:error]="Rule is not valid: <br/>#{rule.errors.full_messages.join('<br/>')}" + redirect_to :action => 'new', :id => params[:id], :rule_id => params[:rule_id] + end + end + + + # deprecated since 2.3 + def export + redirect_to request.query_parameters.merge({:controller => 'profiles', :action => 'export'}) + end + + # + # + # GET /rules_configuration/new/<profile id>?rule_id=<rule id> + # + # + def edit + # form to edit a rule + @profile = Profile.find(params[:id]) + @rule = Rule.find(params[:rule_id]) + if !@rule.editable? + redirect_to :action => 'index', :id => params[:id] + end + end + + # + # + # POST /rules_configuration/update/<profile id>?rule_id=<rule id>&rule[name]=<new name>&... + # + # + def update + rule=Rule.find(params[:rule_id]) + if rule.editable? + rule.name=params[:rule][:name] + rule.description=params[:rule][:description] + rule.priority=Sonar::RulePriority.id(params[:rule][:priority]) + rule.parameters.each do |parameter| + parameter.default_value=params[:rule_param][parameter.name] + parameter.save + end + if rule.save + redirect_to :action => 'index', :id => params[:id], :searchtext => rule.name, :rule_status => '', "plugins[]" => rule.plugin_name + else + flash[:error]="Rule is not valid: <br/>#{rule.errors.full_messages.join('<br/>')}" + redirect_to :action => 'new', :id => params[:id], :rule_id => params[:rule_id] + end + else + flash[:error]='Unknown rule' + redirect_to :action => 'index', :id => params[:id] + end + end + + + # + # + # POST /rules_configuration/delete/<profile id>?rule_id=<rule id> + # + # + def delete + rule=Rule.find(params[:rule_id]) + if rule.editable? + rule.enabled=false + rule.save + + # it's mandatory to execute 'destroy_all' but not 'delete_all' because active_rule_parameters must + # also be destroyed in cascade. + ActiveRule.destroy_all("rule_id=#{rule.id}") + flash[:notice]='Rule deleted' + else + flash[:error]='Unknown rule' + end + redirect_to :action => 'index', :id => params[:id] + end + + # + # + # POST /rules_configuration/bulk_edit?id=<profile id>&bulk_rule_ids=<list of rule ids>&bulk_action=<action> + # + # Values of the parameter 'bulk_action' : + # - 'activate' : activate all the selected rules with their default priority + # - 'deactivate' : deactivate all the selected rules + # + # + def bulk_edit + profile = Profile.find(params[:id].to_i) + rule_ids = params[:bulk_rule_ids].split(',').map{|id| id.to_i} + status=params[:rule_status] + + case params[:bulk_action] + when 'activate' + count=activate_rules(profile, rule_ids) + flash[:notice]="#{count} rules have been activated." + status=STATUS_ACTIVE if status==STATUS_INACTIVE + + when 'deactivate' + count=deactivate_rules(profile, rule_ids) + flash[:notice]="#{count} rules have been deactivated." + status=STATUS_INACTIVE if status==STATUS_ACTIVE + end + + url_parameters=request.query_parameters.merge({:action => 'index', :bulk_action => nil, :bulk_rule_ids => nil, :id => profile.id, :rule_status => status}) + redirect_to url_parameters + end + + + + def update_param + is_admin=true # security has already been checked by controller filters + profile = Profile.find(params[:profile_id].to_i) + rule_param = RulesParameter.find(params[:param_id].to_i) + active_rule = ActiveRule.find(params[:active_rule_id].to_i) + active_param = ActiveRuleParameter.find(params[:id].to_i) if params[:id].to_i > 0 + value = params[:value] + if !profile.provided? + if value != "" + active_param = ActiveRuleParameter.new(:rules_parameter => rule_param, :active_rule => active_rule ) if active_param.nil? + active_param.value = value + active_param.save + active_param.valid? + active_param.reload + elsif !active_param.nil? + active_param.destroy + active_param = nil + end + java_facade.ruleActivatedOrChanged(profile.id, active_rule.id) + end + render :partial => 'rule_param', :object => nil, + :locals => {:parameter => rule_param, :active_parameter => active_param, :profile => profile, :active_rule => active_rule, :is_admin => is_admin } + end + + private + + # return the number of newly activated rules + def activate_rules(profile, rule_ids) + count=0 + rule_ids_to_activate=(rule_ids - profile.active_rules.map{|ar| ar.rule_id}) + unless rule_ids_to_activate.empty? + rules_to_activate=Rule.find(:all, :conditions => {:enabled=>true, :id => rule_ids_to_activate}) + count = rules_to_activate.size + rules_to_activate.each do |rule| + active_rule = profile.active_rules.create(:rule => rule, :failure_level => rule.priority) + java_facade.ruleActivatedOrChanged(profile.id, active_rule.id) + end + end + count + end + + def deactivate_rules(profile, rule_ids) + count=0 + profile.active_rules.each do |ar| + if rule_ids.include?(ar.rule_id) && !ar.inheritance.present? + ar.destroy + java_facade.ruleDeactivated(profile.id, ar.rule_id) + count+=1 + end + end + count + end + + def init_params + @id = params[:id] + @priorities = filter_any(params[:priorities]) || [''] + @plugins=filter_any(params[:plugins]) || [''] + @status=params[:rule_status] || STATUS_ACTIVE + @inheritance=params[:inheritance] || '' + @searchtext=params[:searchtext] + end + + def filter_any(array) + if array && array.size>1 && array.include?('') + array=[''] #keep only 'any' + end + array + end + +end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb index bdd770fa23c..0604f018c45 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb @@ -1,35 +1,35 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar 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.
-#
-# Sonar 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 Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class RulesController < ApplicationController
-
- SECTION=Navigation::SECTION_CONFIGURATION
-
- def show
- key=params[:id]
- if key.to_i==0
- parts=key.split(':')
- @rule=Rule.find(:first, :conditions => ['plugin_name=? and plugin_rule_key=?', parts[0], parts[1]])
- else
- @rule=Rule.find(key)
- end
- @page_title=@rule.name
- end
-
-end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar 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. +# +# Sonar 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 Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +class RulesController < ApplicationController + + SECTION=Navigation::SECTION_CONFIGURATION + + def show + key=params[:id] + if key.to_i==0 + parts=key.split(':') + @rule=Rule.find(:first, :conditions => ['plugin_name=? and plugin_rule_key=?', parts[0], parts[1]]) + else + @rule=Rule.find(key) + end + @page_title=@rule.name + end + +end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/sessions_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/sessions_controller.rb index 2c74f55edee..5f9b1dc9a97 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/sessions_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/sessions_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb index 42d98aaf49f..e7f95603788 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/setup_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/setup_controller.rb index b452dd7ab57..e3564346ad2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/setup_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/setup_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/system_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/system_controller.rb index 11a13c66b36..dcbc9724087 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/system_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/system_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/timemachine_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/timemachine_controller.rb index 627fc5a88df..febcdd9127d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/timemachine_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/timemachine_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb index 674263c87b7..6a185e26f5e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb index 560075c0a30..19ccb8ae985 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/alerts_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/alerts_helper.rb index e86b999221a..3d2cb09006b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/alerts_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/alerts_helper.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb index dd1f5bd385c..3a06e83d213 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/chart_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/chart_helper.rb index ee665411f86..fd449acf973 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/chart_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/chart_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/components_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/components_helper.rb index 5c8aca6f1ba..237e8d26e1b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/components_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/components_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/dashboard_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/dashboard_helper.rb index 90b920a0174..e1a34328ffb 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/dashboard_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/dashboard_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb index 6fb2a240cb7..19537519d4d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/filters_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/filters_helper.rb index 27f66bda913..81f59c5ffb3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/filters_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/filters_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/metrics_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/metrics_helper.rb index 1f63cb06423..1f5fdab3e33 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/metrics_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/metrics_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/plugins_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/plugins_helper.rb index 079ee80723a..b449c39d570 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/plugins_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/plugins_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/profiles_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/profiles_helper.rb index ad7044b24a8..d9e3d3a5db5 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/profiles_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/profiles_helper.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/project_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/project_helper.rb index 3cce0220a0b..a1cc3ff7f7e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/project_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/project_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/roles_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/roles_helper.rb index 8706b3504bc..c8b9cb1b473 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/roles_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/roles_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/sessions_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/sessions_helper.rb index 75f6d4934ca..e25a5d10066 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/sessions_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/sessions_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/system_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/system_helper.rb index 086ca699915..fff4c5c252f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/system_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/system_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/timemachine_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/timemachine_helper.rb index 7b993d7913c..92beb814a56 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/timemachine_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/timemachine_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/updatecenter_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/updatecenter_helper.rb index 856025ab7a7..9a765c28579 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/updatecenter_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/updatecenter_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/users_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/users_helper.rb index 5c2753e4332..c9c91ccf68d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/users_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/users_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb index bded9a5f141..a44fe8abf29 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb @@ -1,42 +1,42 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar 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.
-#
-# Sonar 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 Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-module WidgetPropertiesHelper
-
-
- def property_value_field(definition, value)
- val=value || definition.defaultValue()
- if definition.type.name()==WidgetProperty::TYPE_INTEGER
- text_field_tag definition.key(), val, :size => 10
-
- elsif definition.type.name()==WidgetProperty::TYPE_FLOAT
- text_field_tag definition.key(), val, :size => 10
-
- elsif definition.type.name()==WidgetProperty::TYPE_BOOLEAN
- check_box_tag definition.key(), "true", val=='true'
-
- elsif definition.type.name()==WidgetProperty::TYPE_STRING
- text_field_tag definition.key(), val, :size => 10
-
- else
- hidden_field_tag definition.key()
- end
- end
-
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar 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. +# +# Sonar 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 Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +module WidgetPropertiesHelper + + + def property_value_field(definition, value) + val=value || definition.defaultValue() + if definition.type.name()==WidgetProperty::TYPE_INTEGER + text_field_tag definition.key(), val, :size => 10 + + elsif definition.type.name()==WidgetProperty::TYPE_FLOAT + text_field_tag definition.key(), val, :size => 10 + + elsif definition.type.name()==WidgetProperty::TYPE_BOOLEAN + check_box_tag definition.key(), "true", val=='true' + + elsif definition.type.name()==WidgetProperty::TYPE_STRING + text_field_tag definition.key(), val, :size => 10 + + else + hidden_field_tag definition.key() + end + end + end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/active_dashboard.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/active_dashboard.rb index 3ca3383aa8d..558d6cc36ce 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/active_dashboard.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/active_dashboard.rb @@ -1,59 +1,59 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar 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.
-#
-# Sonar 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 Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class ActiveDashboard < ActiveRecord::Base
-
- belongs_to :user
- belongs_to :dashboard
-
- def name
- dashboard.name
- end
-
- def order_index
- read_attribute(:order_index) || 1
- end
-
- def shared?
- dashboard.shared
- end
-
- def owner?(user)
- dashboard.owner?(user)
- end
-
- def follower?(user)
- self.user.nil? || self.user_id==user.id
- end
-
- def self.user_dashboards(user)
- result=nil
- if user && user.id
- result=find(:all, :include => 'dashboard', :conditions => ['user_id=?', user.id], :order => 'order_index')
- end
- if result.nil? || result.empty?
- result=default_dashboards
- end
- result
- end
-
- def self.default_dashboards
- find(:all, :include => 'dashboard', :conditions => ['user_id IS NULL'], :order => 'order_index')
- end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar 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. +# +# Sonar 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 Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +class ActiveDashboard < ActiveRecord::Base + + belongs_to :user + belongs_to :dashboard + + def name + dashboard.name + end + + def order_index + read_attribute(:order_index) || 1 + end + + def shared? + dashboard.shared + end + + def owner?(user) + dashboard.owner?(user) + end + + def follower?(user) + self.user.nil? || self.user_id==user.id + end + + def self.user_dashboards(user) + result=nil + if user && user.id + result=find(:all, :include => 'dashboard', :conditions => ['user_id=?', user.id], :order => 'order_index') + end + if result.nil? || result.empty? + result=default_dashboards + end + result + end + + def self.default_dashboards + find(:all, :include => 'dashboard', :conditions => ['user_id IS NULL'], :order => 'order_index') + end end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/active_filter.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/active_filter.rb index f35a4d65ce6..6b0d07bed9a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/active_filter.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/active_filter.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule.rb index f06282f2569..d02a4462c53 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule.rb @@ -1,110 +1,110 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar 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.
-#
-# Sonar 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 Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class ActiveRule < ActiveRecord::Base
- belongs_to :rules_profile, :class_name => 'Profile', :foreign_key => 'profile_id'
- belongs_to :rule
- has_many :active_rule_parameters, :dependent => :destroy
-
- def level
- failure_level
- end
-
- def priority
- failure_level
- end
-
- def priority_text
- Sonar::RulePriority.to_s failure_level
- end
-
- def error?
- Sonar::RulePriority::major?(failure_level)
- end
-
- def warning?
- Sonar::RulePriority::minor?(failure_level)
- end
-
- def info?
- Sonar::RulePriority::info?(failure_level)
- end
-
- def minor?
- Sonar::RulePriority::minor?(failure_level)
- end
-
- def major?
- Sonar::RulePriority::major?(failure_level)
- end
-
- def critical?
- Sonar::RulePriority::critical?(failure_level)
- end
-
- def blocker?
- Sonar::RulePriority::blocker?(failure_level)
- end
-
- def activated?
- error? || warning?
- end
-
- def value(param_id)
- active_rule_parameters.each do |param|
- return param.value if param.rules_parameter_id == param_id
- end
- nil
- end
-
- def parameters
- active_rule_parameters
- end
-
- def parameter(name)
- result=nil
- parameters.each do |param|
- result=param if (param.name==name)
- end
- result
- end
-
- def active_param_by_param_id(param_id)
- parameters.each do |param|
- return param if param.rules_parameter_id==param_id
- end
- nil
- end
-
- def copy
- new_active_rule = ActiveRule.new(:rule => rule, :failure_level => failure_level)
- self.active_rule_parameters.each do |active_rule_parameter|
- new_active_rule.active_rule_parameters << active_rule_parameter.copy
- end
- new_active_rule
- end
-
- def inherited?
- inheritance=='INHERITED'
- end
-
- def overrides?
- inheritance=='OVERRIDES'
- end
-end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar 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. +# +# Sonar 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 Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +class ActiveRule < ActiveRecord::Base + belongs_to :rules_profile, :class_name => 'Profile', :foreign_key => 'profile_id' + belongs_to :rule + has_many :active_rule_parameters, :dependent => :destroy + + def level + failure_level + end + + def priority + failure_level + end + + def priority_text + Sonar::RulePriority.to_s failure_level + end + + def error? + Sonar::RulePriority::major?(failure_level) + end + + def warning? + Sonar::RulePriority::minor?(failure_level) + end + + def info? + Sonar::RulePriority::info?(failure_level) + end + + def minor? + Sonar::RulePriority::minor?(failure_level) + end + + def major? + Sonar::RulePriority::major?(failure_level) + end + + def critical? + Sonar::RulePriority::critical?(failure_level) + end + + def blocker? + Sonar::RulePriority::blocker?(failure_level) + end + + def activated? + error? || warning? + end + + def value(param_id) + active_rule_parameters.each do |param| + return param.value if param.rules_parameter_id == param_id + end + nil + end + + def parameters + active_rule_parameters + end + + def parameter(name) + result=nil + parameters.each do |param| + result=param if (param.name==name) + end + result + end + + def active_param_by_param_id(param_id) + parameters.each do |param| + return param if param.rules_parameter_id==param_id + end + nil + end + + def copy + new_active_rule = ActiveRule.new(:rule => rule, :failure_level => failure_level) + self.active_rule_parameters.each do |active_rule_parameter| + new_active_rule.active_rule_parameters << active_rule_parameter.copy + end + new_active_rule + end + + def inherited? + inheritance=='INHERITED' + end + + def overrides? + inheritance=='OVERRIDES' + end +end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule_parameter.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule_parameter.rb index 6b47d8fd407..e517a949ce1 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule_parameter.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule_parameter.rb @@ -1,40 +1,40 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar 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.
-#
-# Sonar 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 {library}; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
- class ActiveRuleParameter < ActiveRecord::Base
- belongs_to :active_rule
- belongs_to :rules_parameter
-
- def name
- rules_parameter.name
- end
-
- def parameter
- rules_parameter
- end
-
- def validate_on_update
- rules_parameter.validate_value(value, errors, "value" )
- end
-
- def copy
- ActiveRuleParameter.new(:rules_parameter => rules_parameter, :value => value)
- end
-
- end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar 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. +# +# Sonar 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 {library}; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# + class ActiveRuleParameter < ActiveRecord::Base + belongs_to :active_rule + belongs_to :rules_parameter + + def name + rules_parameter.name + end + + def parameter + rules_parameter + end + + def validate_on_update + rules_parameter.validate_value(value, errors, "value" ) + end + + def copy + ActiveRuleParameter.new(:rules_parameter => rules_parameter, :value => value) + end + + end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/alert.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/alert.rb index 8f5109e02c1..d4087cdeeb2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/alert.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/alert.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/api/dashboard_configuration.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/api/dashboard_configuration.rb index 623c92856d9..5b2d189a173 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/api/dashboard_configuration.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/api/dashboard_configuration.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/async_measure_snapshot.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/async_measure_snapshot.rb index a86b1829213..2f37204dded 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/async_measure_snapshot.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/async_measure_snapshot.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/caches.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/caches.rb index 998aba65bea..f0a9c19a4d9 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/caches.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/caches.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic.rb index 0bae3cd67a3..d4333884a8a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic_property.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic_property.rb index 4d83219f212..0dc46459e72 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic_property.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic_property.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/chart_measure.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/chart_measure.rb index 90b83ec7707..1177f3c83fa 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/chart_measure.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/chart_measure.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/criterion.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/criterion.rb index 68eb11767f6..6d9bc22bedb 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/criterion.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/criterion.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb index 2a05055f890..71543d6d9ba 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb @@ -1,80 +1,80 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar 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.
-#
-# Sonar 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 Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class Dashboard < ActiveRecord::Base
-
- DEFAULT_LAYOUT='50%-50%'
-
- belongs_to :user
-
- has_many :widgets, :include => 'properties', :dependent => :delete_all
- has_many :active_dashboards, :dependent => :delete_all
-
- validates_length_of :name, :within => 1..256
- validates_length_of :description, :maximum => 1000, :allow_blank => true, :allow_nil => true
- validates_length_of :column_layout, :maximum => 20, :allow_blank => false, :allow_nil => false
- validates_uniqueness_of :name, :scope => :user_id
-
- def shared?
- read_attribute(:shared) || false
- end
-
- def layout
- column_layout
- end
-
- def user_name
- user_id ? user.name : nil
- end
-
- def editable_by?(user)
- (user && self.user_id==user.id) || (user_id.nil? && user.has_role?(:admin))
- end
-
- def owner?(user)
- self.user_id==user.id
- end
-
- def number_of_columns
- column_layout.split('-').size
- end
-
- def column_size(column_index)
- last_widget=widgets.select{|w| w.column_index==column_index}.max{|x,y| x.row_index <=> y.row_index}
- last_widget ? last_widget.row_index : 0
- end
-
- def deep_copy()
- dashboard=Dashboard.new(attributes)
- dashboard.shared=false
- self.widgets.each do |child|
- new_widget = Widget.create(child.attributes)
-
- child.properties.each do |prop|
- widget_prop = WidgetProperty.create(prop.attributes)
- new_widget.properties << widget_prop
- end
-
- new_widget.save
- dashboard.widgets << new_widget
- end
- dashboard.save
- dashboard
- end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar 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. +# +# Sonar 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 Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +class Dashboard < ActiveRecord::Base + + DEFAULT_LAYOUT='50%-50%' + + belongs_to :user + + has_many :widgets, :include => 'properties', :dependent => :delete_all + has_many :active_dashboards, :dependent => :delete_all + + validates_length_of :name, :within => 1..256 + validates_length_of :description, :maximum => 1000, :allow_blank => true, :allow_nil => true + validates_length_of :column_layout, :maximum => 20, :allow_blank => false, :allow_nil => false + validates_uniqueness_of :name, :scope => :user_id + + def shared? + read_attribute(:shared) || false + end + + def layout + column_layout + end + + def user_name + user_id ? user.name : nil + end + + def editable_by?(user) + (user && self.user_id==user.id) || (user_id.nil? && user.has_role?(:admin)) + end + + def owner?(user) + self.user_id==user.id + end + + def number_of_columns + column_layout.split('-').size + end + + def column_size(column_index) + last_widget=widgets.select{|w| w.column_index==column_index}.max{|x,y| x.row_index <=> y.row_index} + last_widget ? last_widget.row_index : 0 + end + + def deep_copy() + dashboard=Dashboard.new(attributes) + dashboard.shared=false + self.widgets.each do |child| + new_widget = Widget.create(child.attributes) + + child.properties.each do |prop| + widget_prop = WidgetProperty.create(prop.attributes) + new_widget.properties << widget_prop + end + + new_widget.save + dashboard.widgets << new_widget + end + dashboard.save + dashboard + end end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/dependency.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/dependency.rb index e1d5afe7df0..2f66151ddbe 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/dependency.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/dependency.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/drilldown.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/drilldown.rb index 7f916b07d1a..ecfa0a7f6b0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/drilldown.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/drilldown.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/event.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/event.rb index 41ea35d8cfd..ace9123e64f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/event.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/event.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/event_category.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/event_category.rb index 45752172e1c..85d76c17fc3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/event_category.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/event_category.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/filter.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/filter.rb index 7a80de2ae6b..34c50e1034f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/filter.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/filter.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/filter_column.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/filter_column.rb index 84606802e53..d2208f6e47f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/filter_column.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/filter_column.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/filter_context.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/filter_context.rb index 3145b1c26f3..82dad3b41fa 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/filter_context.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/filter_context.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/group.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/group.rb index 4bf41b20aac..ba622929613 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/group.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/group.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/group_role.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/group_role.rb index e2a4b188056..b9eebf383bb 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/group_role.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/group_role.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/measure_color.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/measure_color.rb index d7971393cf6..390dc6bb581 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/measure_color.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/measure_color.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/measure_data.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/measure_data.rb index 9394320a35a..f72248c35b4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/measure_data.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/measure_data.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb index cc680cf7106..dd22621af4f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/navigation.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/navigation.rb index 43c93fa45ed..5832321bac0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/navigation.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/navigation.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/plugin.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/plugin.rb index 1d6d69e281e..ec7bd9d7ff3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/plugin.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/plugin.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/plugin_file.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/plugin_file.rb index 40813c32380..e4104850b13 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/plugin_file.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/plugin_file.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb index 52e986162b4..51c142c12e8 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/project.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/project.rb index 87b1ac4507e..d1fd310a086 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/project.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/project.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/project_link.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/project_link.rb index fd33b68e5cf..422e45cbf55 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/project_link.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/project_link.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/project_measure.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/project_measure.rb index 1e553e99659..c95f03ad08a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/project_measure.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/project_measure.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb index 35088298227..f32b9bfc294 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/quality_model.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/quality_model.rb index 92082e47daa..ffcb835346a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/quality_model.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/quality_model.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/role.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/role.rb index bce1bbf21c0..2cea36c7994 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/role.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/role.rb @@ -1,22 +1,22 @@ - #
- # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
- # mailto:contact AT sonarsource DOT com
- #
- # Sonar 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.
- #
- # Sonar 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 Sonar; if not, write to the Free Software
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- #
-class Role < ActiveRecord::Base
- ADMIN = 'sonar_admin'
+ # + # Sonar, entreprise quality control tool. + # Copyright (C) 2008-2011 SonarSource + # mailto:contact AT sonarsource DOT com + # + # Sonar 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. + # + # Sonar 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 Sonar; if not, write to the Free Software + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + # +class Role < ActiveRecord::Base + ADMIN = 'sonar_admin' end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/rule.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/rule.rb index c94e7887b39..c485d0d0736 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/rule.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/rule.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/rule_failure.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/rule_failure.rb index 64a2517af13..3b4886f2dad 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/rule_failure.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/rule_failure.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/rules_parameter.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/rules_parameter.rb index 98f341ad805..1bcc7fd012d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/rules_parameter.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/rules_parameter.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/server.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/server.rb index 9ee251c29c1..600aa7dc834 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/server.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/server.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot.rb index 408f32b9e26..065bbbe2fa9 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot_source.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot_source.rb index 2c80cd4532b..daed9bbb572 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot_source.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot_source.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/columns_view.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/columns_view.rb index bbef4793cfb..e2a8d1ce08d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/columns_view.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/columns_view.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/components_configuration.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/components_configuration.rb index 93145461a19..1828a3e49b0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/components_configuration.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/components_configuration.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/resource_finder.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/resource_finder.rb index 052c64e2c50..8f032d1be26 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/resource_finder.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/resource_finder.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/rule_priority.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/rule_priority.rb index 43f3fc2416b..a5bd62a826b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/rule_priority.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/rule_priority.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/timemachine_row.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/timemachine_row.rb index 91973a19e30..c136fa06156 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/timemachine_row.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/timemachine_row.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/treemap.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/treemap.rb index cb9d2bfaa55..e7b924b015c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/treemap.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/treemap.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/treemap_builder.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/treemap_builder.rb index d79914f4be3..0be1a8494c9 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/treemap_builder.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/treemap_builder.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/trends_chart.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/trends_chart.rb index 10dee295e63..eb820ad2f92 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/trends_chart.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/trends_chart.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb index 6e08e3b17fd..677bdd2d07c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/user_role.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/user_role.rb index 4ee3e05c5bb..9957be12323 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/user_role.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/user_role.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/widget.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/widget.rb index 7c6c82a9abf..d10262a99ed 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/widget.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/widget.rb @@ -1,76 +1,76 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar 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.
-#
-# Sonar 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 Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class Widget < ActiveRecord::Base
- has_many :properties, :dependent => :delete_all, :class_name => 'WidgetProperty'
- belongs_to :dashboards
-
- validates_presence_of :name
- validates_length_of :name, :within => 1..256
-
- validates_presence_of :widget_key
- validates_length_of :widget_key, :within => 1..256
-
- def property(key)
- properties().each do |p|
- return p if (p.key==key)
- end
- nil
- end
-
- def property_value(key, default_value=nil)
- prop=property(key)
- (prop ? prop.value : nil) || default_value
- end
-
- def set_property(key, value, value_type)
- prop=property(key)
- if prop
- prop.text_value=value
- prop.value_type=value_type
- else
- prop=self.properties.build(:kee => key, :text_value => value, :value_type => value_type)
- end
- properties_as_hash[key]=prop.typed_value
- end
-
- def unset_property(key)
- prop=property(key)
- self.properties.delete(prop) if prop
- end
-
- def delete_property(key)
- prop=property(key)
- if prop
- properties.delete(prop)
- end
- end
-
- def properties_as_hash
- @properties_hash ||=
- begin
- hash={}
- properties.each do |prop|
- hash[prop.key]=prop.typed_value
- end
- hash
- end
- @properties_hash
- end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar 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. +# +# Sonar 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 Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +class Widget < ActiveRecord::Base + has_many :properties, :dependent => :delete_all, :class_name => 'WidgetProperty' + belongs_to :dashboards + + validates_presence_of :name + validates_length_of :name, :within => 1..256 + + validates_presence_of :widget_key + validates_length_of :widget_key, :within => 1..256 + + def property(key) + properties().each do |p| + return p if (p.key==key) + end + nil + end + + def property_value(key, default_value=nil) + prop=property(key) + (prop ? prop.value : nil) || default_value + end + + def set_property(key, value, value_type) + prop=property(key) + if prop + prop.text_value=value + prop.value_type=value_type + else + prop=self.properties.build(:kee => key, :text_value => value, :value_type => value_type) + end + properties_as_hash[key]=prop.typed_value + end + + def unset_property(key) + prop=property(key) + self.properties.delete(prop) if prop + end + + def delete_property(key) + prop=property(key) + if prop + properties.delete(prop) + end + end + + def properties_as_hash + @properties_hash ||= + begin + hash={} + properties.each do |prop| + hash[prop.key]=prop.typed_value + end + hash + end + @properties_hash + end end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/widget_property.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/widget_property.rb index df755df8221..a47ba81b6e5 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/widget_property.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/widget_property.rb @@ -1,81 +1,81 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar 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.
-#
-# Sonar 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 Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class WidgetProperty < ActiveRecord::Base
- TYPE_INTEGER = 'INTEGER'
- TYPE_BOOLEAN = 'BOOLEAN'
- TYPE_FLOAT = 'FLOAT'
- TYPE_STRING = 'STRING'
-
- belongs_to :widget
-
- validates_length_of :kee, :within => 1..100
- validates_length_of :text_value, :maximum => 4000, :allow_blank => true, :allow_nil => true
-
- def key
- kee
- end
-
- def value
- text_value
- end
-
- def typed_value
- case value_type
- when TYPE_INTEGER
- value.to_i
- when TYPE_FLOAT
- Float(value)
- when TYPE_BOOLEAN
- value=='true'
- else
- value
- end
- end
-
- def to_hash_json
- {:key => key, :value => value.to_s}
- end
-
- def to_xml(xml=Builder::XmlMarkup.new(:indent => 0))
- xml.property do
- xml.key(prop_key)
- xml.value {xml.cdata!(text_value.to_s)}
- end
- xml
- end
-
- def self.validate_definition(definition, value)
- errors=[]
- if value.empty?
- errors<<"Missing value" unless definition.optional()
- else
- errors<<"Please type an integer (example: 123)" if definition.type.name()==TYPE_INTEGER && value.to_i.to_s!=value
- if definition.type.name()==TYPE_FLOAT
- begin
- Float(value)
- rescue
- errors<<"Please type a number (example: 123.45)"
- end
- end
- errors<<"Please check value" if definition.type.name()==TYPE_BOOLEAN && !(value=="true" || value=="false")
- end
- errors
- end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar 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. +# +# Sonar 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 Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +class WidgetProperty < ActiveRecord::Base + TYPE_INTEGER = 'INTEGER' + TYPE_BOOLEAN = 'BOOLEAN' + TYPE_FLOAT = 'FLOAT' + TYPE_STRING = 'STRING' + + belongs_to :widget + + validates_length_of :kee, :within => 1..100 + validates_length_of :text_value, :maximum => 4000, :allow_blank => true, :allow_nil => true + + def key + kee + end + + def value + text_value + end + + def typed_value + case value_type + when TYPE_INTEGER + value.to_i + when TYPE_FLOAT + Float(value) + when TYPE_BOOLEAN + value=='true' + else + value + end + end + + def to_hash_json + {:key => key, :value => value.to_s} + end + + def to_xml(xml=Builder::XmlMarkup.new(:indent => 0)) + xml.property do + xml.key(prop_key) + xml.value {xml.cdata!(text_value.to_s)} + end + xml + end + + def self.validate_definition(definition, value) + errors=[] + if value.empty? + errors<<"Missing value" unless definition.optional() + else + errors<<"Please type an integer (example: 123)" if definition.type.name()==TYPE_INTEGER && value.to_i.to_s!=value + if definition.type.name()==TYPE_FLOAT + begin + Float(value) + rescue + errors<<"Please type a number (example: 123.45)" + end + end + errors<<"Please check value" if definition.type.name()==TYPE_BOOLEAN && !(value=="true" || value=="false") + end + errors + end end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb index bd37c1644ff..bd930663577 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/002_index_database.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/002_index_database.rb index 5e1797d5397..2e011054f24 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/002_index_database.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/002_index_database.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/010_create_users.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/010_create_users.rb index 1fc10430ac0..635650bb47b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/010_create_users.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/010_create_users.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/013_add_metrics_names.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/013_add_metrics_names.rb index ac7b9150e82..607f8889cb0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/013_add_metrics_names.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/013_add_metrics_names.rb @@ -1,28 +1,28 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar 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.
-#
-# Sonar 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 Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class AddMetricsNames < ActiveRecord::Migration
-
- def self.up
- add_column(:metrics, :domain, :string, :null => true, :limit => 64)
- add_column(:metrics, :short_name, :string, :null => true, :limit => 64)
- add_column(:metrics, :qualitative, :boolean, :null => false, :default => false)
- end
-
-end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar 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. +# +# Sonar 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 Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +class AddMetricsNames < ActiveRecord::Migration + + def self.up + add_column(:metrics, :domain, :string, :null => true, :limit => 64) + add_column(:metrics, :short_name, :string, :null => true, :limit => 64) + add_column(:metrics, :qualitative, :boolean, :null => false, :default => false) + end + +end diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/014_create_rules_profiles.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/014_create_rules_profiles.rb index d1362f1ed85..174a90cecd8 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/014_create_rules_profiles.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/014_create_rules_profiles.rb @@ -1,41 +1,41 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar 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.
-#
-# Sonar 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 Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class CreateRulesProfiles < ActiveRecord::Migration
-
- def self.up
- create_table 'rules_profiles'do |t|
- t.column :name, :string, :limit => 40, :null => false
- t.column :active, :boolean, :default => false
- end
-
- create_table 'active_rules' do |t|
- t.column :profile_id, :integer, :null => false
- t.column :rule_id, :integer, :null => false
- t.column :failure_level, :integer, :null => false
- end
-
- create_table :active_rule_parameters do |t|
- t.column :active_rule_id, :integer, :null => false
- t.column :rules_parameter_id, :integer, :null => false
- t.column :value, :string, :limit => 4000, :null => true
- end
- end
-
-end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar 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. +# +# Sonar 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 Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +class CreateRulesProfiles < ActiveRecord::Migration + + def self.up + create_table 'rules_profiles'do |t| + t.column :name, :string, :limit => 40, :null => false + t.column :active, :boolean, :default => false + end + + create_table 'active_rules' do |t| + t.column :profile_id, :integer, :null => false + t.column :rule_id, :integer, :null => false + t.column :failure_level, :integer, :null => false + end + + create_table :active_rule_parameters do |t| + t.column :active_rule_id, :integer, :null => false + t.column :rules_parameter_id, :integer, :null => false + t.column :value, :string, :limit => 4000, :null => true + end + end + +end diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/016_add_rules_profiles_provided_column.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/016_add_rules_profiles_provided_column.rb index 0e42e4f4a57..b5697a1d7dd 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/016_add_rules_profiles_provided_column.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/016_add_rules_profiles_provided_column.rb @@ -1,27 +1,27 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar 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.
-#
-# Sonar 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 Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class AddRulesProfilesProvidedColumn < ActiveRecord::Migration
-
- def self.up
- add_column(:rules_profiles, :provided, :boolean, :default => false, :null => false)
- Profile.reset_column_information
- end
-
-end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar 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. +# +# Sonar 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 Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +class AddRulesProfilesProvidedColumn < ActiveRecord::Migration + + def self.up + add_column(:rules_profiles, :provided, :boolean, :default => false, :null => false) + Profile.reset_column_information + end + +end diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/035_projects_to_entities.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/035_projects_to_entities.rb index e69193ba949..0f249815147 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/035_projects_to_entities.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/035_projects_to_entities.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/036_add_measure_tendency.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/036_add_measure_tendency.rb index 19eda5fcf7b..84c5df8cf08 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/036_add_measure_tendency.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/036_add_measure_tendency.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/039_add_rules_profiles_language.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/039_add_rules_profiles_language.rb index b242f04d0df..76f0cf9a21d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/039_add_rules_profiles_language.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/039_add_rules_profiles_language.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/041_increase_rules_name_size.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/041_increase_rules_name_size.rb index 724b1010aec..e48f6f6e948 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/041_increase_rules_name_size.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/041_increase_rules_name_size.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/046_simplify_metrics.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/046_simplify_metrics.rb index 971e36123ec..64fd7c37eb3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/046_simplify_metrics.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/046_simplify_metrics.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/048_create_async_measure_snapshots_table.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/048_create_async_measure_snapshots_table.rb index 3bba83b2167..269022642c2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/048_create_async_measure_snapshots_table.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/048_create_async_measure_snapshots_table.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/049_remove_external_measures_table.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/049_remove_external_measures_table.rb index 409d230b5ed..88121955ce2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/049_remove_external_measures_table.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/049_remove_external_measures_table.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/051_add_metrics_origin_column.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/051_add_metrics_origin_column.rb index 99aaf2bb783..36f1d2c2954 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/051_add_metrics_origin_column.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/051_add_metrics_origin_column.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/052_remove_columns_views_table.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/052_remove_columns_views_table.rb index cdd2261df1d..97459dff70b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/052_remove_columns_views_table.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/052_remove_columns_views_table.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/053_create_events_table.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/053_create_events_table.rb index 2fc1ac4889c..3d7112f69e6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/053_create_events_table.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/053_create_events_table.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/054_create_alerts_table.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/054_create_alerts_table.rb index 46d2e9bb470..a03d052cc77 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/054_create_alerts_table.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/054_create_alerts_table.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/055_create_profiles_per_project.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/055_create_profiles_per_project.rb index 15b179316a0..ce8a605bd48 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/055_create_profiles_per_project.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/055_create_profiles_per_project.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/057_ensure_measure_snapshot_column_null.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/057_ensure_measure_snapshot_column_null.rb index 2ea365a61cc..b63aef33688 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/057_ensure_measure_snapshot_column_null.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/057_ensure_measure_snapshot_column_null.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/058_add_snapshots_path.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/058_add_snapshots_path.rb index ac59f71ab65..4307aa28eb3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/058_add_snapshots_path.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/058_add_snapshots_path.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/059_add_properties_resource.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/059_add_properties_resource.rb index 8d371c5aaf3..c724469946c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/059_add_properties_resource.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/059_add_properties_resource.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/060_add_project_language.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/060_add_project_language.rb index 61a92a31803..2b110b22761 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/060_add_project_language.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/060_add_project_language.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/061_add_measure_data.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/061_add_measure_data.rb index ab78e77cf2f..a2b6a43c807 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/061_add_measure_data.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/061_add_measure_data.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/062_add_project_kee_index.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/062_add_project_kee_index.rb index eb864438ea1..688a46d39b2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/062_add_project_kee_index.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/062_add_project_kee_index.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/066_increase_size_of_rules_profiles_name.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/066_increase_size_of_rules_profiles_name.rb index c8230241ac6..14205a37b86 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/066_increase_size_of_rules_profiles_name.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/066_increase_size_of_rules_profiles_name.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/068_add_rule_priority.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/068_add_rule_priority.rb index b89c3437bdd..e53aadd92a0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/068_add_rule_priority.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/068_add_rule_priority.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/069_add_diff_columns_to_measures.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/069_add_diff_columns_to_measures.rb index 5be2c8cbeef..cfacedc0dc2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/069_add_diff_columns_to_measures.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/069_add_diff_columns_to_measures.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/072_delete_snapshots_purged.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/072_delete_snapshots_purged.rb index 1f251153a79..91111464251 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/072_delete_snapshots_purged.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/072_delete_snapshots_purged.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/073_add_line_to_rule_failures.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/073_add_line_to_rule_failures.rb index d2d0a1a041d..70b189784ca 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/073_add_line_to_rule_failures.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/073_add_line_to_rule_failures.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/075_reset_tendency_depth.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/075_reset_tendency_depth.rb index f03c351f130..ba00735f89e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/075_reset_tendency_depth.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/075_reset_tendency_depth.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/076_upgrade_properties_to_blobs.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/076_upgrade_properties_to_blobs.rb index e6f88cff2b6..cc361ccfcd4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/076_upgrade_properties_to_blobs.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/076_upgrade_properties_to_blobs.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/077_add_copy_resource_id_to_projects.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/077_add_copy_resource_id_to_projects.rb index eebc5b7ab13..303920a64ae 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/077_add_copy_resource_id_to_projects.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/077_add_copy_resource_id_to_projects.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/078_increase_project_kee_size.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/078_increase_project_kee_size.rb index 7fa685c6c7b..074dd969836 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/078_increase_project_kee_size.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/078_increase_project_kee_size.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/079_create_groups.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/079_create_groups.rb index 2e092e73b0f..fa2742b5fda 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/079_create_groups.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/079_create_groups.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/080_create_groups_users.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/080_create_groups_users.rb index d9e634a8947..13eaa3c0d44 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/080_create_groups_users.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/080_create_groups_users.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/081_add_projects_long_name.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/081_add_projects_long_name.rb index cc0e3b23e64..bb8758ceeab 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/081_add_projects_long_name.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/081_add_projects_long_name.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/082_include_branch_in_project_name.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/082_include_branch_in_project_name.rb index 22b84581557..6b36ffd5ecc 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/082_include_branch_in_project_name.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/082_include_branch_in_project_name.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/084_delete_some_findbugs_rules.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/084_delete_some_findbugs_rules.rb index 42bc02b50ce..a4a97eba046 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/084_delete_some_findbugs_rules.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/084_delete_some_findbugs_rules.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/085_add_metric_value_limits.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/085_add_metric_value_limits.rb index 246962a67ad..62760eb619e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/085_add_metric_value_limits.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/085_add_metric_value_limits.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/086_create_group_roles.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/086_create_group_roles.rb index 72608eee184..5862bb4844b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/086_create_group_roles.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/086_create_group_roles.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/087_create_user_roles.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/087_create_user_roles.rb index b8d14e0715b..074c5d8f46d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/087_create_user_roles.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/087_create_user_roles.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/088_create_default_users_and_groups.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/088_create_default_users_and_groups.rb index af391d5561b..470fa914283 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/088_create_default_users_and_groups.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/088_create_default_users_and_groups.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/089_set_default_project_roles.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/089_set_default_project_roles.rb index a0d63550906..cd4751a3a55 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/089_set_default_project_roles.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/089_set_default_project_roles.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/090_add_name_to_users.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/090_add_name_to_users.rb index d24cd7a5d79..e8076d80ab3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/090_add_name_to_users.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/090_add_name_to_users.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/091_add_root_project_id_to_snapshots.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/091_add_root_project_id_to_snapshots.rb index f5df428f822..a667100b95e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/091_add_root_project_id_to_snapshots.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/091_add_root_project_id_to_snapshots.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/092_fill_snapshots_root_project_id.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/092_fill_snapshots_root_project_id.rb index cc585b6561f..351cf6f0789 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/092_fill_snapshots_root_project_id.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/092_fill_snapshots_root_project_id.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/093_create_dependencies_table.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/093_create_dependencies_table.rb index 0af16cdd90f..7b90fb7f035 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/093_create_dependencies_table.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/093_create_dependencies_table.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/094_add_metrics_hidden_column.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/094_add_metrics_hidden_column.rb index db51416035d..c5526de568e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/094_add_metrics_hidden_column.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/094_add_metrics_hidden_column.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/095_increase_measure_id_size.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/095_increase_measure_id_size.rb index 4533b48bf78..14991a2a6a6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/095_increase_measure_id_size.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/095_increase_measure_id_size.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/096_mssql_change_text_columns_to_varchar.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/096_mssql_change_text_columns_to_varchar.rb index ec8d1620ab0..7475a2172a0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/096_mssql_change_text_columns_to_varchar.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/096_mssql_change_text_columns_to_varchar.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/097_increase_dep_usage_size.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/097_increase_dep_usage_size.rb index edd98d285cf..7322b8c8376 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/097_increase_dep_usage_size.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/097_increase_dep_usage_size.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/098_increase_snapshots_version.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/098_increase_snapshots_version.rb index f3eaac8dde0..ede5e05dc5d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/098_increase_snapshots_version.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/098_increase_snapshots_version.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/099_delete_deprecated_libraries.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/099_delete_deprecated_libraries.rb index d807f926fa4..e9ba4bffa59 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/099_delete_deprecated_libraries.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/099_delete_deprecated_libraries.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/100_delete_checkstyle_regexp_rules.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/100_delete_checkstyle_regexp_rules.rb index 96ecabde10a..7af3cdb223f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/100_delete_checkstyle_regexp_rules.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/100_delete_checkstyle_regexp_rules.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/101_remove_null_snapshot_created_at.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/101_remove_null_snapshot_created_at.rb index adc14ea6084..71628aa99bb 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/101_remove_null_snapshot_created_at.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/101_remove_null_snapshot_created_at.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/110_add_events_data.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/110_add_events_data.rb index 376bfcbb23c..2cc1788ae69 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/110_add_events_data.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/110_add_events_data.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/111_create_extensions.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/111_create_extensions.rb index 6047e6b08ee..f76a7e9a68b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/111_create_extensions.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/111_create_extensions.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/112_delete_checkstyle_jee_rules.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/112_delete_checkstyle_jee_rules.rb index 030380445d3..9c149cd644d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/112_delete_checkstyle_jee_rules.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/112_delete_checkstyle_jee_rules.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/113_rename_clover_properties.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/113_rename_clover_properties.rb index 570367391f2..43845cce0ae 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/113_rename_clover_properties.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/113_rename_clover_properties.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/114_add_user_properties.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/114_add_user_properties.rb index 8c98a680c96..933e816310b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/114_add_user_properties.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/114_add_user_properties.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/115_create_filters.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/115_create_filters.rb index 35eae9bcdea..cbd81d46e8a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/115_create_filters.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/115_create_filters.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/116_set_resource_long_names.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/116_set_resource_long_names.rb index 43c310e949f..28b7fbde9c2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/116_set_resource_long_names.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/116_set_resource_long_names.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/117_remove_measure_sid_index.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/117_remove_measure_sid_index.rb index 3fc09b20966..f9f512dec11 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/117_remove_measure_sid_index.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/117_remove_measure_sid_index.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/118_add_snapshots_qualifier_index.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/118_add_snapshots_qualifier_index.rb index cdd3f690de2..09a80851cc4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/118_add_snapshots_qualifier_index.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/118_add_snapshots_qualifier_index.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/119_add_measures_sid_metric_index.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/119_add_measures_sid_metric_index.rb index 9649ac93c49..8cb2486f272 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/119_add_measures_sid_metric_index.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/119_add_measures_sid_metric_index.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/120_add_extensions_core_column.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/120_add_extensions_core_column.rb index c9df90d98c5..905f7b1d118 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/120_add_extensions_core_column.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/120_add_extensions_core_column.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/131_create_quality_models.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/131_create_quality_models.rb index 2bc3678d79e..a4043d95055 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/131_create_quality_models.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/131_create_quality_models.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/132_add_characteristic_id_to_measures.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/132_add_characteristic_id_to_measures.rb index 1aacfa706a3..4d53d8898e6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/132_add_characteristic_id_to_measures.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/132_add_characteristic_id_to_measures.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/133_create_plugins.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/133_create_plugins.rb index 0474d771ee7..efb604cfc2e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/133_create_plugins.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/133_create_plugins.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/134_delete_checkstyle_translations.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/134_delete_checkstyle_translations.rb index f15f6ec3518..4d7eebaeb9c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/134_delete_checkstyle_translations.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/134_delete_checkstyle_translations.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/135_add_rules_enabled_column.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/135_add_rules_enabled_column.rb index 41a68b9173a..b3ff67c0f22 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/135_add_rules_enabled_column.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/135_add_rules_enabled_column.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/136_increase_violations_size.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/136_increase_violations_size.rb index 6f4868b8885..22f7ddd9223 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/136_increase_violations_size.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/136_increase_violations_size.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/137_add_rules_cardinality.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/137_add_rules_cardinality.rb index 106ff2374a0..9ede6b89667 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/137_add_rules_cardinality.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/137_add_rules_cardinality.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/138_add_characteristic_description.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/138_add_characteristic_description.rb index c4a9d1d8aea..c69e2a87aa7 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/138_add_characteristic_description.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/138_add_characteristic_description.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/139_add_characteristic_enabled.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/139_add_characteristic_enabled.rb index c146ef9f9d4..feae3e27912 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/139_add_characteristic_enabled.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/139_add_characteristic_enabled.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/140_create_characteristic_properties.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/140_create_characteristic_properties.rb index 3faa46fc0d3..ec028fa1ec5 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/140_create_characteristic_properties.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/140_create_characteristic_properties.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/141_add_rule_failures_cost.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/141_add_rule_failures_cost.rb index bcdfb838226..941f1a0892f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/141_add_rule_failures_cost.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/141_add_rule_failures_cost.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/142_delete_active_rules_orphans.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/142_delete_active_rules_orphans.rb index 9ba2eb52e3c..e39844f228d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/142_delete_active_rules_orphans.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/142_delete_active_rules_orphans.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/150_add_plugins_child_first_classloader_column.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/150_add_plugins_child_first_classloader_column.rb index e16f0c6a6a9..7fa69e9f69f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/150_add_plugins_child_first_classloader_column.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/150_add_plugins_child_first_classloader_column.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/151_create_dashboards.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/151_create_dashboards.rb index 4ee855ea473..a30b36ad7f2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/151_create_dashboards.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/151_create_dashboards.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/160_add_rule_failures_columns.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/160_add_rule_failures_columns.rb index c821fa8fed3..76682cd07e5 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/160_add_rule_failures_columns.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/160_add_rule_failures_columns.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/162_delete_iso_rule_categories.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/162_delete_iso_rule_categories.rb index 2869047cbe0..16577e7cb9a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/162_delete_iso_rule_categories.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/162_delete_iso_rule_categories.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/163_add_variation_columns.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/163_add_variation_columns.rb index 62048e4bfba..4fc96eb2d5e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/163_add_variation_columns.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/163_add_variation_columns.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/165_set_nullable_rule_config_key.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/165_set_nullable_rule_config_key.rb index b6667c5fe9b..24bc760676b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/165_set_nullable_rule_config_key.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/165_set_nullable_rule_config_key.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/166_set_nullable_rule_parameter_description.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/166_set_nullable_rule_parameter_description.rb index 874c8101969..834dda798d7 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/166_set_nullable_rule_parameter_description.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/166_set_nullable_rule_parameter_description.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/167_add_index_to_measure_data_snapshot.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/167_add_index_to_measure_data_snapshot.rb index 3eb65808165..f0a4e78f334 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/167_add_index_to_measure_data_snapshot.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/167_add_index_to_measure_data_snapshot.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/168_add_periods_to_filters.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/168_add_periods_to_filters.rb index 23be6b35b04..b5273b750a9 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/168_add_periods_to_filters.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/168_add_periods_to_filters.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/169_add_columns_for_profiles_inheritance.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/169_add_columns_for_profiles_inheritance.rb index 9b6e23b62a4..28206277d4b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/169_add_columns_for_profiles_inheritance.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/169_add_columns_for_profiles_inheritance.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/170_delete_unvalid_project_snapshots.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/170_delete_unvalid_project_snapshots.rb index e14e0dfa506..0666c2a3ca6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/170_delete_unvalid_project_snapshots.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/170_delete_unvalid_project_snapshots.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/180_add_profiles_disabled.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/180_add_profiles_disabled.rb index da3087a1f6b..ec4fad631cb 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/180_add_profiles_disabled.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/180_add_profiles_disabled.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/authorization/all_pass_authorizer.rb b/sonar-server/src/main/webapp/WEB-INF/lib/authorization/all_pass_authorizer.rb index d9f4236d912..04d3fbff8f6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/authorization/all_pass_authorizer.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/authorization/all_pass_authorizer.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/authorization/default_authorizer.rb b/sonar-server/src/main/webapp/WEB-INF/lib/authorization/default_authorizer.rb index 3a6e097835b..c5cb4a9e4f7 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/authorization/default_authorizer.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/authorization/default_authorizer.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/authorization/logged_in_authorizer.rb b/sonar-server/src/main/webapp/WEB-INF/lib/authorization/logged_in_authorizer.rb index 893342fdb71..21d3b3d9289 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/authorization/logged_in_authorizer.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/authorization/logged_in_authorizer.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/database_version.rb b/sonar-server/src/main/webapp/WEB-INF/lib/database_version.rb index 1b97915efb3..af5cbb497c7 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/database_version.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/database_version.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/need_authentication.rb b/sonar-server/src/main/webapp/WEB-INF/lib/need_authentication.rb index 1811eff2572..eb07a596720 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/need_authentication.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/need_authentication.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/need_authorization.rb b/sonar-server/src/main/webapp/WEB-INF/lib/need_authorization.rb index a1201f86486..bde096664fa 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/need_authorization.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/need_authorization.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/resourceable.rb b/sonar-server/src/main/webapp/WEB-INF/lib/resourceable.rb index 084915e0648..a880840fde5 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/resourceable.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/resourceable.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/slf4j_logger.rb b/sonar-server/src/main/webapp/WEB-INF/lib/slf4j_logger.rb index 3302cffd6ec..6f50bd9821e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/slf4j_logger.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/slf4j_logger.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/sonar_webservice_plugins.rb b/sonar-server/src/main/webapp/WEB-INF/lib/sonar_webservice_plugins.rb index 86fad2d3383..37509374437 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/sonar_webservice_plugins.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/sonar_webservice_plugins.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/charts/ChartFactoryTest.java b/sonar-server/src/test/java/org/sonar/server/charts/ChartFactoryTest.java index ba519fe1383..fc62845b9af 100644 --- a/sonar-server/src/test/java/org/sonar/server/charts/ChartFactoryTest.java +++ b/sonar-server/src/test/java/org/sonar/server/charts/ChartFactoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/charts/FakeChart.java b/sonar-server/src/test/java/org/sonar/server/charts/FakeChart.java index cce39dd7091..203590faf55 100644 --- a/sonar-server/src/test/java/org/sonar/server/charts/FakeChart.java +++ b/sonar-server/src/test/java/org/sonar/server/charts/FakeChart.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/charts/deprecated/BarChartTest.java b/sonar-server/src/test/java/org/sonar/server/charts/deprecated/BarChartTest.java index 59f3c40c79b..b5513ccc29e 100644 --- a/sonar-server/src/test/java/org/sonar/server/charts/deprecated/BarChartTest.java +++ b/sonar-server/src/test/java/org/sonar/server/charts/deprecated/BarChartTest.java @@ -1,159 +1,159 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.server.charts.deprecated;
-
-import org.junit.Ignore;
-import org.junit.Test;
-
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-public class BarChartTest extends BaseChartWebTest {
-
- @Test
- public void testBarChartDefaultDimensions() throws IOException {
- Map<String, String> params = getDefaultParams();
- BarChart chart = new BarChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "bar-chart-default.png");
- assertChartSizeGreaterThan(img, 100);
- }
-
- @Test
- public void testBarChartRange() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_RANGEMAX, "200");
- BarChart chart = new BarChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "bar-chart-range.png");
- assertChartSizeGreaterThan(img, 100);
- }
-
- @Test
- public void testBarChartSpecificDimensions() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "750x250");
- BarChart chart = new BarChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "bar-chart-specific-dimensions.png");
- assertChartSizeGreaterThan(img, 100);
- }
-
- @Test
- public void testBarChartOneValue() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_VALUES, "100");
- BarChart chart = new BarChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "bar-chart-one-value.png");
- assertChartSizeGreaterThan(img, 100);
- }
-
- @Test
- public void testBarChartOthersColors() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_COLORS, "FFFF00,9900FF");
- BarChart chart = new BarChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "bar-chart-others-colors.png");
- assertChartSizeGreaterThan(img, 100);
- }
-
- @Test
- public void testBarChartNullValues() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_VALUES, null);
- BarChart chart = new BarChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "bar-chart-null-values.png");
- assertChartSizeGreaterThan(img, 100);
- }
-
- @Test
- public void testBarChartWrongValues() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_VALUES, "wrong,value");
- BarChart chart = new BarChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "bar-chart-wrong-values.png");
- assertChartSizeGreaterThan(img, 100);
- }
-
- @Test
- public void testBarChartTitle() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet");
- params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "750x250");
- BarChart chart = new BarChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "bar-chart-title.png");
- assertChartSizeGreaterThan(img, 100);
- }
-
- @Test
- @Ignore
- public void testBarChartTitle2() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet");
- params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "750x250");
- params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_VERTICAL);
- params.put(BaseChartWeb.CHART_PARAM_CATEGORIES, "0+,5+,10+,20+,30+,60+,90+");
- params.put(BaseChartWeb.CHART_PARAM_SERIES, "1,2,3");
- params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE, "y");
- params.put(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE, "y");
- params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,50,75,92,30,58");
- BarChart chart = new BarChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "bar-chart-vertical-multi-series.png");
- assertChartSizeGreaterThan(img, 100);
- }
-
- @Test
- public void testStackedBarCharteightyTwenty() throws IOException {
- Map<String, String> params = new HashMap<String, String>();
- params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.STACKED_BAR_CHART);
- params.put(BaseChartWeb.CHART_PARAM_VALUES, "80,20");
- BarChart chart = new BarChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "stacked-bar-chart-80-20.png");
- assertChartSizeGreaterThan(img, 100);
- }
-
- @Test
- public void testStackedBarChartfiftyFifty() throws IOException {
- Map<String, String> params = new HashMap<String, String>();
- params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.STACKED_BAR_CHART);
- params.put(BaseChartWeb.CHART_PARAM_VALUES, "50,50");
- BarChart chart = new BarChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "stacked-bar-chart-50-50.png");
- assertChartSizeGreaterThan(img, 100);
- }
-
- private Map<String, String> getDefaultParams() {
- Map<String, String> params = new HashMap<String, String>();
- params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_HORIZONTAL);
- params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,50");
- return params;
- }
-
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.server.charts.deprecated; + +import org.junit.Ignore; +import org.junit.Test; + +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class BarChartTest extends BaseChartWebTest { + + @Test + public void testBarChartDefaultDimensions() throws IOException { + Map<String, String> params = getDefaultParams(); + BarChart chart = new BarChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "bar-chart-default.png"); + assertChartSizeGreaterThan(img, 100); + } + + @Test + public void testBarChartRange() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_RANGEMAX, "200"); + BarChart chart = new BarChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "bar-chart-range.png"); + assertChartSizeGreaterThan(img, 100); + } + + @Test + public void testBarChartSpecificDimensions() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "750x250"); + BarChart chart = new BarChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "bar-chart-specific-dimensions.png"); + assertChartSizeGreaterThan(img, 100); + } + + @Test + public void testBarChartOneValue() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_VALUES, "100"); + BarChart chart = new BarChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "bar-chart-one-value.png"); + assertChartSizeGreaterThan(img, 100); + } + + @Test + public void testBarChartOthersColors() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_COLORS, "FFFF00,9900FF"); + BarChart chart = new BarChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "bar-chart-others-colors.png"); + assertChartSizeGreaterThan(img, 100); + } + + @Test + public void testBarChartNullValues() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_VALUES, null); + BarChart chart = new BarChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "bar-chart-null-values.png"); + assertChartSizeGreaterThan(img, 100); + } + + @Test + public void testBarChartWrongValues() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_VALUES, "wrong,value"); + BarChart chart = new BarChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "bar-chart-wrong-values.png"); + assertChartSizeGreaterThan(img, 100); + } + + @Test + public void testBarChartTitle() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet"); + params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "750x250"); + BarChart chart = new BarChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "bar-chart-title.png"); + assertChartSizeGreaterThan(img, 100); + } + + @Test + @Ignore + public void testBarChartTitle2() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet"); + params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "750x250"); + params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_VERTICAL); + params.put(BaseChartWeb.CHART_PARAM_CATEGORIES, "0+,5+,10+,20+,30+,60+,90+"); + params.put(BaseChartWeb.CHART_PARAM_SERIES, "1,2,3"); + params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE, "y"); + params.put(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE, "y"); + params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,50,75,92,30,58"); + BarChart chart = new BarChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "bar-chart-vertical-multi-series.png"); + assertChartSizeGreaterThan(img, 100); + } + + @Test + public void testStackedBarCharteightyTwenty() throws IOException { + Map<String, String> params = new HashMap<String, String>(); + params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.STACKED_BAR_CHART); + params.put(BaseChartWeb.CHART_PARAM_VALUES, "80,20"); + BarChart chart = new BarChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "stacked-bar-chart-80-20.png"); + assertChartSizeGreaterThan(img, 100); + } + + @Test + public void testStackedBarChartfiftyFifty() throws IOException { + Map<String, String> params = new HashMap<String, String>(); + params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.STACKED_BAR_CHART); + params.put(BaseChartWeb.CHART_PARAM_VALUES, "50,50"); + BarChart chart = new BarChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "stacked-bar-chart-50-50.png"); + assertChartSizeGreaterThan(img, 100); + } + + private Map<String, String> getDefaultParams() { + Map<String, String> params = new HashMap<String, String>(); + params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_HORIZONTAL); + params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,50"); + return params; + } + +} diff --git a/sonar-server/src/test/java/org/sonar/server/charts/deprecated/BaseChartTest.java b/sonar-server/src/test/java/org/sonar/server/charts/deprecated/BaseChartTest.java index 898fa7dc549..cb3707036a4 100644 --- a/sonar-server/src/test/java/org/sonar/server/charts/deprecated/BaseChartTest.java +++ b/sonar-server/src/test/java/org/sonar/server/charts/deprecated/BaseChartTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/charts/deprecated/BaseChartWebTest.java b/sonar-server/src/test/java/org/sonar/server/charts/deprecated/BaseChartWebTest.java index 3936e05ed15..a9be5c12b46 100644 --- a/sonar-server/src/test/java/org/sonar/server/charts/deprecated/BaseChartWebTest.java +++ b/sonar-server/src/test/java/org/sonar/server/charts/deprecated/BaseChartWebTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/charts/deprecated/CustomBarChartTest.java b/sonar-server/src/test/java/org/sonar/server/charts/deprecated/CustomBarChartTest.java index 48a639eaf66..8c6f2628455 100644 --- a/sonar-server/src/test/java/org/sonar/server/charts/deprecated/CustomBarChartTest.java +++ b/sonar-server/src/test/java/org/sonar/server/charts/deprecated/CustomBarChartTest.java @@ -1,90 +1,90 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.server.charts.deprecated;
-
-import org.junit.Test;
-
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-public class CustomBarChartTest extends BaseChartWebTest {
-
- @Test
- public void testEmptyParameters() throws IOException {
- Map<String, String> params = new HashMap<String, String>();
- CustomBarChart chart = new CustomBarChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "custom-horizontal-bar-chart-empty.png");
- assertChartSizeGreaterThan(img, 50);
- }
-
- @Test
- public void testAllParameters() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet");
- params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "750x250");
- params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE, "y");
- params.put(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE, "y");
- params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM);
- params.put(BaseChartWeb.CHART_PARAM_VALUES, "6,2,3,7,5,1,9");
- params.put(BaseChartWeb.CHART_PARAM_SERIES, "1,2");
- params.put(BaseChartWeb.CHART_PARAM_CATEGORIES, "0+,5+,10+,20+,30+,60+,90+");
- params.put(BaseChartWeb.CHART_PARAM_COLORS, "FF0000,FF0000,FF0000,CC9900,CC9900,CC9900,00FF00,00FF00,00FF00");
- params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER, "0.05");
- params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER, "0.05");
- params.put(BaseChartWeb.CHART_PARAM_INSETS, "20");
- CustomBarChart chart = new CustomBarChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "custom-horizontal-bar-chart-all.png");
- assertChartSizeGreaterThan(img, 50);
- }
-
- @Test
- public void testComplexityChart() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "150x100");
- params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE, "y");
- params.put(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE, "y");
- params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM);
- params.put(BaseChartWeb.CHART_PARAM_VALUES, "6,2,3");
- params.put(BaseChartWeb.CHART_PARAM_CATEGORIES, "0+,5+,10+,20+,30+,60+,90+");
- params.put(BaseChartWeb.CHART_PARAM_COLORS, "4192D9");
- params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER, "0.05");
- params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_LOWER, "0.05");
- params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER, "0.2");
- params.put(BaseChartWeb.CHART_PARAM_INSETS, "1");
- params.put(BaseChartWeb.CHART_PARAM_OUTLINE_RANGEGRIDLINES_VISIBLE, "y");
- params.put(BaseChartWeb.CHART_PARAM_OUTLINE_VISIBLE, "y");
- CustomBarChart chart = new CustomBarChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "custom-horizontal-bar-chart-complexity.png");
- assertChartSizeGreaterThan(img, 50);
- }
-
- private Map<String, String> getDefaultParams() {
- Map<String, String> params = new HashMap<String, String>();
- params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_HORIZONTAL);
- params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,50");
- return params;
- }
-
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.server.charts.deprecated; + +import org.junit.Test; + +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class CustomBarChartTest extends BaseChartWebTest { + + @Test + public void testEmptyParameters() throws IOException { + Map<String, String> params = new HashMap<String, String>(); + CustomBarChart chart = new CustomBarChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "custom-horizontal-bar-chart-empty.png"); + assertChartSizeGreaterThan(img, 50); + } + + @Test + public void testAllParameters() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet"); + params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "750x250"); + params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE, "y"); + params.put(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE, "y"); + params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM); + params.put(BaseChartWeb.CHART_PARAM_VALUES, "6,2,3,7,5,1,9"); + params.put(BaseChartWeb.CHART_PARAM_SERIES, "1,2"); + params.put(BaseChartWeb.CHART_PARAM_CATEGORIES, "0+,5+,10+,20+,30+,60+,90+"); + params.put(BaseChartWeb.CHART_PARAM_COLORS, "FF0000,FF0000,FF0000,CC9900,CC9900,CC9900,00FF00,00FF00,00FF00"); + params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER, "0.05"); + params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER, "0.05"); + params.put(BaseChartWeb.CHART_PARAM_INSETS, "20"); + CustomBarChart chart = new CustomBarChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "custom-horizontal-bar-chart-all.png"); + assertChartSizeGreaterThan(img, 50); + } + + @Test + public void testComplexityChart() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "150x100"); + params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE, "y"); + params.put(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE, "y"); + params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM); + params.put(BaseChartWeb.CHART_PARAM_VALUES, "6,2,3"); + params.put(BaseChartWeb.CHART_PARAM_CATEGORIES, "0+,5+,10+,20+,30+,60+,90+"); + params.put(BaseChartWeb.CHART_PARAM_COLORS, "4192D9"); + params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER, "0.05"); + params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_LOWER, "0.05"); + params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER, "0.2"); + params.put(BaseChartWeb.CHART_PARAM_INSETS, "1"); + params.put(BaseChartWeb.CHART_PARAM_OUTLINE_RANGEGRIDLINES_VISIBLE, "y"); + params.put(BaseChartWeb.CHART_PARAM_OUTLINE_VISIBLE, "y"); + CustomBarChart chart = new CustomBarChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "custom-horizontal-bar-chart-complexity.png"); + assertChartSizeGreaterThan(img, 50); + } + + private Map<String, String> getDefaultParams() { + Map<String, String> params = new HashMap<String, String>(); + params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_HORIZONTAL); + params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,50"); + return params; + } + }
\ No newline at end of file diff --git a/sonar-server/src/test/java/org/sonar/server/charts/deprecated/PieChartTest.java b/sonar-server/src/test/java/org/sonar/server/charts/deprecated/PieChartTest.java index 63c3ad2f06d..0b3fac3e686 100644 --- a/sonar-server/src/test/java/org/sonar/server/charts/deprecated/PieChartTest.java +++ b/sonar-server/src/test/java/org/sonar/server/charts/deprecated/PieChartTest.java @@ -1,109 +1,109 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.server.charts.deprecated;
-
-import org.junit.Test;
-
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-public class PieChartTest extends BaseChartWebTest {
-
- @Test
- public void testPieChartDefaultDimensions() throws IOException {
- Map<String, String> params = getDefaultParams();
- PieChart chart = new PieChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "pie-chart-default.png");
- assertChartSizeGreaterThan(img, 50);
- }
-
- @Test
- public void testPieChartSpecificDimensions() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200");
- PieChart chart = new PieChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "pie-chart-specific-dimensions.png");
- assertChartSizeGreaterThan(img, 50);
- }
-
- @Test
- public void testPieChartOneValue() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_VALUES, "100");
- PieChart chart = new PieChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "pie-chart-one-value.png");
- assertChartSizeGreaterThan(img, 50);
- }
-
- @Test
- public void testPieChartOthersColors() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_COLORS, "FFFF00,9900FF");
- PieChart chart = new PieChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "pie-chart-others-colors.png");
- assertChartSizeGreaterThan(img, 50);
- }
-
- @Test
- public void testPieChartNullValues() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_VALUES, null);
- PieChart chart = new PieChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "pie-chart-null-values.png");
- assertChartSizeGreaterThan(img, 50);
- }
-
- @Test
- public void testPieChartWrongValues() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_VALUES, "wrong,value");
- PieChart chart = new PieChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "pie-chart-wrong-values.png");
- assertChartSizeGreaterThan(img, 50);
- }
-
- @Test
- public void testPieChartTitle() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet");
- params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200");
- PieChart chart = new PieChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "pie-chart-title.png");
- assertChartSizeGreaterThan(img, 50);
- }
-
- private Map<String, String> getDefaultParams() {
- Map<String, String> params = new HashMap<String, String>();
- params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.PIE_CHART);
- params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,50");
- params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "50x50");
- return params;
- }
-
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.server.charts.deprecated; + +import org.junit.Test; + +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class PieChartTest extends BaseChartWebTest { + + @Test + public void testPieChartDefaultDimensions() throws IOException { + Map<String, String> params = getDefaultParams(); + PieChart chart = new PieChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "pie-chart-default.png"); + assertChartSizeGreaterThan(img, 50); + } + + @Test + public void testPieChartSpecificDimensions() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200"); + PieChart chart = new PieChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "pie-chart-specific-dimensions.png"); + assertChartSizeGreaterThan(img, 50); + } + + @Test + public void testPieChartOneValue() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_VALUES, "100"); + PieChart chart = new PieChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "pie-chart-one-value.png"); + assertChartSizeGreaterThan(img, 50); + } + + @Test + public void testPieChartOthersColors() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_COLORS, "FFFF00,9900FF"); + PieChart chart = new PieChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "pie-chart-others-colors.png"); + assertChartSizeGreaterThan(img, 50); + } + + @Test + public void testPieChartNullValues() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_VALUES, null); + PieChart chart = new PieChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "pie-chart-null-values.png"); + assertChartSizeGreaterThan(img, 50); + } + + @Test + public void testPieChartWrongValues() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_VALUES, "wrong,value"); + PieChart chart = new PieChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "pie-chart-wrong-values.png"); + assertChartSizeGreaterThan(img, 50); + } + + @Test + public void testPieChartTitle() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet"); + params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200"); + PieChart chart = new PieChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "pie-chart-title.png"); + assertChartSizeGreaterThan(img, 50); + } + + private Map<String, String> getDefaultParams() { + Map<String, String> params = new HashMap<String, String>(); + params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.PIE_CHART); + params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,50"); + params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "50x50"); + return params; + } + }
\ No newline at end of file diff --git a/sonar-server/src/test/java/org/sonar/server/charts/deprecated/SparkLinesChartTest.java b/sonar-server/src/test/java/org/sonar/server/charts/deprecated/SparkLinesChartTest.java index dee9f92a2ae..d4b574c9ed5 100644 --- a/sonar-server/src/test/java/org/sonar/server/charts/deprecated/SparkLinesChartTest.java +++ b/sonar-server/src/test/java/org/sonar/server/charts/deprecated/SparkLinesChartTest.java @@ -1,119 +1,119 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.server.charts.deprecated;
-
-import org.junit.Test;
-
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-public class SparkLinesChartTest extends BaseChartWebTest {
-
- @Test
- public void testSparkLinesChartDefaultDimensions() throws IOException {
- Map<String, String> params = getDefaultParams();
- SparkLinesChart chart = new SparkLinesChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "sparklines-chart-default.png");
- assertChartSizeGreaterThan(img, 50);
- }
-
- @Test
- public void testSparklinesChartSpecificDimensions() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200");
- SparkLinesChart chart = new SparkLinesChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "sparklines-chart-specific-dimensions.png");
- assertChartSizeGreaterThan(img, 50);
- }
-
- @Test
- public void testSparklinesChartOneValue() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,100");
- SparkLinesChart chart = new SparkLinesChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "sparklines-chart-one-value.png");
- assertChartSizeGreaterThan(img, 50);
- }
-
- @Test
- public void testSparklinesChartOthersColors() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_COLORS, "9900FF");
- SparkLinesChart chart = new SparkLinesChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "sparklines-chart-others-colors.png");
- assertChartSizeGreaterThan(img, 50);
- }
-
- @Test
- public void testSparklinesChartNullValues() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_VALUES, null);
- SparkLinesChart chart = new SparkLinesChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "sparklines-chart-null-values.png");
- assertChartSizeGreaterThan(img, 50);
- }
-
- @Test
- public void testSparklinesChartWrongValues() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_VALUES, "wrong,value");
- SparkLinesChart chart = new SparkLinesChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "sparklines-chart-wrong-values.png");
- assertChartSizeGreaterThan(img, 50);
- }
-
- @Test
- public void testSparklinesChartTitle() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet");
- params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200");
- SparkLinesChart chart = new SparkLinesChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "sparklines-chart-title.png");
- assertChartSizeGreaterThan(img, 50);
- }
-
- @Test
- public void testSparklinesChartDates() throws IOException {
- Map<String, String> params = getDefaultParams();
- params.put(BaseChartWeb.CHART_PARAM_VALUES, "20080101,1,20080201,4,20080301,3,20080401,5,20080501,5,20080601,7,20080701,7,20080801,8");
- params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200");
- SparkLinesChart chart = new SparkLinesChart(params);
- BufferedImage img = chart.getChartImage();
- saveChart(img, "sparklines-chart-dates.png");
- assertChartSizeGreaterThan(img, 50);
- }
-
- private Map<String, String> getDefaultParams() {
- Map<String, String> params = new HashMap<String, String>();
- params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.SPARKLINES_CHART);
- params.put(BaseChartWeb.CHART_PARAM_VALUES, "1,1,2,4,3,3,4,5,5,5,6,7,7,7,8,8");
- return params;
- }
-
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.server.charts.deprecated; + +import org.junit.Test; + +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class SparkLinesChartTest extends BaseChartWebTest { + + @Test + public void testSparkLinesChartDefaultDimensions() throws IOException { + Map<String, String> params = getDefaultParams(); + SparkLinesChart chart = new SparkLinesChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "sparklines-chart-default.png"); + assertChartSizeGreaterThan(img, 50); + } + + @Test + public void testSparklinesChartSpecificDimensions() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200"); + SparkLinesChart chart = new SparkLinesChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "sparklines-chart-specific-dimensions.png"); + assertChartSizeGreaterThan(img, 50); + } + + @Test + public void testSparklinesChartOneValue() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,100"); + SparkLinesChart chart = new SparkLinesChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "sparklines-chart-one-value.png"); + assertChartSizeGreaterThan(img, 50); + } + + @Test + public void testSparklinesChartOthersColors() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_COLORS, "9900FF"); + SparkLinesChart chart = new SparkLinesChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "sparklines-chart-others-colors.png"); + assertChartSizeGreaterThan(img, 50); + } + + @Test + public void testSparklinesChartNullValues() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_VALUES, null); + SparkLinesChart chart = new SparkLinesChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "sparklines-chart-null-values.png"); + assertChartSizeGreaterThan(img, 50); + } + + @Test + public void testSparklinesChartWrongValues() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_VALUES, "wrong,value"); + SparkLinesChart chart = new SparkLinesChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "sparklines-chart-wrong-values.png"); + assertChartSizeGreaterThan(img, 50); + } + + @Test + public void testSparklinesChartTitle() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet"); + params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200"); + SparkLinesChart chart = new SparkLinesChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "sparklines-chart-title.png"); + assertChartSizeGreaterThan(img, 50); + } + + @Test + public void testSparklinesChartDates() throws IOException { + Map<String, String> params = getDefaultParams(); + params.put(BaseChartWeb.CHART_PARAM_VALUES, "20080101,1,20080201,4,20080301,3,20080401,5,20080501,5,20080601,7,20080701,7,20080801,8"); + params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200"); + SparkLinesChart chart = new SparkLinesChart(params); + BufferedImage img = chart.getChartImage(); + saveChart(img, "sparklines-chart-dates.png"); + assertChartSizeGreaterThan(img, 50); + } + + private Map<String, String> getDefaultParams() { + Map<String, String> params = new HashMap<String, String>(); + params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.SPARKLINES_CHART); + params.put(BaseChartWeb.CHART_PARAM_VALUES, "1,1,2,4,3,3,4,5,5,5,6,7,7,7,8,8"); + return params; + } + }
\ No newline at end of file diff --git a/sonar-server/src/test/java/org/sonar/server/charts/jruby/TrendsChartTest.java b/sonar-server/src/test/java/org/sonar/server/charts/jruby/TrendsChartTest.java index d27b3042bc4..4975a48e692 100644 --- a/sonar-server/src/test/java/org/sonar/server/charts/jruby/TrendsChartTest.java +++ b/sonar-server/src/test/java/org/sonar/server/charts/jruby/TrendsChartTest.java @@ -1,85 +1,85 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.server.charts.jruby;
-
-import org.sonar.server.charts.deprecated.BaseChartTest;
-
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.text.ParseException;
-
-public class TrendsChartTest extends BaseChartTest {
- private static final int WIDTH = 900;
- private static final int HEIGHT = 350;
-
- private TrendsChart chart;
-
- public void testTrendsChart() throws ParseException, IOException {
- chart = new TrendsChart(WIDTH, HEIGHT, "fr", true);
- chart.initSerie(0L, "Global", false);
- chart.initSerie(6L, "Efficiency", true);
- chart.initSerie(9L, "Maintanability", false);
- chart.initSerie(3L, "Portability", false);
- chart.initSerie(24L, "Reliability", true);
- chart.initSerie(60L, "Usability", false);
-
- chart.addMeasure(20.0, stringToDate("12-10-07 8h30"), 0L);
- chart.addMeasure(35.0, stringToDate("12-10-07 8h30"), 6L);
- chart.addMeasure(12.4, stringToDate("12-10-07 8h30"), 9L);
- chart.addMeasure(99.99, stringToDate("12-10-07 8h30"), 3L);
- chart.addMeasure(2.3, stringToDate("12-10-07 8h30"), 24L);
- chart.addMeasure(12.5, stringToDate("12-10-07 8h30"), 60L);
-
- chart.addMeasure(10.0, stringToDate("12-11-07 8h30"), 0L);
- chart.addMeasure(30.0, stringToDate("12-11-07 8h30"), 6L);
- chart.addMeasure(22.4, stringToDate("12-11-07 8h30"), 9L);
- chart.addMeasure(99.99, stringToDate("12-11-07 8h30"), 3L);
- chart.addMeasure(0.3, stringToDate("12-11-07 8h30"), 24L);
- chart.addMeasure(12.5, stringToDate("12-11-07 8h30"), 60L);
-
- chart.addMeasure(30.0, stringToDate("12-12-07 8h30"), 0L);
- chart.addMeasure(15.0, stringToDate("12-12-07 8h30"), 6L);
- chart.addMeasure(82.4, stringToDate("12-12-07 8h30"), 9L);
- chart.addMeasure(99.99, stringToDate("12-12-07 8h30"), 3L);
- chart.addMeasure(52.3, stringToDate("12-12-07 8h30"), 24L);
- chart.addMeasure(12.5, stringToDate("12-12-07 8h30"), 60L);
-
- chart.addLabel(stringToDate("12-11-07 12h35"), "Label A");
- chart.addLabel(stringToDate("11-11-07 12h35"), "Label B", true);
-
- BufferedImage img = chart.getChartImage();
- assertChartSizeGreaterThan(img, 1000);
- saveChart(img, "trends-chart.png");
- }
-
-
- public void testSingleSerieWithoutLegends() throws ParseException, IOException {
- chart = new TrendsChart(WIDTH, HEIGHT, "fr", false);
- chart.initSerie(0L, "single", false);
-
- chart.addMeasure(20.0, stringToDate("12-10-07 8h30"), 0L);
- chart.addMeasure(10.0, stringToDate("12-11-07 8h30"), 0L);
- chart.addMeasure(30.0, stringToDate("12-12-07 8h30"), 0L);
-
- BufferedImage img = chart.getChartImage();
- assertChartSizeGreaterThan(img, 1000);
- saveChart(img, "trends-single-without-legends.png");
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.server.charts.jruby; + +import org.sonar.server.charts.deprecated.BaseChartTest; + +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.text.ParseException; + +public class TrendsChartTest extends BaseChartTest { + private static final int WIDTH = 900; + private static final int HEIGHT = 350; + + private TrendsChart chart; + + public void testTrendsChart() throws ParseException, IOException { + chart = new TrendsChart(WIDTH, HEIGHT, "fr", true); + chart.initSerie(0L, "Global", false); + chart.initSerie(6L, "Efficiency", true); + chart.initSerie(9L, "Maintanability", false); + chart.initSerie(3L, "Portability", false); + chart.initSerie(24L, "Reliability", true); + chart.initSerie(60L, "Usability", false); + + chart.addMeasure(20.0, stringToDate("12-10-07 8h30"), 0L); + chart.addMeasure(35.0, stringToDate("12-10-07 8h30"), 6L); + chart.addMeasure(12.4, stringToDate("12-10-07 8h30"), 9L); + chart.addMeasure(99.99, stringToDate("12-10-07 8h30"), 3L); + chart.addMeasure(2.3, stringToDate("12-10-07 8h30"), 24L); + chart.addMeasure(12.5, stringToDate("12-10-07 8h30"), 60L); + + chart.addMeasure(10.0, stringToDate("12-11-07 8h30"), 0L); + chart.addMeasure(30.0, stringToDate("12-11-07 8h30"), 6L); + chart.addMeasure(22.4, stringToDate("12-11-07 8h30"), 9L); + chart.addMeasure(99.99, stringToDate("12-11-07 8h30"), 3L); + chart.addMeasure(0.3, stringToDate("12-11-07 8h30"), 24L); + chart.addMeasure(12.5, stringToDate("12-11-07 8h30"), 60L); + + chart.addMeasure(30.0, stringToDate("12-12-07 8h30"), 0L); + chart.addMeasure(15.0, stringToDate("12-12-07 8h30"), 6L); + chart.addMeasure(82.4, stringToDate("12-12-07 8h30"), 9L); + chart.addMeasure(99.99, stringToDate("12-12-07 8h30"), 3L); + chart.addMeasure(52.3, stringToDate("12-12-07 8h30"), 24L); + chart.addMeasure(12.5, stringToDate("12-12-07 8h30"), 60L); + + chart.addLabel(stringToDate("12-11-07 12h35"), "Label A"); + chart.addLabel(stringToDate("11-11-07 12h35"), "Label B", true); + + BufferedImage img = chart.getChartImage(); + assertChartSizeGreaterThan(img, 1000); + saveChart(img, "trends-chart.png"); + } + + + public void testSingleSerieWithoutLegends() throws ParseException, IOException { + chart = new TrendsChart(WIDTH, HEIGHT, "fr", false); + chart.initSerie(0L, "single", false); + + chart.addMeasure(20.0, stringToDate("12-10-07 8h30"), 0L); + chart.addMeasure(10.0, stringToDate("12-11-07 8h30"), 0L); + chart.addMeasure(30.0, stringToDate("12-12-07 8h30"), 0L); + + BufferedImage img = chart.getChartImage(); + assertChartSizeGreaterThan(img, 1000); + saveChart(img, "trends-single-without-legends.png"); + } +} diff --git a/sonar-server/src/test/java/org/sonar/server/configuration/BackupTest.java b/sonar-server/src/test/java/org/sonar/server/configuration/BackupTest.java index c6e72df8451..5bcf0fc19ab 100644 --- a/sonar-server/src/test/java/org/sonar/server/configuration/BackupTest.java +++ b/sonar-server/src/test/java/org/sonar/server/configuration/BackupTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/configuration/ConfigurationFactoryTest.java b/sonar-server/src/test/java/org/sonar/server/configuration/ConfigurationFactoryTest.java index fc523af77c7..4c7e2aa39a3 100644 --- a/sonar-server/src/test/java/org/sonar/server/configuration/ConfigurationFactoryTest.java +++ b/sonar-server/src/test/java/org/sonar/server/configuration/ConfigurationFactoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/configuration/InheritedProfilesTest.java b/sonar-server/src/test/java/org/sonar/server/configuration/InheritedProfilesTest.java index f1907ebcf53..1b95129ad95 100644 --- a/sonar-server/src/test/java/org/sonar/server/configuration/InheritedProfilesTest.java +++ b/sonar-server/src/test/java/org/sonar/server/configuration/InheritedProfilesTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/configuration/MetricsBackupTest.java b/sonar-server/src/test/java/org/sonar/server/configuration/MetricsBackupTest.java index bb80bea4153..d8054dc9a99 100644 --- a/sonar-server/src/test/java/org/sonar/server/configuration/MetricsBackupTest.java +++ b/sonar-server/src/test/java/org/sonar/server/configuration/MetricsBackupTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/configuration/ProfilesBackupTest.java b/sonar-server/src/test/java/org/sonar/server/configuration/ProfilesBackupTest.java index 2387aba138f..fe912d79416 100644 --- a/sonar-server/src/test/java/org/sonar/server/configuration/ProfilesBackupTest.java +++ b/sonar-server/src/test/java/org/sonar/server/configuration/ProfilesBackupTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/configuration/ProfilesManagerTest.java b/sonar-server/src/test/java/org/sonar/server/configuration/ProfilesManagerTest.java index 2820933f37a..43374bd3d68 100644 --- a/sonar-server/src/test/java/org/sonar/server/configuration/ProfilesManagerTest.java +++ b/sonar-server/src/test/java/org/sonar/server/configuration/ProfilesManagerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/configuration/PropertiesBackupTest.java b/sonar-server/src/test/java/org/sonar/server/configuration/PropertiesBackupTest.java index 0dd552ed753..7b6f191a815 100644 --- a/sonar-server/src/test/java/org/sonar/server/configuration/PropertiesBackupTest.java +++ b/sonar-server/src/test/java/org/sonar/server/configuration/PropertiesBackupTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/configuration/RulesBackupTest.java b/sonar-server/src/test/java/org/sonar/server/configuration/RulesBackupTest.java index 1d51c3fd775..df3b6f5ead0 100644 --- a/sonar-server/src/test/java/org/sonar/server/configuration/RulesBackupTest.java +++ b/sonar-server/src/test/java/org/sonar/server/configuration/RulesBackupTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/database/EmbeddedDatabaseTest.java b/sonar-server/src/test/java/org/sonar/server/database/EmbeddedDatabaseTest.java index de6c13604c6..b58d1b6c1cc 100644 --- a/sonar-server/src/test/java/org/sonar/server/database/EmbeddedDatabaseTest.java +++ b/sonar-server/src/test/java/org/sonar/server/database/EmbeddedDatabaseTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/database/JndiDatabaseConnectorTest.java b/sonar-server/src/test/java/org/sonar/server/database/JndiDatabaseConnectorTest.java index 5ea80d4561b..39a266ec0a4 100644 --- a/sonar-server/src/test/java/org/sonar/server/database/JndiDatabaseConnectorTest.java +++ b/sonar-server/src/test/java/org/sonar/server/database/JndiDatabaseConnectorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/database/UniqueDatasourceFactoryTest.java b/sonar-server/src/test/java/org/sonar/server/database/UniqueDatasourceFactoryTest.java index d2912ac966f..34d54f642a1 100644 --- a/sonar-server/src/test/java/org/sonar/server/database/UniqueDatasourceFactoryTest.java +++ b/sonar-server/src/test/java/org/sonar/server/database/UniqueDatasourceFactoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/filters/DateCriterionTest.java b/sonar-server/src/test/java/org/sonar/server/filters/DateCriterionTest.java index 45f0bb3a78d..1dc8be73d98 100644 --- a/sonar-server/src/test/java/org/sonar/server/filters/DateCriterionTest.java +++ b/sonar-server/src/test/java/org/sonar/server/filters/DateCriterionTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/filters/FilterExecutorTest.java b/sonar-server/src/test/java/org/sonar/server/filters/FilterExecutorTest.java index 627561b4f4f..c8c539274a3 100644 --- a/sonar-server/src/test/java/org/sonar/server/filters/FilterExecutorTest.java +++ b/sonar-server/src/test/java/org/sonar/server/filters/FilterExecutorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/filters/FilterResultTest.java b/sonar-server/src/test/java/org/sonar/server/filters/FilterResultTest.java index 03f278d83cc..27caf4452c6 100644 --- a/sonar-server/src/test/java/org/sonar/server/filters/FilterResultTest.java +++ b/sonar-server/src/test/java/org/sonar/server/filters/FilterResultTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/mavendeployer/ArtifactTest.java b/sonar-server/src/test/java/org/sonar/server/mavendeployer/ArtifactTest.java index cae01cf9025..9ec06199bd4 100644 --- a/sonar-server/src/test/java/org/sonar/server/mavendeployer/ArtifactTest.java +++ b/sonar-server/src/test/java/org/sonar/server/mavendeployer/ArtifactTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/mavendeployer/MavenRepositoryTest.java b/sonar-server/src/test/java/org/sonar/server/mavendeployer/MavenRepositoryTest.java index b2b0328f793..4ade6a5b250 100644 --- a/sonar-server/src/test/java/org/sonar/server/mavendeployer/MavenRepositoryTest.java +++ b/sonar-server/src/test/java/org/sonar/server/mavendeployer/MavenRepositoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/mavendeployer/MojoTest.java b/sonar-server/src/test/java/org/sonar/server/mavendeployer/MojoTest.java index 1bec355705f..f79b1129669 100644 --- a/sonar-server/src/test/java/org/sonar/server/mavendeployer/MojoTest.java +++ b/sonar-server/src/test/java/org/sonar/server/mavendeployer/MojoTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/platform/DefaultServerUpgradeStatusTest.java b/sonar-server/src/test/java/org/sonar/server/platform/DefaultServerUpgradeStatusTest.java index ecfe58793c4..776f1c6ed0a 100644 --- a/sonar-server/src/test/java/org/sonar/server/platform/DefaultServerUpgradeStatusTest.java +++ b/sonar-server/src/test/java/org/sonar/server/platform/DefaultServerUpgradeStatusTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/platform/ServerFileSystemTest.java b/sonar-server/src/test/java/org/sonar/server/platform/ServerFileSystemTest.java index 5312ba08930..d0ef238566f 100644 --- a/sonar-server/src/test/java/org/sonar/server/platform/ServerFileSystemTest.java +++ b/sonar-server/src/test/java/org/sonar/server/platform/ServerFileSystemTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/platform/ServerImplTest.java b/sonar-server/src/test/java/org/sonar/server/platform/ServerImplTest.java index eed3f16645c..583772a50bb 100644 --- a/sonar-server/src/test/java/org/sonar/server/platform/ServerImplTest.java +++ b/sonar-server/src/test/java/org/sonar/server/platform/ServerImplTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/platform/ServerLifecycleNotifierTest.java b/sonar-server/src/test/java/org/sonar/server/platform/ServerLifecycleNotifierTest.java index 30c3304cb22..0e980f3983d 100644 --- a/sonar-server/src/test/java/org/sonar/server/platform/ServerLifecycleNotifierTest.java +++ b/sonar-server/src/test/java/org/sonar/server/platform/ServerLifecycleNotifierTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/plugins/BatchResourcesServletTest.java b/sonar-server/src/test/java/org/sonar/server/plugins/BatchResourcesServletTest.java index 192854a08d5..5efec710ae8 100644 --- a/sonar-server/src/test/java/org/sonar/server/plugins/BatchResourcesServletTest.java +++ b/sonar-server/src/test/java/org/sonar/server/plugins/BatchResourcesServletTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/plugins/PluginClassLoadersTest.java b/sonar-server/src/test/java/org/sonar/server/plugins/PluginClassLoadersTest.java index d673767c872..f7acccd64c0 100644 --- a/sonar-server/src/test/java/org/sonar/server/plugins/PluginClassLoadersTest.java +++ b/sonar-server/src/test/java/org/sonar/server/plugins/PluginClassLoadersTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/plugins/PluginDeployerTest.java b/sonar-server/src/test/java/org/sonar/server/plugins/PluginDeployerTest.java index 02f5041d4b8..868464c7879 100644 --- a/sonar-server/src/test/java/org/sonar/server/plugins/PluginDeployerTest.java +++ b/sonar-server/src/test/java/org/sonar/server/plugins/PluginDeployerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/plugins/PluginMetadataTest.java b/sonar-server/src/test/java/org/sonar/server/plugins/PluginMetadataTest.java index c664d919f60..b3c4ff799d1 100644 --- a/sonar-server/src/test/java/org/sonar/server/plugins/PluginMetadataTest.java +++ b/sonar-server/src/test/java/org/sonar/server/plugins/PluginMetadataTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/plugins/PluginUpdateTest.java b/sonar-server/src/test/java/org/sonar/server/plugins/PluginUpdateTest.java index fa997910d16..567ce07c731 100644 --- a/sonar-server/src/test/java/org/sonar/server/plugins/PluginUpdateTest.java +++ b/sonar-server/src/test/java/org/sonar/server/plugins/PluginUpdateTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java b/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java index 99190fe2beb..0eb01ed9b0e 100644 --- a/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java +++ b/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/plugins/SonarUpdateTest.java b/sonar-server/src/test/java/org/sonar/server/plugins/SonarUpdateTest.java index 45369fd4816..260fd69a98f 100644 --- a/sonar-server/src/test/java/org/sonar/server/plugins/SonarUpdateTest.java +++ b/sonar-server/src/test/java/org/sonar/server/plugins/SonarUpdateTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/plugins/StaticResourcesServletTest.java b/sonar-server/src/test/java/org/sonar/server/plugins/StaticResourcesServletTest.java index 3dc4bf884c5..b01e8b2ff96 100644 --- a/sonar-server/src/test/java/org/sonar/server/plugins/StaticResourcesServletTest.java +++ b/sonar-server/src/test/java/org/sonar/server/plugins/StaticResourcesServletTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterClientTest.java b/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterClientTest.java index 1031c88fd23..6d03deaf019 100644 --- a/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterClientTest.java +++ b/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterClientTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterMatrixTest.java b/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterMatrixTest.java index b8c162acdc8..4c1ee5e6cb1 100644 --- a/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterMatrixTest.java +++ b/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterMatrixTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterServlet.java b/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterServlet.java index b84597ca289..6d737b5370e 100644 --- a/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterServlet.java +++ b/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterServlet.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/qualitymodel/DefaultModelManagerTest.java b/sonar-server/src/test/java/org/sonar/server/qualitymodel/DefaultModelManagerTest.java index 73d2e9b8938..bc7d5e4dc3e 100644 --- a/sonar-server/src/test/java/org/sonar/server/qualitymodel/DefaultModelManagerTest.java +++ b/sonar-server/src/test/java/org/sonar/server/qualitymodel/DefaultModelManagerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/rules/DeprecatedProfilesTest.java b/sonar-server/src/test/java/org/sonar/server/rules/DeprecatedProfilesTest.java index 7ae3f3bcda0..4fa8af9d61c 100644 --- a/sonar-server/src/test/java/org/sonar/server/rules/DeprecatedProfilesTest.java +++ b/sonar-server/src/test/java/org/sonar/server/rules/DeprecatedProfilesTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/startup/DeleteDeprecatedMeasuresTest.java b/sonar-server/src/test/java/org/sonar/server/startup/DeleteDeprecatedMeasuresTest.java index 438058322de..db61eb27c0b 100644 --- a/sonar-server/src/test/java/org/sonar/server/startup/DeleteDeprecatedMeasuresTest.java +++ b/sonar-server/src/test/java/org/sonar/server/startup/DeleteDeprecatedMeasuresTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/startup/EnableProfilesTest.java b/sonar-server/src/test/java/org/sonar/server/startup/EnableProfilesTest.java index c7ec1fec395..4b347a5c149 100644 --- a/sonar-server/src/test/java/org/sonar/server/startup/EnableProfilesTest.java +++ b/sonar-server/src/test/java/org/sonar/server/startup/EnableProfilesTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/startup/GwtPublisherTest.java b/sonar-server/src/test/java/org/sonar/server/startup/GwtPublisherTest.java index 5851586f937..b1437f662a1 100644 --- a/sonar-server/src/test/java/org/sonar/server/startup/GwtPublisherTest.java +++ b/sonar-server/src/test/java/org/sonar/server/startup/GwtPublisherTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/startup/JdbcDriverDeployerTest.java b/sonar-server/src/test/java/org/sonar/server/startup/JdbcDriverDeployerTest.java index 90ace4561cc..827a505d00f 100644 --- a/sonar-server/src/test/java/org/sonar/server/startup/JdbcDriverDeployerTest.java +++ b/sonar-server/src/test/java/org/sonar/server/startup/JdbcDriverDeployerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/startup/RegisterMetricsTest.java b/sonar-server/src/test/java/org/sonar/server/startup/RegisterMetricsTest.java index 49670f559ca..da2ce307cd3 100644 --- a/sonar-server/src/test/java/org/sonar/server/startup/RegisterMetricsTest.java +++ b/sonar-server/src/test/java/org/sonar/server/startup/RegisterMetricsTest.java @@ -1,81 +1,81 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.server.startup;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-import org.sonar.api.measures.CoreMetrics;
-import org.sonar.api.measures.Metric;
-import org.sonar.jpa.dao.MeasuresDao;
-import org.sonar.jpa.test.AbstractDbUnitTestCase;
-
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-public class RegisterMetricsTest extends AbstractDbUnitTestCase {
-
- @Test
- public void shouldSaveIfNew() {
- setupData("shouldSaveIfNew");
-
- Metric metric1 = new Metric("new1", "short1", "desc1", Metric.ValueType.FLOAT, 1, true, "domain1", false);
- Metric metric2 = new Metric("new2", "short2", "desc2", Metric.ValueType.FLOAT, 1, true, "domain2", false);
- RegisterMetrics synchronizer = new RegisterMetrics(getSession(), new MeasuresDao(getSession()), null);
- synchronizer.register(Arrays.asList(metric1, metric2));
- checkTables("shouldSaveIfNew", "metrics");
- }
-
- @Test
- public void shouldUpdateIfAlreadyExists() {
- setupData("shouldUpdateIfAlreadyExists");
-
- final List<Metric> metrics = new ArrayList<Metric>();
- metrics.add(new Metric("key", "new short name", "new description", Metric.ValueType.FLOAT, -1, true, "new domain", false));
- RegisterMetrics synchronizer = new RegisterMetrics(getSession(), new MeasuresDao(getSession()), null);
- synchronizer.register(metrics);
-
- checkTables("shouldUpdateIfAlreadyExists", "metrics");
- }
-
- @Test
- public void enableOnlyLoadedMetrics() throws SQLException {
- setupData("enableOnlyLoadedMetrics");
-
- RegisterMetrics loader = new RegisterMetrics(getSession(), new MeasuresDao(getSession()), null);
- loader.start();
-
- assertFalse(getDao().getMeasuresDao().getMetric("deprecated").getEnabled());
- assertTrue(getDao().getMeasuresDao().getMetric(CoreMetrics.COMPLEXITY).getEnabled());
- }
-
- @Test
- public void cleanAlerts() throws SQLException {
- setupData("cleanAlerts");
-
- RegisterMetrics loader = new RegisterMetrics(getSession(), new MeasuresDao(getSession()), null);
- loader.cleanAlerts();
-
- checkTables("cleanAlerts", "metrics", "alerts");
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.server.startup; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; +import org.sonar.api.measures.CoreMetrics; +import org.sonar.api.measures.Metric; +import org.sonar.jpa.dao.MeasuresDao; +import org.sonar.jpa.test.AbstractDbUnitTestCase; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class RegisterMetricsTest extends AbstractDbUnitTestCase { + + @Test + public void shouldSaveIfNew() { + setupData("shouldSaveIfNew"); + + Metric metric1 = new Metric("new1", "short1", "desc1", Metric.ValueType.FLOAT, 1, true, "domain1", false); + Metric metric2 = new Metric("new2", "short2", "desc2", Metric.ValueType.FLOAT, 1, true, "domain2", false); + RegisterMetrics synchronizer = new RegisterMetrics(getSession(), new MeasuresDao(getSession()), null); + synchronizer.register(Arrays.asList(metric1, metric2)); + checkTables("shouldSaveIfNew", "metrics"); + } + + @Test + public void shouldUpdateIfAlreadyExists() { + setupData("shouldUpdateIfAlreadyExists"); + + final List<Metric> metrics = new ArrayList<Metric>(); + metrics.add(new Metric("key", "new short name", "new description", Metric.ValueType.FLOAT, -1, true, "new domain", false)); + RegisterMetrics synchronizer = new RegisterMetrics(getSession(), new MeasuresDao(getSession()), null); + synchronizer.register(metrics); + + checkTables("shouldUpdateIfAlreadyExists", "metrics"); + } + + @Test + public void enableOnlyLoadedMetrics() throws SQLException { + setupData("enableOnlyLoadedMetrics"); + + RegisterMetrics loader = new RegisterMetrics(getSession(), new MeasuresDao(getSession()), null); + loader.start(); + + assertFalse(getDao().getMeasuresDao().getMetric("deprecated").getEnabled()); + assertTrue(getDao().getMeasuresDao().getMetric(CoreMetrics.COMPLEXITY).getEnabled()); + } + + @Test + public void cleanAlerts() throws SQLException { + setupData("cleanAlerts"); + + RegisterMetrics loader = new RegisterMetrics(getSession(), new MeasuresDao(getSession()), null); + loader.cleanAlerts(); + + checkTables("cleanAlerts", "metrics", "alerts"); + } +} diff --git a/sonar-server/src/test/java/org/sonar/server/startup/RegisterQualityModelsTest.java b/sonar-server/src/test/java/org/sonar/server/startup/RegisterQualityModelsTest.java index 002b2abff9a..8fb696d0d3d 100644 --- a/sonar-server/src/test/java/org/sonar/server/startup/RegisterQualityModelsTest.java +++ b/sonar-server/src/test/java/org/sonar/server/startup/RegisterQualityModelsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/startup/RegisterRulesTest.java b/sonar-server/src/test/java/org/sonar/server/startup/RegisterRulesTest.java index a43aa3403b1..f1bf19aa25d 100644 --- a/sonar-server/src/test/java/org/sonar/server/startup/RegisterRulesTest.java +++ b/sonar-server/src/test/java/org/sonar/server/startup/RegisterRulesTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/startup/ServerMetadataPersisterTest.java b/sonar-server/src/test/java/org/sonar/server/startup/ServerMetadataPersisterTest.java index 83e17f882ea..81ed38316dd 100644 --- a/sonar-server/src/test/java/org/sonar/server/startup/ServerMetadataPersisterTest.java +++ b/sonar-server/src/test/java/org/sonar/server/startup/ServerMetadataPersisterTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/ui/AuthenticatorFactoryTest.java b/sonar-server/src/test/java/org/sonar/server/ui/AuthenticatorFactoryTest.java index 6914c20cf80..81fc553cdfb 100644 --- a/sonar-server/src/test/java/org/sonar/server/ui/AuthenticatorFactoryTest.java +++ b/sonar-server/src/test/java/org/sonar/server/ui/AuthenticatorFactoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/ui/FakePage.java b/sonar-server/src/test/java/org/sonar/server/ui/FakePage.java index dbdf030aad9..8e9d9653bb2 100644 --- a/sonar-server/src/test/java/org/sonar/server/ui/FakePage.java +++ b/sonar-server/src/test/java/org/sonar/server/ui/FakePage.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/ui/FakeResourceViewer.java b/sonar-server/src/test/java/org/sonar/server/ui/FakeResourceViewer.java index a61d7c5168d..f4d85b8d458 100644 --- a/sonar-server/src/test/java/org/sonar/server/ui/FakeResourceViewer.java +++ b/sonar-server/src/test/java/org/sonar/server/ui/FakeResourceViewer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/ui/FakeWidget.java b/sonar-server/src/test/java/org/sonar/server/ui/FakeWidget.java index 04b1172e27b..787af528cfc 100644 --- a/sonar-server/src/test/java/org/sonar/server/ui/FakeWidget.java +++ b/sonar-server/src/test/java/org/sonar/server/ui/FakeWidget.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/ui/ViewProxyTest.java b/sonar-server/src/test/java/org/sonar/server/ui/ViewProxyTest.java index edc78acaafa..06c4ea36332 100644 --- a/sonar-server/src/test/java/org/sonar/server/ui/ViewProxyTest.java +++ b/sonar-server/src/test/java/org/sonar/server/ui/ViewProxyTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/test/java/org/sonar/server/ui/ViewsTest.java b/sonar-server/src/test/java/org/sonar/server/ui/ViewsTest.java index 69584d249f0..b05a115d532 100644 --- a/sonar-server/src/test/java/org/sonar/server/ui/ViewsTest.java +++ b/sonar-server/src/test/java/org/sonar/server/ui/ViewsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/Squid.java b/sonar-squid/src/main/java/org/sonar/squid/Squid.java index d1603ea5674..1702f6f23dd 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/Squid.java +++ b/sonar-squid/src/main/java/org/sonar/squid/Squid.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/AnalysisException.java b/sonar-squid/src/main/java/org/sonar/squid/api/AnalysisException.java index 604c28f0115..59bbdc1aaac 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/AnalysisException.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/AnalysisException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/CheckMessage.java b/sonar-squid/src/main/java/org/sonar/squid/api/CheckMessage.java index b20846371ba..8e5a73806c2 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/CheckMessage.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/CheckMessage.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/CodeCheck.java b/sonar-squid/src/main/java/org/sonar/squid/api/CodeCheck.java index aaaeeab9f1f..7661e65cb99 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/CodeCheck.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/CodeCheck.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/CodeScanner.java b/sonar-squid/src/main/java/org/sonar/squid/api/CodeScanner.java index 0d7a84d70a8..4fa27464295 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/CodeScanner.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/CodeScanner.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/CodeVisitor.java b/sonar-squid/src/main/java/org/sonar/squid/api/CodeVisitor.java index 63fde3442cf..399cb269c8d 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/CodeVisitor.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/CodeVisitor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/Query.java b/sonar-squid/src/main/java/org/sonar/squid/api/Query.java index e7e8f19fcb9..daf3a8c85c8 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/Query.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/Query.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/SourceClass.java b/sonar-squid/src/main/java/org/sonar/squid/api/SourceClass.java index 7badb42ea43..6e5794e78bc 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/SourceClass.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/SourceClass.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/SourceCode.java b/sonar-squid/src/main/java/org/sonar/squid/api/SourceCode.java index cbadf4d6a05..4114818c0e7 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/SourceCode.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/SourceCode.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeEdge.java b/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeEdge.java index 322a6d3e640..521d53804dc 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeEdge.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeEdge.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeEdgeUsage.java b/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeEdgeUsage.java index fba1e56a8d1..68a2db44ec0 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeEdgeUsage.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeEdgeUsage.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeIndexer.java b/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeIndexer.java index 3eadd2e4862..2a756c52a0b 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeIndexer.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeIndexer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeSearchEngine.java b/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeSearchEngine.java index 2f9c682d1a2..15315051463 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeSearchEngine.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeSearchEngine.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeTreeDecorator.java b/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeTreeDecorator.java index 397a5de6fee..8035f90ec2d 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeTreeDecorator.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeTreeDecorator.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/SourceFile.java b/sonar-squid/src/main/java/org/sonar/squid/api/SourceFile.java index c80f59d1075..b9355b88a48 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/SourceFile.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/SourceFile.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/SourceFunction.java b/sonar-squid/src/main/java/org/sonar/squid/api/SourceFunction.java index 29f0c0116ed..5b4aac73776 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/SourceFunction.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/SourceFunction.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/SourceMethod.java b/sonar-squid/src/main/java/org/sonar/squid/api/SourceMethod.java index f41ace8aea1..e22e7ade5b2 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/SourceMethod.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/SourceMethod.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/SourcePackage.java b/sonar-squid/src/main/java/org/sonar/squid/api/SourcePackage.java index 469b46b71a8..22f6fa45a3e 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/SourcePackage.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/SourcePackage.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/SourceProject.java b/sonar-squid/src/main/java/org/sonar/squid/api/SourceProject.java index 9d627c641ce..d2a75d95208 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/SourceProject.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/SourceProject.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/SquidConfiguration.java b/sonar-squid/src/main/java/org/sonar/squid/api/SquidConfiguration.java index eb8e4820e7e..4a414c39d17 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/SquidConfiguration.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/SquidConfiguration.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByMeasure.java b/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByMeasure.java index df1bfebcd79..4afdc7196e6 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByMeasure.java +++ b/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByMeasure.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByName.java b/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByName.java index 9c657661653..9be2fa8213f 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByName.java +++ b/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByName.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByParent.java b/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByParent.java index f902ee403b7..b5624ccd561 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByParent.java +++ b/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByParent.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByType.java b/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByType.java index 7b829f9285c..a476ff885fa 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByType.java +++ b/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByType.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/indexer/SquidIndex.java b/sonar-squid/src/main/java/org/sonar/squid/indexer/SquidIndex.java index 31369bfafff..36eb1bc2164 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/indexer/SquidIndex.java +++ b/sonar-squid/src/main/java/org/sonar/squid/indexer/SquidIndex.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/math/MeasuresDistribution.java b/sonar-squid/src/main/java/org/sonar/squid/math/MeasuresDistribution.java index 802e6900159..b7207a1fb5e 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/math/MeasuresDistribution.java +++ b/sonar-squid/src/main/java/org/sonar/squid/math/MeasuresDistribution.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/measures/AbstractnessFormula.java b/sonar-squid/src/main/java/org/sonar/squid/measures/AbstractnessFormula.java index 5ce74aa0fe9..7d6c100c53d 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/measures/AbstractnessFormula.java +++ b/sonar-squid/src/main/java/org/sonar/squid/measures/AbstractnessFormula.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/measures/AggregationFormula.java b/sonar-squid/src/main/java/org/sonar/squid/measures/AggregationFormula.java index 81d9b1b0d50..852305ab37c 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/measures/AggregationFormula.java +++ b/sonar-squid/src/main/java/org/sonar/squid/measures/AggregationFormula.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/measures/CalculatedMetricFormula.java b/sonar-squid/src/main/java/org/sonar/squid/measures/CalculatedMetricFormula.java index bb58954f779..d1e92e16ff4 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/measures/CalculatedMetricFormula.java +++ b/sonar-squid/src/main/java/org/sonar/squid/measures/CalculatedMetricFormula.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/measures/CommentLinesDensityFormula.java b/sonar-squid/src/main/java/org/sonar/squid/measures/CommentLinesDensityFormula.java index 5444d2aa5bc..69d6128ccf1 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/measures/CommentLinesDensityFormula.java +++ b/sonar-squid/src/main/java/org/sonar/squid/measures/CommentLinesDensityFormula.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/measures/CommentLinesWithoutHeaderFormula.java b/sonar-squid/src/main/java/org/sonar/squid/measures/CommentLinesWithoutHeaderFormula.java index 90959f8ca74..98a7e543856 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/measures/CommentLinesWithoutHeaderFormula.java +++ b/sonar-squid/src/main/java/org/sonar/squid/measures/CommentLinesWithoutHeaderFormula.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/measures/DistanceFormula.java b/sonar-squid/src/main/java/org/sonar/squid/measures/DistanceFormula.java index f9779a029e6..d51ff6a9c39 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/measures/DistanceFormula.java +++ b/sonar-squid/src/main/java/org/sonar/squid/measures/DistanceFormula.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/measures/InstabilityFormula.java b/sonar-squid/src/main/java/org/sonar/squid/measures/InstabilityFormula.java index 86e7ff6bd63..7b77696c6a0 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/measures/InstabilityFormula.java +++ b/sonar-squid/src/main/java/org/sonar/squid/measures/InstabilityFormula.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/measures/MeanAggregationFormula.java b/sonar-squid/src/main/java/org/sonar/squid/measures/MeanAggregationFormula.java index 7017c9bc8d8..37020ddcbd4 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/measures/MeanAggregationFormula.java +++ b/sonar-squid/src/main/java/org/sonar/squid/measures/MeanAggregationFormula.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/measures/Measurable.java b/sonar-squid/src/main/java/org/sonar/squid/measures/Measurable.java index 49faa0e6aab..57093055ff2 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/measures/Measurable.java +++ b/sonar-squid/src/main/java/org/sonar/squid/measures/Measurable.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/measures/Measures.java b/sonar-squid/src/main/java/org/sonar/squid/measures/Measures.java index 9ee58e5e5e5..901d846136e 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/measures/Measures.java +++ b/sonar-squid/src/main/java/org/sonar/squid/measures/Measures.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/measures/Metric.java b/sonar-squid/src/main/java/org/sonar/squid/measures/Metric.java index 327abeb9e8a..2be2a54b79e 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/measures/Metric.java +++ b/sonar-squid/src/main/java/org/sonar/squid/measures/Metric.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/measures/MetricDef.java b/sonar-squid/src/main/java/org/sonar/squid/measures/MetricDef.java index cc62b45dc43..e7e23e85cf8 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/measures/MetricDef.java +++ b/sonar-squid/src/main/java/org/sonar/squid/measures/MetricDef.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/measures/NoAggregationFormula.java b/sonar-squid/src/main/java/org/sonar/squid/measures/NoAggregationFormula.java index a1adb586ed8..7fa7fdd0a1d 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/measures/NoAggregationFormula.java +++ b/sonar-squid/src/main/java/org/sonar/squid/measures/NoAggregationFormula.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/measures/PublicDocumentedApiDensityFormula.java b/sonar-squid/src/main/java/org/sonar/squid/measures/PublicDocumentedApiDensityFormula.java index 34f6f2c6b24..90c4991019c 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/measures/PublicDocumentedApiDensityFormula.java +++ b/sonar-squid/src/main/java/org/sonar/squid/measures/PublicDocumentedApiDensityFormula.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/measures/SumAggregationFormula.java b/sonar-squid/src/main/java/org/sonar/squid/measures/SumAggregationFormula.java index a66753a436e..dedb31442e6 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/measures/SumAggregationFormula.java +++ b/sonar-squid/src/main/java/org/sonar/squid/measures/SumAggregationFormula.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/recognizer/CamelCaseDetector.java b/sonar-squid/src/main/java/org/sonar/squid/recognizer/CamelCaseDetector.java index 665a0c7e416..d322a141cdd 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/recognizer/CamelCaseDetector.java +++ b/sonar-squid/src/main/java/org/sonar/squid/recognizer/CamelCaseDetector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/recognizer/CodeRecognizer.java b/sonar-squid/src/main/java/org/sonar/squid/recognizer/CodeRecognizer.java index 12e6324f305..37c859db83a 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/recognizer/CodeRecognizer.java +++ b/sonar-squid/src/main/java/org/sonar/squid/recognizer/CodeRecognizer.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/recognizer/ContainsDetector.java b/sonar-squid/src/main/java/org/sonar/squid/recognizer/ContainsDetector.java index a0616a13175..bcf8f276bda 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/recognizer/ContainsDetector.java +++ b/sonar-squid/src/main/java/org/sonar/squid/recognizer/ContainsDetector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/recognizer/Detector.java b/sonar-squid/src/main/java/org/sonar/squid/recognizer/Detector.java index 95a4db2dab0..07eb2113d0e 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/recognizer/Detector.java +++ b/sonar-squid/src/main/java/org/sonar/squid/recognizer/Detector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/recognizer/EndWithDetector.java b/sonar-squid/src/main/java/org/sonar/squid/recognizer/EndWithDetector.java index 0b3cbe7a20c..eb89d482d7e 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/recognizer/EndWithDetector.java +++ b/sonar-squid/src/main/java/org/sonar/squid/recognizer/EndWithDetector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/recognizer/KeywordsDetector.java b/sonar-squid/src/main/java/org/sonar/squid/recognizer/KeywordsDetector.java index 490c321a8c0..2c173359fa0 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/recognizer/KeywordsDetector.java +++ b/sonar-squid/src/main/java/org/sonar/squid/recognizer/KeywordsDetector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/recognizer/LanguageFootprint.java b/sonar-squid/src/main/java/org/sonar/squid/recognizer/LanguageFootprint.java index 1d817ee11fc..a583fd94975 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/recognizer/LanguageFootprint.java +++ b/sonar-squid/src/main/java/org/sonar/squid/recognizer/LanguageFootprint.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/recognizer/RegexDetector.java b/sonar-squid/src/main/java/org/sonar/squid/recognizer/RegexDetector.java index 304d9991a58..d962cc11273 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/recognizer/RegexDetector.java +++ b/sonar-squid/src/main/java/org/sonar/squid/recognizer/RegexDetector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/text/Line.java b/sonar-squid/src/main/java/org/sonar/squid/text/Line.java index 77add8235a4..86bad4bceb6 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/text/Line.java +++ b/sonar-squid/src/main/java/org/sonar/squid/text/Line.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/text/LineContextHandler.java b/sonar-squid/src/main/java/org/sonar/squid/text/LineContextHandler.java index 3cf490600a6..27a7bcbfc1e 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/text/LineContextHandler.java +++ b/sonar-squid/src/main/java/org/sonar/squid/text/LineContextHandler.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/text/LinesFactory.java b/sonar-squid/src/main/java/org/sonar/squid/text/LinesFactory.java index 3314b5f953b..b8d14406a2c 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/text/LinesFactory.java +++ b/sonar-squid/src/main/java/org/sonar/squid/text/LinesFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/text/LiteralValueHandler.java b/sonar-squid/src/main/java/org/sonar/squid/text/LiteralValueHandler.java index 802a421c35f..3ac2ef79103 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/text/LiteralValueHandler.java +++ b/sonar-squid/src/main/java/org/sonar/squid/text/LiteralValueHandler.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/text/MultiLinesCommentHandler.java b/sonar-squid/src/main/java/org/sonar/squid/text/MultiLinesCommentHandler.java index 1fa85a44d0b..f20026c9556 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/text/MultiLinesCommentHandler.java +++ b/sonar-squid/src/main/java/org/sonar/squid/text/MultiLinesCommentHandler.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/text/SingleLineCommentHandler.java b/sonar-squid/src/main/java/org/sonar/squid/text/SingleLineCommentHandler.java index c9b2e9cabae..2ca916bdabd 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/text/SingleLineCommentHandler.java +++ b/sonar-squid/src/main/java/org/sonar/squid/text/SingleLineCommentHandler.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/text/Source.java b/sonar-squid/src/main/java/org/sonar/squid/text/Source.java index aab0d1ba237..8e6b51b4714 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/text/Source.java +++ b/sonar-squid/src/main/java/org/sonar/squid/text/Source.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/main/java/org/sonar/squid/text/StringArrayReader.java b/sonar-squid/src/main/java/org/sonar/squid/text/StringArrayReader.java index e079e427057..66c82baa972 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/text/StringArrayReader.java +++ b/sonar-squid/src/main/java/org/sonar/squid/text/StringArrayReader.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/api/CheckMessageTest.java b/sonar-squid/src/test/java/org/sonar/squid/api/CheckMessageTest.java index 6c2a6e6d43e..4d8ba3f215b 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/api/CheckMessageTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/api/CheckMessageTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/api/SourceCodeTest.java b/sonar-squid/src/test/java/org/sonar/squid/api/SourceCodeTest.java index 9e71cf712f0..74fe2429e5f 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/api/SourceCodeTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/api/SourceCodeTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/api/SourceCodeTreeDecoratorTest.java b/sonar-squid/src/test/java/org/sonar/squid/api/SourceCodeTreeDecoratorTest.java index 6e1b1e705a7..3ed753159a0 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/api/SourceCodeTreeDecoratorTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/api/SourceCodeTreeDecoratorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/api/SourceFileTest.java b/sonar-squid/src/test/java/org/sonar/squid/api/SourceFileTest.java index 8508dcca691..66bffdbc02b 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/api/SourceFileTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/api/SourceFileTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/api/SourceMethodTest.java b/sonar-squid/src/test/java/org/sonar/squid/api/SourceMethodTest.java index b71bb5ffd25..86c8f599786 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/api/SourceMethodTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/api/SourceMethodTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/indexer/SquidIndexTest.java b/sonar-squid/src/test/java/org/sonar/squid/indexer/SquidIndexTest.java index c8fe1b30d86..1d9a18cbf18 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/indexer/SquidIndexTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/indexer/SquidIndexTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/math/MeasuresDistributionTest.java b/sonar-squid/src/test/java/org/sonar/squid/math/MeasuresDistributionTest.java index cfdd027b538..64b36b5e973 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/math/MeasuresDistributionTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/math/MeasuresDistributionTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/measures/AbstractnessFormulaTest.java b/sonar-squid/src/test/java/org/sonar/squid/measures/AbstractnessFormulaTest.java index c33e2cdeac4..2269f947ae4 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/measures/AbstractnessFormulaTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/measures/AbstractnessFormulaTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/measures/CommentLinesDensityFormulaTest.java b/sonar-squid/src/test/java/org/sonar/squid/measures/CommentLinesDensityFormulaTest.java index 885c3ca05d2..518ca01772b 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/measures/CommentLinesDensityFormulaTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/measures/CommentLinesDensityFormulaTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/measures/CommentLinesWithoutHeaderFormulaTest.java b/sonar-squid/src/test/java/org/sonar/squid/measures/CommentLinesWithoutHeaderFormulaTest.java index 1731d094f3c..66f7f48b2f2 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/measures/CommentLinesWithoutHeaderFormulaTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/measures/CommentLinesWithoutHeaderFormulaTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/measures/DistanceFormulaTest.java b/sonar-squid/src/test/java/org/sonar/squid/measures/DistanceFormulaTest.java index 5ef13c813d4..bf5d0714a0e 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/measures/DistanceFormulaTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/measures/DistanceFormulaTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/measures/InstabilityFormulaTest.java b/sonar-squid/src/test/java/org/sonar/squid/measures/InstabilityFormulaTest.java index 932b23644b4..849b10c4ecd 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/measures/InstabilityFormulaTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/measures/InstabilityFormulaTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/measures/MeanAggregationFormulaTest.java b/sonar-squid/src/test/java/org/sonar/squid/measures/MeanAggregationFormulaTest.java index 9fe3fea8338..24dfa9240f2 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/measures/MeanAggregationFormulaTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/measures/MeanAggregationFormulaTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/measures/MeasuresTest.java b/sonar-squid/src/test/java/org/sonar/squid/measures/MeasuresTest.java index 9712fb8dea9..6acf31ecf27 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/measures/MeasuresTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/measures/MeasuresTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/measures/PublicDocumentedApiDensityFormulaTest.java b/sonar-squid/src/test/java/org/sonar/squid/measures/PublicDocumentedApiDensityFormulaTest.java index c27defbd260..56334ef3e11 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/measures/PublicDocumentedApiDensityFormulaTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/measures/PublicDocumentedApiDensityFormulaTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/measures/SumAggregationFormulaTest.java b/sonar-squid/src/test/java/org/sonar/squid/measures/SumAggregationFormulaTest.java index 10f74336a1c..095b4a26258 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/measures/SumAggregationFormulaTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/measures/SumAggregationFormulaTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/recognizer/CamelCaseDetectorTest.java b/sonar-squid/src/test/java/org/sonar/squid/recognizer/CamelCaseDetectorTest.java index a30031de250..5f0062b40fe 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/recognizer/CamelCaseDetectorTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/recognizer/CamelCaseDetectorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/recognizer/ContainsDetectorTest.java b/sonar-squid/src/test/java/org/sonar/squid/recognizer/ContainsDetectorTest.java index 297dc6aa311..237879579e5 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/recognizer/ContainsDetectorTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/recognizer/ContainsDetectorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/recognizer/EndWithDetectorTest.java b/sonar-squid/src/test/java/org/sonar/squid/recognizer/EndWithDetectorTest.java index 87e64bf27be..d4b7ed64bf0 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/recognizer/EndWithDetectorTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/recognizer/EndWithDetectorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/recognizer/KeywordsDetectorTest.java b/sonar-squid/src/test/java/org/sonar/squid/recognizer/KeywordsDetectorTest.java index 59c9ad20b5b..cff651bc491 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/recognizer/KeywordsDetectorTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/recognizer/KeywordsDetectorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/recognizer/RegexDetectorTest.java b/sonar-squid/src/test/java/org/sonar/squid/recognizer/RegexDetectorTest.java index baa54880b39..61abb7a0357 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/recognizer/RegexDetectorTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/recognizer/RegexDetectorTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/text/JavaFootprint.java b/sonar-squid/src/test/java/org/sonar/squid/text/JavaFootprint.java index 847cf7d54f3..728e67de9dd 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/text/JavaFootprint.java +++ b/sonar-squid/src/test/java/org/sonar/squid/text/JavaFootprint.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/text/LineTest.java b/sonar-squid/src/test/java/org/sonar/squid/text/LineTest.java index def19bedb2d..17e529fd135 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/text/LineTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/text/LineTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/text/LinesFactoryTest.java b/sonar-squid/src/test/java/org/sonar/squid/text/LinesFactoryTest.java index 4fd09f00981..6d43a7f02a3 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/text/LinesFactoryTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/text/LinesFactoryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/text/LiteralValueHandlerTest.java b/sonar-squid/src/test/java/org/sonar/squid/text/LiteralValueHandlerTest.java index aceab76bc8b..6b197c0e5e0 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/text/LiteralValueHandlerTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/text/LiteralValueHandlerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/text/MultiLineCommentHandlerTest.java b/sonar-squid/src/test/java/org/sonar/squid/text/MultiLineCommentHandlerTest.java index 9091ce87e9d..37cdcdb725d 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/text/MultiLineCommentHandlerTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/text/MultiLineCommentHandlerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/text/SingleLineCommentHandlerTest.java b/sonar-squid/src/test/java/org/sonar/squid/text/SingleLineCommentHandlerTest.java index 940ab4aaf4b..e4c2da9efcc 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/text/SingleLineCommentHandlerTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/text/SingleLineCommentHandlerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/text/SourceTest.java b/sonar-squid/src/test/java/org/sonar/squid/text/SourceTest.java index 78264e00598..9db93057c1a 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/text/SourceTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/text/SourceTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-squid/src/test/java/org/sonar/squid/text/StringArrayReaderTest.java b/sonar-squid/src/test/java/org/sonar/squid/text/StringArrayReaderTest.java index 4afb0209580..889c2f3702b 100644 --- a/sonar-squid/src/test/java/org/sonar/squid/text/StringArrayReaderTest.java +++ b/sonar-squid/src/test/java/org/sonar/squid/text/StringArrayReaderTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/TestUtils.java b/sonar-testing-harness/src/main/java/org/sonar/test/TestUtils.java index 221684b9fa5..302d78538bc 100644 --- a/sonar-testing-harness/src/main/java/org/sonar/test/TestUtils.java +++ b/sonar-testing-harness/src/main/java/org/sonar/test/TestUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/channel/ChannelMatcher.java b/sonar-testing-harness/src/main/java/org/sonar/test/channel/ChannelMatcher.java index 88e03987f0d..d331f2be923 100644 --- a/sonar-testing-harness/src/main/java/org/sonar/test/channel/ChannelMatcher.java +++ b/sonar-testing-harness/src/main/java/org/sonar/test/channel/ChannelMatcher.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/channel/ChannelMatchers.java b/sonar-testing-harness/src/main/java/org/sonar/test/channel/ChannelMatchers.java index ab29167ae65..b434cefe23a 100644 --- a/sonar-testing-harness/src/main/java/org/sonar/test/channel/ChannelMatchers.java +++ b/sonar-testing-harness/src/main/java/org/sonar/test/channel/ChannelMatchers.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/channel/ReaderHasNextCharMatcher.java b/sonar-testing-harness/src/main/java/org/sonar/test/channel/ReaderHasNextCharMatcher.java index df4152c32b2..c92be0960aa 100644 --- a/sonar-testing-harness/src/main/java/org/sonar/test/channel/ReaderHasNextCharMatcher.java +++ b/sonar-testing-harness/src/main/java/org/sonar/test/channel/ReaderHasNextCharMatcher.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-testing-harness/src/test/java/org/sonar/test/TestUtilsTest.java b/sonar-testing-harness/src/test/java/org/sonar/test/TestUtilsTest.java index f0cefec7c38..63ac2f6336f 100644 --- a/sonar-testing-harness/src/test/java/org/sonar/test/TestUtilsTest.java +++ b/sonar-testing-harness/src/test/java/org/sonar/test/TestUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-testing-harness/src/test/java/org/sonar/test/channel/ChannelMatchersTest.java b/sonar-testing-harness/src/test/java/org/sonar/test/channel/ChannelMatchersTest.java index 0afd4f28c55..d3b8dc0095f 100644 --- a/sonar-testing-harness/src/test/java/org/sonar/test/channel/ChannelMatchersTest.java +++ b/sonar-testing-harness/src/test/java/org/sonar/test/channel/ChannelMatchersTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/Host.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/Host.java index b2beaad138b..d9349f08212 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/Host.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/Host.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/JdkUtils.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/JdkUtils.java index d1f21e42646..1683eba4dbc 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/JdkUtils.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/JdkUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/Sonar.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/Sonar.java index 3f5fbf129cc..6426f58d78b 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/Sonar.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/Sonar.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/ConnectionException.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/ConnectionException.java index 370fe02c533..c814642196a 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/ConnectionException.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/ConnectionException.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/Connector.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/Connector.java index c7e2176029b..105bdbafbdc 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/Connector.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/Connector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/ConnectorFactory.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/ConnectorFactory.java index e47ffa144d4..a863742aaf1 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/ConnectorFactory.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/ConnectorFactory.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient3Connector.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient3Connector.java index 34c8c795f3c..94cf646b6c9 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient3Connector.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient3Connector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient4Connector.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient4Connector.java index 8cb372d284c..d85796ebc55 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient4Connector.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient4Connector.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/AbstractQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/AbstractQuery.java index 4ceb4443aa1..923830480e4 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/AbstractQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/AbstractQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/CreateQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/CreateQuery.java index f43200604d8..29e4672f51b 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/CreateQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/CreateQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/DeleteQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/DeleteQuery.java index 0126452bfa7..5a3df918436 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/DeleteQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/DeleteQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Dependency.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Dependency.java index e6d84d6a1f1..b7aebd57ca1 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Dependency.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Dependency.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/DependencyQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/DependencyQuery.java index 7d5f10601d5..65e4447c7f2 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/DependencyQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/DependencyQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/DependencyTree.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/DependencyTree.java index 86c3eb377a4..b3448f3154e 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/DependencyTree.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/DependencyTree.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/DependencyTreeQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/DependencyTreeQuery.java index b5dad433259..27e25081a52 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/DependencyTreeQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/DependencyTreeQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Event.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Event.java index e2181170655..c18fc3e0537 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Event.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Event.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/EventCreateQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/EventCreateQuery.java index 9c3e1e3231a..1e8bffc023a 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/EventCreateQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/EventCreateQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/EventQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/EventQuery.java index 3e7dfdbe809..f0c495072be 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/EventQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/EventQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Favourite.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Favourite.java index 67917846984..632080401db 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Favourite.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Favourite.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/FavouriteCreateQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/FavouriteCreateQuery.java index 62484b1c17e..9ec9958e3ec 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/FavouriteCreateQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/FavouriteCreateQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/FavouriteDeleteQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/FavouriteDeleteQuery.java index f11702f587d..b1d64eaca7b 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/FavouriteDeleteQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/FavouriteDeleteQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/FavouriteQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/FavouriteQuery.java index 314389e8fa4..5098e0a8641 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/FavouriteQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/FavouriteQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Measure.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Measure.java index 7679100cd56..8327d9d8eef 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Measure.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Measure.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Metric.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Metric.java index 07ede19e5db..5d644058419 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Metric.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Metric.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/MetricQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/MetricQuery.java index 6870cde0da8..708d4836639 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/MetricQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/MetricQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Model.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Model.java index 3f864877549..0a745d65a48 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Model.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Model.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Plugin.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Plugin.java index 9ee0569b376..5c945ce6205 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Plugin.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Plugin.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Property.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Property.java index fd86599c106..9d4a6a67c85 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Property.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Property.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyCreateQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyCreateQuery.java index d1d2921d10c..2a1f9d46514 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyCreateQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyCreateQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyDeleteQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyDeleteQuery.java index 07c6a193f10..316059671c4 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyDeleteQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyDeleteQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyQuery.java index 8fa3a95ea9d..d4dbbfd2d54 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyUpdateQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyUpdateQuery.java index f66583fbe9f..749870393ce 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyUpdateQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyUpdateQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Query.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Query.java index 345fc109cc3..9189b4c283b 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Query.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Query.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Resource.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Resource.java index 6df1d4d744b..aad1808a5f1 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Resource.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Resource.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ResourceQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ResourceQuery.java index ee8fc17f77a..b8f0b319356 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ResourceQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ResourceQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Rule.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Rule.java index c639d8b331a..9407dd776cf 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Rule.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Rule.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/RuleParam.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/RuleParam.java index 7ef61cf2fea..6b97ceae574 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/RuleParam.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/RuleParam.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/RuleQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/RuleQuery.java index 181ab9810b4..027b59e0156 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/RuleQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/RuleQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Server.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Server.java index 7967a348ce5..e3258eb1c3c 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Server.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Server.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ServerQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ServerQuery.java index ef88ed16df6..37ae59e6a71 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ServerQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ServerQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Source.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Source.java index b703f725c89..a7997a3c532 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Source.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Source.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/SourceQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/SourceQuery.java index 2d79d662640..d4c9070fa34 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/SourceQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/SourceQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachine.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachine.java index fc859009ea0..67cf0e2f6cb 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachine.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachine.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineCell.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineCell.java index 3f3beb188cf..c3069be8ff7 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineCell.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineCell.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineColumn.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineColumn.java index 1d9bd009e36..321a468aa75 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineColumn.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineColumn.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineQuery.java index 04fa7c4ea8f..c965edef6d6 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UpdateCenterQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UpdateCenterQuery.java index 78791240c1e..daef570e499 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UpdateCenterQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UpdateCenterQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UpdateQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UpdateQuery.java index 3676a927a30..1e21bf0a860 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UpdateQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UpdateQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UserPropertyCreateQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UserPropertyCreateQuery.java index baeba6806f7..b1a6edf1bd6 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UserPropertyCreateQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UserPropertyCreateQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UserPropertyDeleteQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UserPropertyDeleteQuery.java index 4d3a3161539..972cc8d4e34 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UserPropertyDeleteQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UserPropertyDeleteQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UserPropertyQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UserPropertyQuery.java index d52b08f3fcf..999375228d4 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UserPropertyQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/UserPropertyQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java index 3484e4d03cb..f993b14321f 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ViolationQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ViolationQuery.java index 1288dfc9d2e..0fc6d244d57 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ViolationQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ViolationQuery.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/WSUtils.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/WSUtils.java index 8119bacee8c..6afab73fb9d 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/WSUtils.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/WSUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/AbstractUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/AbstractUnmarshaller.java index 13ddb93409d..ccfbad6bbf3 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/AbstractUnmarshaller.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/AbstractUnmarshaller.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/DependencyTreeUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/DependencyTreeUnmarshaller.java index f91b8af085d..76735bd0bcf 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/DependencyTreeUnmarshaller.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/DependencyTreeUnmarshaller.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/DependencyUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/DependencyUnmarshaller.java index bf8b19db704..c48ac4b0ea0 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/DependencyUnmarshaller.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/DependencyUnmarshaller.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/EventUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/EventUnmarshaller.java index adff1c0f2db..11bbfc72c19 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/EventUnmarshaller.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/EventUnmarshaller.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/FavouriteUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/FavouriteUnmarshaller.java index 1d40609208e..9bda442bb4c 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/FavouriteUnmarshaller.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/FavouriteUnmarshaller.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/JsonUtils.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/JsonUtils.java index 8a7092741a7..008eddc2539 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/JsonUtils.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/JsonUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/MetricUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/MetricUnmarshaller.java index 123e94583c1..65af95a3c3b 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/MetricUnmarshaller.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/MetricUnmarshaller.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/PluginUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/PluginUnmarshaller.java index 6d688870dee..d3b0917de24 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/PluginUnmarshaller.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/PluginUnmarshaller.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/PropertyUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/PropertyUnmarshaller.java index 5efea1ca841..2659ea1286f 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/PropertyUnmarshaller.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/PropertyUnmarshaller.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshaller.java index bdb9db20e17..e322ac458f2 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshaller.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshaller.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/RuleUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/RuleUnmarshaller.java index 9cb3b12f56e..4d9c391f7d4 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/RuleUnmarshaller.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/RuleUnmarshaller.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ServerUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ServerUnmarshaller.java index 829b174dc47..3379f232920 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ServerUnmarshaller.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ServerUnmarshaller.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/SourceUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/SourceUnmarshaller.java index 16eb4aff98d..1cc92edc100 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/SourceUnmarshaller.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/SourceUnmarshaller.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshaller.java index 08a0ac26d87..dfd0769cdf4 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshaller.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshaller.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/Unmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/Unmarshaller.java index bed74add09a..b3a51749daf 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/Unmarshaller.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/Unmarshaller.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/Unmarshallers.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/Unmarshallers.java index ece84d4e2b3..a97d7a45cca 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/Unmarshallers.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/Unmarshallers.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java index 18c297b22cb..0df77ae74fc 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/EmptyServlet.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/EmptyServlet.java index d4c74cdb08b..741347a33bf 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/EmptyServlet.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/EmptyServlet.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/MetricServlet.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/MetricServlet.java index b81c6dcbfa3..f7060438e8a 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/MetricServlet.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/MetricServlet.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/ServerServlet.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/ServerServlet.java index 48cd7636977..2dce64af803 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/ServerServlet.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/ServerServlet.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java index 5546dde1910..1794466a5e2 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AbstractQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AbstractQueryTest.java index 4646b43ffe3..76e73b8832d 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AbstractQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AbstractQueryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/DependencyQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/DependencyQueryTest.java index 291c3a00d6d..b19568040de 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/DependencyQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/DependencyQueryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/EventQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/EventQueryTest.java index b3a4eb62270..332d1eb966b 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/EventQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/EventQueryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MeasureTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MeasureTest.java index a466a515484..1cb9a9b1dfc 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MeasureTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MeasureTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricQueryTest.java index 01eeaa93384..3b9690dc43d 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricQueryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyCreateQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyCreateQueryTest.java index c465af21b5e..9d1c321648a 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyCreateQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyCreateQueryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyDeleteQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyDeleteQueryTest.java index d55babe0831..0c9b7484cd5 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyDeleteQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyDeleteQueryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyQueryTest.java index 66e6f6e3b29..4c1e5cc15f2 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyQueryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceQueryTest.java index 6581518d4bf..6d9b506bbb4 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceQueryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceTest.java index 0d28f9cd1e1..cba51079c58 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/RuleQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/RuleQueryTest.java index 92bcd40f30f..14ed894a277 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/RuleQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/RuleQueryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ServerQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ServerQueryTest.java index e4ac4b68445..6f93db0171c 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ServerQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ServerQueryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/SourceQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/SourceQueryTest.java index 51dfc9bd34b..710296c201f 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/SourceQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/SourceQueryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/TimeMachineQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/TimeMachineQueryTest.java index 236e80a44eb..cd20be13f04 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/TimeMachineQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/TimeMachineQueryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UpdateCenterQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UpdateCenterQueryTest.java index 633dbca9a17..c0d51e18191 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UpdateCenterQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UpdateCenterQueryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyCreateQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyCreateQueryTest.java index b2e1f16353f..ad60316a29f 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyCreateQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyCreateQueryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyDeleteQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyDeleteQueryTest.java index f29462123d6..4978ff2d739 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyDeleteQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyDeleteQueryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ViolationQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ViolationQueryTest.java index 881a113aeb6..818ad935c3f 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ViolationQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ViolationQueryTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyTreeUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyTreeUnmarshallerTest.java index b96defeba12..b2d47e09e36 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyTreeUnmarshallerTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyTreeUnmarshallerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyUnmarshallerTest.java index 1ad4d090a2a..cef3497e56d 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyUnmarshallerTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyUnmarshallerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/EventUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/EventUnmarshallerTest.java index b5c19029f0b..4fa2314fa46 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/EventUnmarshallerTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/EventUnmarshallerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/JsonUtilsTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/JsonUtilsTest.java index ef2e1c3aaf0..d14fc150b38 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/JsonUtilsTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/JsonUtilsTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/MetricUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/MetricUnmarshallerTest.java index 0eb4ff65fa7..333f78a4703 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/MetricUnmarshallerTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/MetricUnmarshallerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PluginUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PluginUnmarshallerTest.java index dc2391e8232..7a920dd3ec3 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PluginUnmarshallerTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PluginUnmarshallerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PropertyUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PropertyUnmarshallerTest.java index 9ffb0de4b8c..0a32fb793f8 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PropertyUnmarshallerTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PropertyUnmarshallerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshallerTest.java index acfda91f3e5..ef98b1a58e9 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshallerTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshallerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/RuleUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/RuleUnmarshallerTest.java index 6f75b766871..d2743dfee2f 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/RuleUnmarshallerTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/RuleUnmarshallerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ServerUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ServerUnmarshallerTest.java index c6936bc56a5..5be4a318096 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ServerUnmarshallerTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ServerUnmarshallerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/SourceUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/SourceUnmarshallerTest.java index b97d71c216f..857d0a936dc 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/SourceUnmarshallerTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/SourceUnmarshallerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or @@ -35,7 +35,7 @@ public class SourceUnmarshallerTest extends UnmarshallerTestCase { source = new SourceUnmarshaller().toModel(loadFile("/sources/source.json")); assertThat(source.getLines().size(), is(236)); - assertThat(source.getLine(3), is(" * Copyright (C) 2009 SonarSource SA")); + assertThat(source.getLine(3), is(" * Copyright (C) 2008-2011 SonarSource")); } @Test @@ -43,7 +43,7 @@ public class SourceUnmarshallerTest extends UnmarshallerTestCase { Source source = new SourceUnmarshaller().toModel(loadFile("/sources/from_line_to_line.json")); assertThat(source.getLines().size(), is(15)); assertThat(source.getLine(1), nullValue()); - assertThat(source.getLine(3), is(" * Copyright (C) 2009 SonarSource SA")); + assertThat(source.getLine(3), is(" * Copyright (C) 2008-2011 SonarSource")); } } diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshallerTest.java index bad185a6b79..d900019bf72 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshallerTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshallerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallerTestCase.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallerTestCase.java index b070e5b5d6e..ef5f03afa67 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallerTestCase.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallerTestCase.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallersTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallersTest.java index f37add54159..0f1e3094e9d 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallersTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallersTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java index fd83fcca74b..614ed46b79f 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/sonar-ws-client/src/test/resources/sources/from_line_to_line.json b/sonar-ws-client/src/test/resources/sources/from_line_to_line.json index c4c7ed00509..04f3ca9bd64 100644 --- a/sonar-ws-client/src/test/resources/sources/from_line_to_line.json +++ b/sonar-ws-client/src/test/resources/sources/from_line_to_line.json @@ -1 +1 @@ -[{"3":" * Copyright (C) 2009 SonarSource SA","4":" * mailto:contact AT sonarsource DOT com","5":" *","6":" * Sonar is free software; you can redistribute it and\/or","7":" * modify it under the terms of the GNU Lesser General Public","8":" * License as published by the Free Software Foundation; either","9":" * version 3 of the License, or (at your option) any later version.","10":" *","11":" * Sonar is distributed in the hope that it will be useful,","12":" * but WITHOUT ANY WARRANTY; without even the implied warranty of","13":" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU","14":" * Lesser General Public License for more details.","15":" *","16":" * You should have received a copy of the GNU Lesser General Public","17":" * License along with Sonar; if not, write to the Free Software"}]
\ No newline at end of file +[{"3":" * Copyright (C) 2008-2011 SonarSource","4":" * mailto:contact AT sonarsource DOT com","5":" *","6":" * Sonar is free software; you can redistribute it and\/or","7":" * modify it under the terms of the GNU Lesser General Public","8":" * License as published by the Free Software Foundation; either","9":" * version 3 of the License, or (at your option) any later version.","10":" *","11":" * Sonar is distributed in the hope that it will be useful,","12":" * but WITHOUT ANY WARRANTY; without even the implied warranty of","13":" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU","14":" * Lesser General Public License for more details.","15":" *","16":" * You should have received a copy of the GNU Lesser General Public","17":" * License along with Sonar; if not, write to the Free Software"}]
\ No newline at end of file diff --git a/sonar-ws-client/src/test/resources/sources/source.json b/sonar-ws-client/src/test/resources/sources/source.json index 5042d43778e..d804cadf7d5 100644 --- a/sonar-ws-client/src/test/resources/sources/source.json +++ b/sonar-ws-client/src/test/resources/sources/source.json @@ -1 +1 @@ -[{"1":"\/*","2":" * Sonar, open source software quality management tool.","3":" * Copyright (C) 2009 SonarSource SA","4":" * mailto:contact AT sonarsource DOT com","5":" *","6":" * Sonar is free software; you can redistribute it and\/or","7":" * modify it under the terms of the GNU Lesser General Public","8":" * License as published by the Free Software Foundation; either","9":" * version 3 of the License, or (at your option) any later version.","10":" *","11":" * Sonar is distributed in the hope that it will be useful,","12":" * but WITHOUT ANY WARRANTY; without even the implied warranty of","13":" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU","14":" * Lesser General Public License for more details.","15":" *","16":" * You should have received a copy of the GNU Lesser General Public","17":" * License along with Sonar; if not, write to the Free Software","18":" * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02","19":" *\/","20":"package org.sonar.api.utils;","21":"","22":"import com.google.common.collect.Multiset;","23":"import org.apache.commons.collections.Bag;","24":"import org.apache.commons.lang.StringUtils;","25":"import org.apache.commons.lang.math.NumberUtils;","26":"import org.sonar.api.rules.RulePriority;","27":"import org.slf4j.LoggerFactory;","28":"","29":"import java.util.HashMap;","30":"import java.util.Map;","31":"","32":"\/**","33":" * Util class to format key\/value data. Output is a string representation ready to be","34":" * injected into the database","35":" *","36":" * @since 1.10","37":" *\/","38":"public final class KeyValueFormat {","39":"","40":" private KeyValueFormat() {","41":" }","42":"","43":" \/**","44":" * Transforms a string with the following format : "key1=value1;key2=value2..."","45":" * into a Map<KEY, VALUE>. Requires to implement the transform(key,value) method","46":" *","47":" * @param data the input string","48":" * @param transformer the interface to implement","49":" * @return a Map of <key, value>","50":" *\/","51":" public static <KEY, VALUE> Map<KEY, VALUE> parse(String data, Transformer<KEY, VALUE> transformer) {","52":" Map<String, String> rawData = parse(data);","53":" Map<KEY, VALUE> map = new HashMap<KEY, VALUE>();","54":" for (Map.Entry<String, String> entry : rawData.entrySet()) {","55":" KeyValue<KEY, VALUE> keyVal = transformer.transform(entry.getKey(), entry.getValue());","56":" if (keyVal != null) {","57":" map.put(keyVal.getKey(), keyVal.getValue());","58":" }","59":" }","60":" return map;","61":" }","62":"","63":" \/**","64":" * Transforms a string with the following format : "key1=value1;key2=value2..."","65":" * into a Map<String,String>","66":" *","67":" * @param data the string to parse","68":" * @return a map","69":" *\/","70":" public static Map<String, String> parse(String data) {","71":" Map<String, String> map = new HashMap<String, String>();","72":" String[] pairs = StringUtils.split(data, ";");","73":" for (String pair : pairs) {","74":" String[] keyValue = StringUtils.split(pair, "=");","75":" String key = keyValue[0];","76":" String value = (keyValue.length == 2 ? keyValue[1] : "");","77":" map.put(key, value);","78":" }","79":" return map;","80":" }","81":"","82":" \/**","83":" * Transforms a map<KEY,VALUE> into a string with the format : "key1=value1;key2=value2..."","84":" *","85":" * @param map the map to transform","86":" * @return the formatted string","87":" *\/","88":" public static <KEY, VALUE> String format(Map<KEY, VALUE> map) {","89":" StringBuilder sb = new StringBuilder();","90":" boolean first = true;","91":" for (Map.Entry<?, ?> entry : map.entrySet()) {","92":" if (!first) {","93":" sb.append(";");","94":" }","95":" sb.append(entry.getKey().toString());","96":" sb.append("=");","97":" if (entry.getValue() != null) {","98":" sb.append(entry.getValue());","99":" }","100":" first = false;","101":" }","102":"","103":" return sb.toString();","104":" }","105":"","106":" \/**","107":" * @since 1.11","108":" * @deprecated use Multiset from google collections instead of commons-collections bags","109":" *\/","110":" public static String format(Bag bag) {","111":" return format(bag, 0);","112":" }","113":"","114":" \/**","115":" * @since 1.11","116":" * @deprecated use Multiset from google collections instead of commons-collections bags","117":" *\/","118":" public static String format(Bag bag, int var) {","119":" StringBuilder sb = new StringBuilder();","120":" boolean first = true;","121":" for (Object obj : bag.uniqueSet()) {","122":" if (!first) {","123":" sb.append(";");","124":" }","125":" sb.append(obj.toString());","126":" sb.append("=");","127":" sb.append(bag.getCount(obj) + var);","128":" first = false;","129":" }","130":"","131":" return sb.toString();","132":" }","133":"","134":" \/**","135":" * Transforms a Multiset<?> into a string with the format : "key1=count1;key2=count2..."","136":" *","137":" * @param set the set to transform","138":" * @return the formatted string","139":" *\/","140":" public static String format(Multiset<?> set) {","141":" StringBuilder sb = new StringBuilder();","142":" boolean first = true;","143":" for (Multiset.Entry<?> entry : set.entrySet()) {","144":" if (!first) {","145":" sb.append(";");","146":" }","147":" sb.append(entry.getElement().toString());","148":" sb.append("=");","149":" sb.append(entry.getCount());","150":" first = false;","151":" }","152":" return sb.toString();","153":" }","154":"","155":" \/**","156":" * Transforms a Object... into a string with the format : "object1=object2;object3=object4..."","157":" *","158":" * @param objects the object list to transform","159":" * @return the formatted string","160":" *\/","161":" public static String format(Object... objects) {","162":" StringBuilder sb = new StringBuilder();","163":" boolean first = true;","164":" if (objects != null) {","165":" for (int i = 0; i < objects.length; i++) {","166":" if (!first) {","167":" sb.append(";");","168":" }","169":" sb.append(objects[i++].toString());","170":" sb.append("=");","171":" sb.append(objects[i]);","172":" first = false;","173":" }","174":" }","175":" return sb.toString();","176":" }","177":"","178":" public interface Transformer<KEY, VALUE> {","179":" KeyValue<KEY, VALUE> transform(String key, String value);","180":" }","181":"","182":" \/**","183":" * Implementation of Transformer<String, Double>","184":" *\/","185":" public static class StringNumberPairTransformer implements Transformer<String, Double> {","186":"","187":" public KeyValue<String, Double> transform(String key, String value) {","188":" return new KeyValue<String, Double>(key, toDouble(value));","189":" }","190":" }","191":"","192":" \/**","193":" * Implementation of Transformer<Double, Double>","194":" *\/","195":" public static class DoubleNumbersPairTransformer implements Transformer<Double, Double> {","196":"","197":" public KeyValue<Double, Double> transform(String key, String value) {","198":" return new KeyValue<Double, Double>(toDouble(key), toDouble(value));","199":" }","200":" }","201":"","202":" \/**","203":" * Implementation of Transformer<Integer, Integer>","204":" *\/","205":" public static class IntegerNumbersPairTransformer implements Transformer<Integer, Integer> {","206":"","207":" public KeyValue<Integer, Integer> transform(String key, String value) {","208":" return new KeyValue<Integer, Integer>(toInteger(key), toInteger(value));","209":" }","210":" }","211":"","212":" \/**","213":" * Implementation of Transformer<RulePriority, Integer>","214":" *\/","215":" public static class RulePriorityNumbersPairTransformer implements Transformer<RulePriority, Integer> {","216":"","217":" public KeyValue<RulePriority, Integer> transform(String key, String value) {","218":" try {","219":" if (StringUtils.isBlank(value)) { value = "0"; }","220":" return new KeyValue<RulePriority, Integer>(RulePriority.valueOf(key.toUpperCase()), Integer.parseInt(value));","221":" }","222":" catch (Exception e) {","223":" LoggerFactory.getLogger(RulePriorityNumbersPairTransformer.class).warn("Property " + key + " has invalid value: " + value, e);","224":" return null;","225":" }","226":" }","227":" }","228":"","229":" private static Double toDouble(String value) {","230":" return StringUtils.isBlank(value) ? null : NumberUtils.toDouble(value);","231":" }","232":"","233":" private static Integer toInteger(String value) {","234":" return StringUtils.isBlank(value) ? null : NumberUtils.toInt(value);","235":" }","236":"}"}]
\ No newline at end of file +[{"1":"\/*","2":" * Sonar, open source software quality management tool.","3":" * Copyright (C) 2008-2011 SonarSource","4":" * mailto:contact AT sonarsource DOT com","5":" *","6":" * Sonar is free software; you can redistribute it and\/or","7":" * modify it under the terms of the GNU Lesser General Public","8":" * License as published by the Free Software Foundation; either","9":" * version 3 of the License, or (at your option) any later version.","10":" *","11":" * Sonar is distributed in the hope that it will be useful,","12":" * but WITHOUT ANY WARRANTY; without even the implied warranty of","13":" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU","14":" * Lesser General Public License for more details.","15":" *","16":" * You should have received a copy of the GNU Lesser General Public","17":" * License along with Sonar; if not, write to the Free Software","18":" * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02","19":" *\/","20":"package org.sonar.api.utils;","21":"","22":"import com.google.common.collect.Multiset;","23":"import org.apache.commons.collections.Bag;","24":"import org.apache.commons.lang.StringUtils;","25":"import org.apache.commons.lang.math.NumberUtils;","26":"import org.sonar.api.rules.RulePriority;","27":"import org.slf4j.LoggerFactory;","28":"","29":"import java.util.HashMap;","30":"import java.util.Map;","31":"","32":"\/**","33":" * Util class to format key\/value data. Output is a string representation ready to be","34":" * injected into the database","35":" *","36":" * @since 1.10","37":" *\/","38":"public final class KeyValueFormat {","39":"","40":" private KeyValueFormat() {","41":" }","42":"","43":" \/**","44":" * Transforms a string with the following format : "key1=value1;key2=value2..."","45":" * into a Map<KEY, VALUE>. Requires to implement the transform(key,value) method","46":" *","47":" * @param data the input string","48":" * @param transformer the interface to implement","49":" * @return a Map of <key, value>","50":" *\/","51":" public static <KEY, VALUE> Map<KEY, VALUE> parse(String data, Transformer<KEY, VALUE> transformer) {","52":" Map<String, String> rawData = parse(data);","53":" Map<KEY, VALUE> map = new HashMap<KEY, VALUE>();","54":" for (Map.Entry<String, String> entry : rawData.entrySet()) {","55":" KeyValue<KEY, VALUE> keyVal = transformer.transform(entry.getKey(), entry.getValue());","56":" if (keyVal != null) {","57":" map.put(keyVal.getKey(), keyVal.getValue());","58":" }","59":" }","60":" return map;","61":" }","62":"","63":" \/**","64":" * Transforms a string with the following format : "key1=value1;key2=value2..."","65":" * into a Map<String,String>","66":" *","67":" * @param data the string to parse","68":" * @return a map","69":" *\/","70":" public static Map<String, String> parse(String data) {","71":" Map<String, String> map = new HashMap<String, String>();","72":" String[] pairs = StringUtils.split(data, ";");","73":" for (String pair : pairs) {","74":" String[] keyValue = StringUtils.split(pair, "=");","75":" String key = keyValue[0];","76":" String value = (keyValue.length == 2 ? keyValue[1] : "");","77":" map.put(key, value);","78":" }","79":" return map;","80":" }","81":"","82":" \/**","83":" * Transforms a map<KEY,VALUE> into a string with the format : "key1=value1;key2=value2..."","84":" *","85":" * @param map the map to transform","86":" * @return the formatted string","87":" *\/","88":" public static <KEY, VALUE> String format(Map<KEY, VALUE> map) {","89":" StringBuilder sb = new StringBuilder();","90":" boolean first = true;","91":" for (Map.Entry<?, ?> entry : map.entrySet()) {","92":" if (!first) {","93":" sb.append(";");","94":" }","95":" sb.append(entry.getKey().toString());","96":" sb.append("=");","97":" if (entry.getValue() != null) {","98":" sb.append(entry.getValue());","99":" }","100":" first = false;","101":" }","102":"","103":" return sb.toString();","104":" }","105":"","106":" \/**","107":" * @since 1.11","108":" * @deprecated use Multiset from google collections instead of commons-collections bags","109":" *\/","110":" public static String format(Bag bag) {","111":" return format(bag, 0);","112":" }","113":"","114":" \/**","115":" * @since 1.11","116":" * @deprecated use Multiset from google collections instead of commons-collections bags","117":" *\/","118":" public static String format(Bag bag, int var) {","119":" StringBuilder sb = new StringBuilder();","120":" boolean first = true;","121":" for (Object obj : bag.uniqueSet()) {","122":" if (!first) {","123":" sb.append(";");","124":" }","125":" sb.append(obj.toString());","126":" sb.append("=");","127":" sb.append(bag.getCount(obj) + var);","128":" first = false;","129":" }","130":"","131":" return sb.toString();","132":" }","133":"","134":" \/**","135":" * Transforms a Multiset<?> into a string with the format : "key1=count1;key2=count2..."","136":" *","137":" * @param set the set to transform","138":" * @return the formatted string","139":" *\/","140":" public static String format(Multiset<?> set) {","141":" StringBuilder sb = new StringBuilder();","142":" boolean first = true;","143":" for (Multiset.Entry<?> entry : set.entrySet()) {","144":" if (!first) {","145":" sb.append(";");","146":" }","147":" sb.append(entry.getElement().toString());","148":" sb.append("=");","149":" sb.append(entry.getCount());","150":" first = false;","151":" }","152":" return sb.toString();","153":" }","154":"","155":" \/**","156":" * Transforms a Object... into a string with the format : "object1=object2;object3=object4..."","157":" *","158":" * @param objects the object list to transform","159":" * @return the formatted string","160":" *\/","161":" public static String format(Object... objects) {","162":" StringBuilder sb = new StringBuilder();","163":" boolean first = true;","164":" if (objects != null) {","165":" for (int i = 0; i < objects.length; i++) {","166":" if (!first) {","167":" sb.append(";");","168":" }","169":" sb.append(objects[i++].toString());","170":" sb.append("=");","171":" sb.append(objects[i]);","172":" first = false;","173":" }","174":" }","175":" return sb.toString();","176":" }","177":"","178":" public interface Transformer<KEY, VALUE> {","179":" KeyValue<KEY, VALUE> transform(String key, String value);","180":" }","181":"","182":" \/**","183":" * Implementation of Transformer<String, Double>","184":" *\/","185":" public static class StringNumberPairTransformer implements Transformer<String, Double> {","186":"","187":" public KeyValue<String, Double> transform(String key, String value) {","188":" return new KeyValue<String, Double>(key, toDouble(value));","189":" }","190":" }","191":"","192":" \/**","193":" * Implementation of Transformer<Double, Double>","194":" *\/","195":" public static class DoubleNumbersPairTransformer implements Transformer<Double, Double> {","196":"","197":" public KeyValue<Double, Double> transform(String key, String value) {","198":" return new KeyValue<Double, Double>(toDouble(key), toDouble(value));","199":" }","200":" }","201":"","202":" \/**","203":" * Implementation of Transformer<Integer, Integer>","204":" *\/","205":" public static class IntegerNumbersPairTransformer implements Transformer<Integer, Integer> {","206":"","207":" public KeyValue<Integer, Integer> transform(String key, String value) {","208":" return new KeyValue<Integer, Integer>(toInteger(key), toInteger(value));","209":" }","210":" }","211":"","212":" \/**","213":" * Implementation of Transformer<RulePriority, Integer>","214":" *\/","215":" public static class RulePriorityNumbersPairTransformer implements Transformer<RulePriority, Integer> {","216":"","217":" public KeyValue<RulePriority, Integer> transform(String key, String value) {","218":" try {","219":" if (StringUtils.isBlank(value)) { value = "0"; }","220":" return new KeyValue<RulePriority, Integer>(RulePriority.valueOf(key.toUpperCase()), Integer.parseInt(value));","221":" }","222":" catch (Exception e) {","223":" LoggerFactory.getLogger(RulePriorityNumbersPairTransformer.class).warn("Property " + key + " has invalid value: " + value, e);","224":" return null;","225":" }","226":" }","227":" }","228":"","229":" private static Double toDouble(String value) {","230":" return StringUtils.isBlank(value) ? null : NumberUtils.toDouble(value);","231":" }","232":"","233":" private static Integer toInteger(String value) {","234":" return StringUtils.isBlank(value) ? null : NumberUtils.toInt(value);","235":" }","236":"}"}]
\ No newline at end of file diff --git a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/ITestsPlugin.java b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/ITestsPlugin.java index 5fd5809f3b3..3d727a9ce01 100644 --- a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/ITestsPlugin.java +++ b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/ITestsPlugin.java @@ -1,71 +1,71 @@ -/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package itests;
-
-import itests.footer.SampleFooter;
-import itests.languages.LanguageWithoutRulesEngine;
-import itests.page.GwtSamplePage;
-import itests.page.RubyApiTestsPage;
-import itests.resourcetab.SampleResourceTab;
-import itests.ws.RubyWebService;
-import org.sonar.api.Plugin;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class ITestsPlugin implements Plugin {
-
- public String getKey() {
- return "it";
- }
-
- public String getName() {
- return "Integration tests";
- }
-
- public String getDescription() {
- return "Integration tests";
- }
-
- public List getExtensions() {
- List extensions = new ArrayList();
-
- extensions.add(SampleSensor.class);
- extensions.add(LanguageWithoutRulesEngine.class);
- extensions.add(ServerSideExtensionUsingExternalDependency.class);
- extensions.add(ExcludedResourceFilter.class);
-
- // web
- extensions.add(SampleResourceTab.class);
- extensions.add(SampleFooter.class);
- extensions.add(GwtSamplePage.class);
- extensions.add(RubyApiTestsPage.class);
-
- // web service
- extensions.add(RubyWebService.class);
-
- return extensions;
- }
-
- @Override
- public String toString() {
- return getKey();
- }
-}
+/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package itests; + +import itests.footer.SampleFooter; +import itests.languages.LanguageWithoutRulesEngine; +import itests.page.GwtSamplePage; +import itests.page.RubyApiTestsPage; +import itests.resourcetab.SampleResourceTab; +import itests.ws.RubyWebService; +import org.sonar.api.Plugin; + +import java.util.ArrayList; +import java.util.List; + +public class ITestsPlugin implements Plugin { + + public String getKey() { + return "it"; + } + + public String getName() { + return "Integration tests"; + } + + public String getDescription() { + return "Integration tests"; + } + + public List getExtensions() { + List extensions = new ArrayList(); + + extensions.add(SampleSensor.class); + extensions.add(LanguageWithoutRulesEngine.class); + extensions.add(ServerSideExtensionUsingExternalDependency.class); + extensions.add(ExcludedResourceFilter.class); + + // web + extensions.add(SampleResourceTab.class); + extensions.add(SampleFooter.class); + extensions.add(GwtSamplePage.class); + extensions.add(RubyApiTestsPage.class); + + // web service + extensions.add(RubyWebService.class); + + return extensions; + } + + @Override + public String toString() { + return getKey(); + } +} diff --git a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/SampleSensor.java b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/SampleSensor.java index b4172e8b5bf..0ec5c71953b 100644 --- a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/SampleSensor.java +++ b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/SampleSensor.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/ServerSideExtensionUsingExternalDependency.java b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/ServerSideExtensionUsingExternalDependency.java index 3debe0b73f9..53d241c0651 100644 --- a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/ServerSideExtensionUsingExternalDependency.java +++ b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/ServerSideExtensionUsingExternalDependency.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/footer/SampleFooter.java b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/footer/SampleFooter.java index 6db3846990d..32895e87e11 100644 --- a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/footer/SampleFooter.java +++ b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/footer/SampleFooter.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/languages/LanguageWithoutRulesEngine.java b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/languages/LanguageWithoutRulesEngine.java index 787551c058f..b4951db60ba 100644 --- a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/languages/LanguageWithoutRulesEngine.java +++ b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/languages/LanguageWithoutRulesEngine.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/page/GwtSamplePage.java b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/page/GwtSamplePage.java index e2c045d126d..9b208ef9682 100644 --- a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/page/GwtSamplePage.java +++ b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/page/GwtSamplePage.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/page/RubyApiTestsPage.java b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/page/RubyApiTestsPage.java index 021bb584458..f39c949411a 100644 --- a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/page/RubyApiTestsPage.java +++ b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/page/RubyApiTestsPage.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/page/client/GwtModule.java b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/page/client/GwtModule.java index d65b4a21f90..19aa9c2e820 100644 --- a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/page/client/GwtModule.java +++ b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/page/client/GwtModule.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/resourcetab/SampleResourceTab.java b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/resourcetab/SampleResourceTab.java index 8906e4452c7..5e875599f6a 100644 --- a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/resourcetab/SampleResourceTab.java +++ b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/resourcetab/SampleResourceTab.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/resourcetab/client/GwtSampleResourceTab.java b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/resourcetab/client/GwtSampleResourceTab.java index d788e93333e..efeb007d801 100644 --- a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/resourcetab/client/GwtSampleResourceTab.java +++ b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/resourcetab/client/GwtSampleResourceTab.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/ws/RubyWebService.java b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/ws/RubyWebService.java index 5ae5ebc7044..9cd876435b0 100644 --- a/tests/integration/sonar-it-reference-plugin/src/main/java/itests/ws/RubyWebService.java +++ b/tests/integration/sonar-it-reference-plugin/src/main/java/itests/ws/RubyWebService.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/sonar-it-reference-plugin/src/main/resources/itests/ws/ruby_ws_controller.rb b/tests/integration/sonar-it-reference-plugin/src/main/resources/itests/ws/ruby_ws_controller.rb index e48166dc4bb..40ad00c5424 100644 --- a/tests/integration/sonar-it-reference-plugin/src/main/resources/itests/ws/ruby_ws_controller.rb +++ b/tests/integration/sonar-it-reference-plugin/src/main/resources/itests/ws/ruby_ws_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/SONAR-767-pmd-close-resource-rule/src/main/java/org/sonar/tests/CloseableResource.java b/tests/integration/tests/maven-projects/SONAR-767-pmd-close-resource-rule/src/main/java/org/sonar/tests/CloseableResource.java index d1011beab44..61455ae5cfe 100644 --- a/tests/integration/tests/maven-projects/SONAR-767-pmd-close-resource-rule/src/main/java/org/sonar/tests/CloseableResource.java +++ b/tests/integration/tests/maven-projects/SONAR-767-pmd-close-resource-rule/src/main/java/org/sonar/tests/CloseableResource.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/SONAR-767-pmd-close-resource-rule/src/main/java/org/sonar/tests/ConnectionIsClosedInOtherMethod.java b/tests/integration/tests/maven-projects/SONAR-767-pmd-close-resource-rule/src/main/java/org/sonar/tests/ConnectionIsClosedInOtherMethod.java index 06dac0ed168..62e663da06f 100644 --- a/tests/integration/tests/maven-projects/SONAR-767-pmd-close-resource-rule/src/main/java/org/sonar/tests/ConnectionIsClosedInOtherMethod.java +++ b/tests/integration/tests/maven-projects/SONAR-767-pmd-close-resource-rule/src/main/java/org/sonar/tests/ConnectionIsClosedInOtherMethod.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/SONAR-767-pmd-close-resource-rule/src/main/java/org/sonar/tests/ResourceIsClosedInOtherMethod.java b/tests/integration/tests/maven-projects/SONAR-767-pmd-close-resource-rule/src/main/java/org/sonar/tests/ResourceIsClosedInOtherMethod.java index 752e55963fe..a0736b2c8d0 100644 --- a/tests/integration/tests/maven-projects/SONAR-767-pmd-close-resource-rule/src/main/java/org/sonar/tests/ResourceIsClosedInOtherMethod.java +++ b/tests/integration/tests/maven-projects/SONAR-767-pmd-close-resource-rule/src/main/java/org/sonar/tests/ResourceIsClosedInOtherMethod.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/duplications/src/main/java/org/sonar/samples/duplicated_same_lines_within_3_classes/Class1.java b/tests/integration/tests/maven-projects/duplications/src/main/java/org/sonar/samples/duplicated_same_lines_within_3_classes/Class1.java index 0ce164b8035..d847f24d8e7 100644 --- a/tests/integration/tests/maven-projects/duplications/src/main/java/org/sonar/samples/duplicated_same_lines_within_3_classes/Class1.java +++ b/tests/integration/tests/maven-projects/duplications/src/main/java/org/sonar/samples/duplicated_same_lines_within_3_classes/Class1.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/duplications/src/main/java/org/sonar/samples/duplicated_same_lines_within_3_classes/Class2.java b/tests/integration/tests/maven-projects/duplications/src/main/java/org/sonar/samples/duplicated_same_lines_within_3_classes/Class2.java index 8d063767b0d..28ae766f163 100644 --- a/tests/integration/tests/maven-projects/duplications/src/main/java/org/sonar/samples/duplicated_same_lines_within_3_classes/Class2.java +++ b/tests/integration/tests/maven-projects/duplications/src/main/java/org/sonar/samples/duplicated_same_lines_within_3_classes/Class2.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/duplications/src/main/java/org/sonar/samples/duplicated_same_lines_within_3_classes/Class3.java b/tests/integration/tests/maven-projects/duplications/src/main/java/org/sonar/samples/duplicated_same_lines_within_3_classes/Class3.java index c4391079d1d..6cb454fdaee 100644 --- a/tests/integration/tests/maven-projects/duplications/src/main/java/org/sonar/samples/duplicated_same_lines_within_3_classes/Class3.java +++ b/tests/integration/tests/maven-projects/duplications/src/main/java/org/sonar/samples/duplicated_same_lines_within_3_classes/Class3.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithAnonymousClass.java b/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithAnonymousClass.java index 312b6c926e8..d3df3bcb11c 100644 --- a/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithAnonymousClass.java +++ b/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithAnonymousClass.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithInnerClass.java b/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithInnerClass.java index 3b8a8eab78e..d9b5ac53391 100644 --- a/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithInnerClass.java +++ b/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithInnerClass.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithLocalInnerClass.java b/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithLocalInnerClass.java index 96a504875bb..c4898ae9752 100644 --- a/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithLocalInnerClass.java +++ b/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithLocalInnerClass.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithStaticInnerClass.java b/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithStaticInnerClass.java index 1f5dccf9981..232fdc4444d 100644 --- a/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithStaticInnerClass.java +++ b/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithStaticInnerClass.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithSubClass.java b/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithSubClass.java index 1082de85e04..bd934492c31 100644 --- a/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithSubClass.java +++ b/tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithSubClass.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithAnonymousClassTest.java b/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithAnonymousClassTest.java index c633601034a..989740136b1 100644 --- a/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithAnonymousClassTest.java +++ b/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithAnonymousClassTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithInnerClassTest.java b/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithInnerClassTest.java index 3731edac18b..ccd43d8d9f2 100644 --- a/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithInnerClassTest.java +++ b/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithInnerClassTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithLocalInnerClassTest.java b/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithLocalInnerClassTest.java index 49109afa023..c7d2397738c 100644 --- a/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithLocalInnerClassTest.java +++ b/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithLocalInnerClassTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithStaticInnerClassTest.java b/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithStaticInnerClassTest.java index 557967ab4b9..dd134de124c 100644 --- a/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithStaticInnerClassTest.java +++ b/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithStaticInnerClassTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithSubClassTest.java b/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithSubClassTest.java index 588d4f66e25..46aa3d9194a 100644 --- a/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithSubClassTest.java +++ b/tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithSubClassTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/many-source-dirs/src/test/java2/org/sonar/tests/FirstClassTest.java b/tests/integration/tests/maven-projects/many-source-dirs/src/test/java2/org/sonar/tests/FirstClassTest.java index 5da9168674a..bb0b9b52e83 100644 --- a/tests/integration/tests/maven-projects/many-source-dirs/src/test/java2/org/sonar/tests/FirstClassTest.java +++ b/tests/integration/tests/maven-projects/many-source-dirs/src/test/java2/org/sonar/tests/FirstClassTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/plugin-build-helper/src/main/java/Java1PackageClass.java b/tests/integration/tests/maven-projects/plugin-build-helper/src/main/java/Java1PackageClass.java index c6f4c52edc9..8b64e1504f8 100644 --- a/tests/integration/tests/maven-projects/plugin-build-helper/src/main/java/Java1PackageClass.java +++ b/tests/integration/tests/maven-projects/plugin-build-helper/src/main/java/Java1PackageClass.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/plugin-build-helper/src/main/java2/Java2PackageClass.java b/tests/integration/tests/maven-projects/plugin-build-helper/src/main/java2/Java2PackageClass.java index a4e1aaf5932..253a5ca4b42 100644 --- a/tests/integration/tests/maven-projects/plugin-build-helper/src/main/java2/Java2PackageClass.java +++ b/tests/integration/tests/maven-projects/plugin-build-helper/src/main/java2/Java2PackageClass.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/plugin-build-helper/src/main/java3/Java3PackageClass.java b/tests/integration/tests/maven-projects/plugin-build-helper/src/main/java3/Java3PackageClass.java index f7431f6ff01..ee3fe206337 100644 --- a/tests/integration/tests/maven-projects/plugin-build-helper/src/main/java3/Java3PackageClass.java +++ b/tests/integration/tests/maven-projects/plugin-build-helper/src/main/java3/Java3PackageClass.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/test-failures/moduleB/src/test/java/ch/hortis/sonar/samples/testFailures/moduleB/NoTest.java b/tests/integration/tests/maven-projects/test-failures/moduleB/src/test/java/ch/hortis/sonar/samples/testFailures/moduleB/NoTest.java index 598b68bc712..3b76045a5c2 100644 --- a/tests/integration/tests/maven-projects/test-failures/moduleB/src/test/java/ch/hortis/sonar/samples/testFailures/moduleB/NoTest.java +++ b/tests/integration/tests/maven-projects/test-failures/moduleB/src/test/java/ch/hortis/sonar/samples/testFailures/moduleB/NoTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/maven-projects/test-failures/moduleB/src/test/java/ch/hortis/sonar/samples/testFailures/moduleB/SkippedTest.java b/tests/integration/tests/maven-projects/test-failures/moduleB/src/test/java/ch/hortis/sonar/samples/testFailures/moduleB/SkippedTest.java index 49d93f5f2c6..bc97f6c29c0 100644 --- a/tests/integration/tests/maven-projects/test-failures/moduleB/src/test/java/ch/hortis/sonar/samples/testFailures/moduleB/SkippedTest.java +++ b/tests/integration/tests/maven-projects/test-failures/moduleB/src/test/java/ch/hortis/sonar/samples/testFailures/moduleB/SkippedTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/src/test/java/org/sonar/tests/integration/GzipCompressionIT.java b/tests/integration/tests/src/test/java/org/sonar/tests/integration/GzipCompressionIT.java index 2ba61531f86..b5bb1dcfd67 100644 --- a/tests/integration/tests/src/test/java/org/sonar/tests/integration/GzipCompressionIT.java +++ b/tests/integration/tests/src/test/java/org/sonar/tests/integration/GzipCompressionIT.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/src/test/java/org/sonar/tests/integration/ITUtils.java b/tests/integration/tests/src/test/java/org/sonar/tests/integration/ITUtils.java index e6d0ec79dd1..fea9937e868 100644 --- a/tests/integration/tests/src/test/java/org/sonar/tests/integration/ITUtils.java +++ b/tests/integration/tests/src/test/java/org/sonar/tests/integration/ITUtils.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/src/test/java/org/sonar/tests/integration/JavaComplexityIT.java b/tests/integration/tests/src/test/java/org/sonar/tests/integration/JavaComplexityIT.java index 96af69d950a..4d712570141 100644 --- a/tests/integration/tests/src/test/java/org/sonar/tests/integration/JavaComplexityIT.java +++ b/tests/integration/tests/src/test/java/org/sonar/tests/integration/JavaComplexityIT.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/src/test/java/org/sonar/tests/integration/ServerIT.java b/tests/integration/tests/src/test/java/org/sonar/tests/integration/ServerIT.java index 34a4f58269e..c72ec7b0ac0 100644 --- a/tests/integration/tests/src/test/java/org/sonar/tests/integration/ServerIT.java +++ b/tests/integration/tests/src/test/java/org/sonar/tests/integration/ServerIT.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/src/test/java/org/sonar/tests/integration/Struts139IT.java b/tests/integration/tests/src/test/java/org/sonar/tests/integration/Struts139IT.java index d608b39bfd8..cd43308d8e2 100644 --- a/tests/integration/tests/src/test/java/org/sonar/tests/integration/Struts139IT.java +++ b/tests/integration/tests/src/test/java/org/sonar/tests/integration/Struts139IT.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/src/test/java/org/sonar/tests/integration/UpdateCenterIT.java b/tests/integration/tests/src/test/java/org/sonar/tests/integration/UpdateCenterIT.java index ba50e2213a9..2a8ced7122e 100644 --- a/tests/integration/tests/src/test/java/org/sonar/tests/integration/UpdateCenterIT.java +++ b/tests/integration/tests/src/test/java/org/sonar/tests/integration/UpdateCenterIT.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/src/test/java/org/sonar/tests/integration/VariationsIT.java b/tests/integration/tests/src/test/java/org/sonar/tests/integration/VariationsIT.java index e794306ddad..501fb2969bd 100644 --- a/tests/integration/tests/src/test/java/org/sonar/tests/integration/VariationsIT.java +++ b/tests/integration/tests/src/test/java/org/sonar/tests/integration/VariationsIT.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/src/test/java/org/sonar/tests/integration/ViolationsTimeMachineIT.java b/tests/integration/tests/src/test/java/org/sonar/tests/integration/ViolationsTimeMachineIT.java index 19cb48869a2..f1931a4e4e2 100644 --- a/tests/integration/tests/src/test/java/org/sonar/tests/integration/ViolationsTimeMachineIT.java +++ b/tests/integration/tests/src/test/java/org/sonar/tests/integration/ViolationsTimeMachineIT.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/src/test/java/org/sonar/tests/integration/selenium/CustomizeComponentsPageIT.java b/tests/integration/tests/src/test/java/org/sonar/tests/integration/selenium/CustomizeComponentsPageIT.java index 998a6cbbef0..aaacfc98a9c 100644 --- a/tests/integration/tests/src/test/java/org/sonar/tests/integration/selenium/CustomizeComponentsPageIT.java +++ b/tests/integration/tests/src/test/java/org/sonar/tests/integration/selenium/CustomizeComponentsPageIT.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/src/test/java/org/sonar/tests/integration/selenium/DeployUIExtensionsIT.java b/tests/integration/tests/src/test/java/org/sonar/tests/integration/selenium/DeployUIExtensionsIT.java index 8c6a2d9aadd..96f663578b3 100644 --- a/tests/integration/tests/src/test/java/org/sonar/tests/integration/selenium/DeployUIExtensionsIT.java +++ b/tests/integration/tests/src/test/java/org/sonar/tests/integration/selenium/DeployUIExtensionsIT.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/integration/tests/src/test/java/org/sonar/tests/integration/selenium/SonarTestCase.java b/tests/integration/tests/src/test/java/org/sonar/tests/integration/selenium/SonarTestCase.java index fa56aac27e6..65b0a237552 100644 --- a/tests/integration/tests/src/test/java/org/sonar/tests/integration/selenium/SonarTestCase.java +++ b/tests/integration/tests/src/test/java/org/sonar/tests/integration/selenium/SonarTestCase.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or diff --git a/tests/volume/src/it/java/org/sonar/tests/volume/HomepageTest.java b/tests/volume/src/it/java/org/sonar/tests/volume/HomepageTest.java index 71f339b6284..453f817198a 100644 --- a/tests/volume/src/it/java/org/sonar/tests/volume/HomepageTest.java +++ b/tests/volume/src/it/java/org/sonar/tests/volume/HomepageTest.java @@ -1,6 +1,6 @@ /* * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA + * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or |