aboutsummaryrefslogtreecommitdiffstats
path: root/microbenchmark-template
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-02-04 11:46:12 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-02-04 11:46:12 +0100
commite2d3a2b2591bb2f43f13a42328cbf23f6c935e84 (patch)
tree8969e706d9165a7c7d949d79f19daae0b507787a /microbenchmark-template
parentbd22041edd9715212bc1c5a92eed393af80de95f (diff)
downloadsonarqube-e2d3a2b2591bb2f43f13a42328cbf23f6c935e84.tar.gz
sonarqube-e2d3a2b2591bb2f43f13a42328cbf23f6c935e84.zip
Fix quality flaws
Diffstat (limited to 'microbenchmark-template')
-rw-r--r--microbenchmark-template/src/main/java/org/sonar/microbenchmark/SerializationBenchmark.java20
-rw-r--r--microbenchmark-template/src/test/java/org/sonar/microbenchmark/SerializationBenchmarkTest.java19
2 files changed, 29 insertions, 10 deletions
diff --git a/microbenchmark-template/src/main/java/org/sonar/microbenchmark/SerializationBenchmark.java b/microbenchmark-template/src/main/java/org/sonar/microbenchmark/SerializationBenchmark.java
index 9d12e64998d..8c599a82c87 100644
--- a/microbenchmark-template/src/main/java/org/sonar/microbenchmark/SerializationBenchmark.java
+++ b/microbenchmark-template/src/main/java/org/sonar/microbenchmark/SerializationBenchmark.java
@@ -1,21 +1,21 @@
/*
- * markdown-benchmark
- * Copyright (C) 2009 ${owner}
- * dev@sonar.codehaus.org
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
*
- * This program is free software; you can redistribute it and/or
+ * SonarQube is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * SonarQube is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package org.sonar.microbenchmark;
@@ -33,7 +33,7 @@ import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.sonar.batch.protocol.Constants;
-import org.sonar.batch.protocol.output.BatchOutput;
+import org.sonar.batch.protocol.output.BatchReport;
import java.io.BufferedOutputStream;
import java.io.BufferedWriter;
@@ -85,7 +85,7 @@ public class SerializationBenchmark {
// An alternative can be http://stackoverflow.com/a/21870564/229031
try (OutputStream out = new BufferedOutputStream(new FileOutputStream(outputFile, false))) {
for (int i = 0; i < 10000; i++) {
- BatchOutput.ReportIssue.Builder issueBuilder = BatchOutput.ReportIssue.newBuilder();
+ BatchReport.Issue.Builder issueBuilder = BatchReport.Issue.newBuilder();
issueBuilder.setUuid("UUID_" + i);
issueBuilder.setSeverity(Constants.Severity.BLOCKER);
issueBuilder.setMsg("this is the message of issue " + i);
diff --git a/microbenchmark-template/src/test/java/org/sonar/microbenchmark/SerializationBenchmarkTest.java b/microbenchmark-template/src/test/java/org/sonar/microbenchmark/SerializationBenchmarkTest.java
index 05be832fd8c..33f42438932 100644
--- a/microbenchmark-template/src/test/java/org/sonar/microbenchmark/SerializationBenchmarkTest.java
+++ b/microbenchmark-template/src/test/java/org/sonar/microbenchmark/SerializationBenchmarkTest.java
@@ -1,3 +1,22 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
package org.sonar.microbenchmark;
import org.apache.commons.io.FileUtils;