From: Julien HENRY Date: Wed, 22 Apr 2015 21:32:39 +0000 (+0200) Subject: SONAR-6278 Feed tests in compute report X-Git-Tag: 5.2-RC1~2116^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F260%2Fhead;p=sonarqube.git SONAR-6278 Feed tests in compute report --- diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/XooPlugin.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/XooPlugin.java index 48756de3679..2d77a3d90c4 100644 --- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/XooPlugin.java +++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/XooPlugin.java @@ -29,6 +29,8 @@ import org.sonar.xoo.lang.*; import org.sonar.xoo.rule.*; import org.sonar.xoo.scm.XooBlameCommand; import org.sonar.xoo.scm.XooScmProvider; +import org.sonar.xoo.test.CoveragePerTestSensor; +import org.sonar.xoo.test.TestExecutionSensor; import java.util.Arrays; import java.util.List; @@ -78,6 +80,10 @@ public class XooPlugin extends SonarPlugin { ItCoverageSensor.class, OverallCoverageSensor.class, + // Tests + TestExecutionSensor.class, + CoveragePerTestSensor.class, + // Other XooProjectBuilder.class, XooPostJob.class); diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/test/CoveragePerTestSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/test/CoveragePerTestSensor.java new file mode 100644 index 00000000000..369b9d3fd6a --- /dev/null +++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/test/CoveragePerTestSensor.java @@ -0,0 +1,122 @@ +/* + * 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.xoo.test; + +import com.google.common.base.Splitter; +import org.apache.commons.io.FileUtils; +import org.apache.commons.lang.StringUtils; +import org.sonar.api.batch.DependsUpon; +import org.sonar.api.batch.fs.FilePredicates; +import org.sonar.api.batch.fs.FileSystem; +import org.sonar.api.batch.fs.InputFile; +import org.sonar.api.batch.fs.InputFile.Type; +import org.sonar.api.batch.sensor.Sensor; +import org.sonar.api.batch.sensor.SensorContext; +import org.sonar.api.batch.sensor.SensorDescriptor; +import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.test.MutableTestCase; +import org.sonar.api.test.MutableTestPlan; +import org.sonar.api.test.MutableTestable; +import org.sonar.api.utils.log.Logger; +import org.sonar.api.utils.log.Loggers; +import org.sonar.xoo.Xoo; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +/** + * Parse files *.xoo.testcoverage + */ +@DependsUpon("test-exec") +public class CoveragePerTestSensor implements Sensor { + private static final Logger LOG = Loggers.get(CoveragePerTestSensor.class); + + private static final String TEST_EXTENSION = ".testcoverage"; + + private final FileSystem fs; + private final ResourcePerspectives perspectives; + + public CoveragePerTestSensor(FileSystem fileSystem, ResourcePerspectives perspectives) { + this.fs = fileSystem; + this.perspectives = perspectives; + } + + private void processTestFile(InputFile inputFile, SensorContext context) { + File testExecutionFile = new File(inputFile.file().getParentFile(), inputFile.file().getName() + TEST_EXTENSION); + if (testExecutionFile.exists()) { + LOG.debug("Processing " + testExecutionFile.getAbsolutePath()); + try { + List lines = FileUtils.readLines(testExecutionFile, fs.encoding().name()); + int lineNumber = 0; + MutableTestPlan testPlan = perspectives.as(MutableTestPlan.class, inputFile); + for (String line : lines) { + lineNumber++; + if (StringUtils.isBlank(line)) { + continue; + } + if (line.startsWith("#")) { + continue; + } + try { + Iterator split = Splitter.on(";").split(line).iterator(); + String name = split.next(); + while (split.hasNext()) { + String coveredBlockStr = split.next(); + Iterator splitCoveredBlock = Splitter.on(",").split(coveredBlockStr).iterator(); + String componentPath = splitCoveredBlock.next(); + InputFile coveredFile = context.fileSystem().inputFile(context.fileSystem().predicates().hasPath(componentPath)); + MutableTestable testable = perspectives.as(MutableTestable.class, coveredFile); + List coveredLines = new ArrayList<>(); + while (splitCoveredBlock.hasNext()) { + coveredLines.add(Integer.parseInt(splitCoveredBlock.next())); + } + for (MutableTestCase testCase : testPlan.testCasesByName(name)) { + testCase.setCoverageBlock(testable, coveredLines); + } + } + } catch (Exception e) { + throw new IllegalStateException("Error processing line " + lineNumber + " of file " + testExecutionFile.getAbsolutePath(), e); + } + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + } + + @Override + public void describe(SensorDescriptor descriptor) { + descriptor + .name("Xoo Coverage Per Test Sensor") + .onlyOnLanguages(Xoo.KEY); + } + + @Override + public void execute(SensorContext context) { + FilePredicates p = context.fileSystem().predicates(); + for (InputFile file : context.fileSystem().inputFiles(p.and(p.hasLanguages(Xoo.KEY), p.hasType(Type.TEST)))) { + processTestFile(file, context); + } + } + +} diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/test/TestExecutionSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/test/TestExecutionSensor.java new file mode 100644 index 00000000000..c3446daac3a --- /dev/null +++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/test/TestExecutionSensor.java @@ -0,0 +1,119 @@ +/* + * 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.xoo.test; + +import com.google.common.base.Splitter; +import org.apache.commons.io.FileUtils; +import org.apache.commons.lang.StringUtils; +import org.sonar.api.batch.DependedUpon; +import org.sonar.api.batch.fs.FilePredicates; +import org.sonar.api.batch.fs.FileSystem; +import org.sonar.api.batch.fs.InputFile; +import org.sonar.api.batch.fs.InputFile.Type; +import org.sonar.api.batch.sensor.Sensor; +import org.sonar.api.batch.sensor.SensorContext; +import org.sonar.api.batch.sensor.SensorDescriptor; +import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.test.MutableTestCase; +import org.sonar.api.test.MutableTestPlan; +import org.sonar.api.test.TestCase.Status; +import org.sonar.api.utils.log.Logger; +import org.sonar.api.utils.log.Loggers; +import org.sonar.xoo.Xoo; + +import java.io.File; +import java.io.IOException; +import java.util.Iterator; +import java.util.List; + +/** + * Parse files *.xoo.test + */ +@DependedUpon("test-exec") +public class TestExecutionSensor implements Sensor { + private static final Logger LOG = Loggers.get(TestExecutionSensor.class); + + private static final String TEST_EXTENSION = ".test"; + + private final FileSystem fs; + private final ResourcePerspectives perspectives; + + public TestExecutionSensor(FileSystem fileSystem, ResourcePerspectives perspectives) { + this.fs = fileSystem; + this.perspectives = perspectives; + } + + private void processTestFile(InputFile inputFile, SensorContext context) { + File testExecutionFile = new File(inputFile.file().getParentFile(), inputFile.file().getName() + TEST_EXTENSION); + if (testExecutionFile.exists()) { + LOG.debug("Processing " + testExecutionFile.getAbsolutePath()); + try { + List lines = FileUtils.readLines(testExecutionFile, fs.encoding().name()); + int lineNumber = 0; + MutableTestPlan testPlan = perspectives.as(MutableTestPlan.class, inputFile); + for (String line : lines) { + lineNumber++; + if (StringUtils.isBlank(line)) { + continue; + } + if (line.startsWith("#")) { + continue; + } + try { + Iterator split = Splitter.on(":").split(line).iterator(); + String name = split.next(); + String durationStr = split.next(); + Long duration = StringUtils.isNotBlank(durationStr) ? Long.parseLong(durationStr) : null; + String msg = split.next(); + String stack = split.next(); + String status = split.next(); + String type = split.next(); + MutableTestCase testCase = testPlan.addTestCase(name); + testCase.setDurationInMs(duration); + testCase.setMessage(msg); + testCase.setStackTrace(stack); + testCase.setStatus(Status.valueOf(status)); + testCase.setType(type); + } catch (Exception e) { + throw new IllegalStateException("Error processing line " + lineNumber + " of file " + testExecutionFile.getAbsolutePath(), e); + } + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + } + + @Override + public void describe(SensorDescriptor descriptor) { + descriptor + .name("Xoo Test Execution Sensor") + .onlyOnLanguages(Xoo.KEY); + } + + @Override + public void execute(SensorContext context) { + FilePredicates p = context.fileSystem().predicates(); + for (InputFile file : context.fileSystem().inputFiles(p.and(p.hasLanguages(Xoo.KEY), p.hasType(Type.TEST)))) { + processTestFile(file, context); + } + } + +} diff --git a/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/Constants.java b/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/Constants.java index ecae37fd9f7..b15daefa3f4 100644 --- a/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/Constants.java +++ b/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/Constants.java @@ -684,88 +684,6 @@ public final class Constants { // @@protoc_insertion_point(enum_scope:HighlightingType) } - /** - * Protobuf enum {@code TestType} - */ - public enum TestType - implements com.google.protobuf.ProtocolMessageEnum { - /** - * UT = 1; - */ - UT(0, 1), - /** - * IT = 2; - */ - IT(1, 2), - ; - - /** - * UT = 1; - */ - public static final int UT_VALUE = 1; - /** - * IT = 2; - */ - public static final int IT_VALUE = 2; - - - public final int getNumber() { return value; } - - public static TestType valueOf(int value) { - switch (value) { - case 1: return UT; - case 2: return IT; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public TestType findValueByNumber(int number) { - return TestType.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return org.sonar.batch.protocol.Constants.getDescriptor().getEnumTypes().get(6); - } - - private static final TestType[] VALUES = values(); - - public static TestType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private TestType(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:TestType) - } - /** * Protobuf enum {@code TestStatus} */ @@ -841,7 +759,7 @@ public final class Constants { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return org.sonar.batch.protocol.Constants.getDescriptor().getEnumTypes().get(7); + return org.sonar.batch.protocol.Constants.getDescriptor().getEnumTypes().get(6); } private static final TestStatus[] VALUES = values(); @@ -888,19 +806,18 @@ public final class Constants { "ON\020\000\022\014\n\010CONSTANT\020\001\022\013\n\007COMMENT\020\002\022\013\n\007CPP_D" + "OC\020\003\022\026\n\022STRUCTURED_COMMENT\020\004\022\013\n\007KEYWORD\020" + "\005\022\027\n\023HIGHLIGHTING_STRING\020\006\022\021\n\rKEYWORD_LI" + - "GHT\020\007\022\030\n\024PREPROCESS_DIRECTIVE\020\010*\032\n\010TestT" + - "ype\022\006\n\002UT\020\001\022\006\n\002IT\020\002*9\n\nTestStatus\022\006\n\002OK\020" + - "\001\022\013\n\007FAILURE\020\002\022\t\n\005ERROR\020\003\022\013\n\007SKIPPED\020\004B\034" + - "\n\030org.sonar.batch.protocolH\001" + "GHT\020\007\022\030\n\024PREPROCESS_DIRECTIVE\020\010*9\n\nTestS" + + "tatus\022\006\n\002OK\020\001\022\013\n\007FAILURE\020\002\022\t\n\005ERROR\020\003\022\013\n" + + "\007SKIPPED\020\004B\034\n\030org.sonar.batch.protocolH\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { diff --git a/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/input/BatchInput.java b/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/input/BatchInput.java index 464e4d9bb03..6ecbcc83d31 100644 --- a/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/input/BatchInput.java +++ b/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/input/BatchInput.java @@ -8,10 +8,10 @@ public final class BatchInput { public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } - public interface ServerIssueOrBuilder extends - // @@protoc_insertion_point(interface_extends:ServerIssue) - com.google.protobuf.MessageOrBuilder { + public interface ServerIssueOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional string key = 1; /** * optional string key = 1; */ @@ -26,6 +26,7 @@ public final class BatchInput { com.google.protobuf.ByteString getKeyBytes(); + // optional string module_key = 2; /** * optional string module_key = 2; */ @@ -40,6 +41,7 @@ public final class BatchInput { com.google.protobuf.ByteString getModuleKeyBytes(); + // optional string path = 3; /** * optional string path = 3; */ @@ -54,6 +56,7 @@ public final class BatchInput { com.google.protobuf.ByteString getPathBytes(); + // optional string rule_repository = 4; /** * optional string rule_repository = 4; */ @@ -68,6 +71,7 @@ public final class BatchInput { com.google.protobuf.ByteString getRuleRepositoryBytes(); + // optional string rule_key = 5; /** * optional string rule_key = 5; */ @@ -82,6 +86,7 @@ public final class BatchInput { com.google.protobuf.ByteString getRuleKeyBytes(); + // optional int32 line = 6; /** * optional int32 line = 6; */ @@ -91,6 +96,7 @@ public final class BatchInput { */ int getLine(); + // optional string msg = 7; /** * optional string msg = 7; */ @@ -105,6 +111,7 @@ public final class BatchInput { com.google.protobuf.ByteString getMsgBytes(); + // optional .Severity severity = 8; /** * optional .Severity severity = 8; */ @@ -114,6 +121,7 @@ public final class BatchInput { */ org.sonar.batch.protocol.Constants.Severity getSeverity(); + // optional bool manual_severity = 9; /** * optional bool manual_severity = 9; */ @@ -123,6 +131,7 @@ public final class BatchInput { */ boolean getManualSeverity(); + // optional string resolution = 10; /** * optional string resolution = 10; */ @@ -137,6 +146,7 @@ public final class BatchInput { com.google.protobuf.ByteString getResolutionBytes(); + // optional string status = 11; /** * optional string status = 11; */ @@ -151,6 +161,7 @@ public final class BatchInput { com.google.protobuf.ByteString getStatusBytes(); + // optional string checksum = 12; /** * optional string checksum = 12; */ @@ -165,6 +176,7 @@ public final class BatchInput { com.google.protobuf.ByteString getChecksumBytes(); + // optional string assignee_login = 13; /** * optional string assignee_login = 13; */ @@ -179,6 +191,7 @@ public final class BatchInput { com.google.protobuf.ByteString getAssigneeLoginBytes(); + // optional int64 creation_date = 14; /** * optional int64 creation_date = 14; */ @@ -192,9 +205,8 @@ public final class BatchInput { * Protobuf type {@code ServerIssue} */ public static final class ServerIssue extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:ServerIssue) - ServerIssueOrBuilder { + com.google.protobuf.GeneratedMessage + implements ServerIssueOrBuilder { // Use ServerIssue.newBuilder() to construct. private ServerIssue(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -241,33 +253,28 @@ public final class BatchInput { break; } case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; - key_ = bs; + key_ = input.readBytes(); break; } case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - moduleKey_ = bs; + moduleKey_ = input.readBytes(); break; } case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000004; - path_ = bs; + path_ = input.readBytes(); break; } case 34: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000008; - ruleRepository_ = bs; + ruleRepository_ = input.readBytes(); break; } case 42: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000010; - ruleKey_ = bs; + ruleKey_ = input.readBytes(); break; } case 48: { @@ -276,9 +283,8 @@ public final class BatchInput { break; } case 58: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000040; - msg_ = bs; + msg_ = input.readBytes(); break; } case 64: { @@ -298,27 +304,23 @@ public final class BatchInput { break; } case 82: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000200; - resolution_ = bs; + resolution_ = input.readBytes(); break; } case 90: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000400; - status_ = bs; + status_ = input.readBytes(); break; } case 98: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000800; - checksum_ = bs; + checksum_ = input.readBytes(); break; } case 106: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00001000; - assigneeLogin_ = bs; + assigneeLogin_ = input.readBytes(); break; } case 112: { @@ -366,6 +368,7 @@ public final class BatchInput { } private int bitField0_; + // optional string key = 1; public static final int KEY_FIELD_NUMBER = 1; private java.lang.Object key_; /** @@ -408,6 +411,7 @@ public final class BatchInput { } } + // optional string module_key = 2; public static final int MODULE_KEY_FIELD_NUMBER = 2; private java.lang.Object moduleKey_; /** @@ -450,6 +454,7 @@ public final class BatchInput { } } + // optional string path = 3; public static final int PATH_FIELD_NUMBER = 3; private java.lang.Object path_; /** @@ -492,6 +497,7 @@ public final class BatchInput { } } + // optional string rule_repository = 4; public static final int RULE_REPOSITORY_FIELD_NUMBER = 4; private java.lang.Object ruleRepository_; /** @@ -534,6 +540,7 @@ public final class BatchInput { } } + // optional string rule_key = 5; public static final int RULE_KEY_FIELD_NUMBER = 5; private java.lang.Object ruleKey_; /** @@ -576,6 +583,7 @@ public final class BatchInput { } } + // optional int32 line = 6; public static final int LINE_FIELD_NUMBER = 6; private int line_; /** @@ -591,6 +599,7 @@ public final class BatchInput { return line_; } + // optional string msg = 7; public static final int MSG_FIELD_NUMBER = 7; private java.lang.Object msg_; /** @@ -633,6 +642,7 @@ public final class BatchInput { } } + // optional .Severity severity = 8; public static final int SEVERITY_FIELD_NUMBER = 8; private org.sonar.batch.protocol.Constants.Severity severity_; /** @@ -648,6 +658,7 @@ public final class BatchInput { return severity_; } + // optional bool manual_severity = 9; public static final int MANUAL_SEVERITY_FIELD_NUMBER = 9; private boolean manualSeverity_; /** @@ -663,6 +674,7 @@ public final class BatchInput { return manualSeverity_; } + // optional string resolution = 10; public static final int RESOLUTION_FIELD_NUMBER = 10; private java.lang.Object resolution_; /** @@ -705,6 +717,7 @@ public final class BatchInput { } } + // optional string status = 11; public static final int STATUS_FIELD_NUMBER = 11; private java.lang.Object status_; /** @@ -747,6 +760,7 @@ public final class BatchInput { } } + // optional string checksum = 12; public static final int CHECKSUM_FIELD_NUMBER = 12; private java.lang.Object checksum_; /** @@ -789,6 +803,7 @@ public final class BatchInput { } } + // optional string assignee_login = 13; public static final int ASSIGNEE_LOGIN_FIELD_NUMBER = 13; private java.lang.Object assigneeLogin_; /** @@ -831,6 +846,7 @@ public final class BatchInput { } } + // optional int64 creation_date = 14; public static final int CREATION_DATE_FIELD_NUMBER = 14; private long creationDate_; /** @@ -865,8 +881,7 @@ public final class BatchInput { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -1064,9 +1079,8 @@ public final class BatchInput { * Protobuf type {@code ServerIssue} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:ServerIssue) - org.sonar.batch.protocol.input.BatchInput.ServerIssueOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.input.BatchInput.ServerIssueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.input.BatchInput.internal_static_ServerIssue_descriptor; @@ -1316,6 +1330,7 @@ public final class BatchInput { } private int bitField0_; + // optional string key = 1; private java.lang.Object key_ = ""; /** * optional string key = 1; @@ -1329,12 +1344,9 @@ public final class BatchInput { public java.lang.String getKey() { java.lang.Object ref = key_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - key_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + key_ = s; return s; } else { return (java.lang.String) ref; @@ -1392,6 +1404,7 @@ public final class BatchInput { return this; } + // optional string module_key = 2; private java.lang.Object moduleKey_ = ""; /** * optional string module_key = 2; @@ -1405,12 +1418,9 @@ public final class BatchInput { public java.lang.String getModuleKey() { java.lang.Object ref = moduleKey_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - moduleKey_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + moduleKey_ = s; return s; } else { return (java.lang.String) ref; @@ -1468,6 +1478,7 @@ public final class BatchInput { return this; } + // optional string path = 3; private java.lang.Object path_ = ""; /** * optional string path = 3; @@ -1481,12 +1492,9 @@ public final class BatchInput { public java.lang.String getPath() { java.lang.Object ref = path_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - path_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + path_ = s; return s; } else { return (java.lang.String) ref; @@ -1544,6 +1552,7 @@ public final class BatchInput { return this; } + // optional string rule_repository = 4; private java.lang.Object ruleRepository_ = ""; /** * optional string rule_repository = 4; @@ -1557,12 +1566,9 @@ public final class BatchInput { public java.lang.String getRuleRepository() { java.lang.Object ref = ruleRepository_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - ruleRepository_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + ruleRepository_ = s; return s; } else { return (java.lang.String) ref; @@ -1620,6 +1626,7 @@ public final class BatchInput { return this; } + // optional string rule_key = 5; private java.lang.Object ruleKey_ = ""; /** * optional string rule_key = 5; @@ -1633,12 +1640,9 @@ public final class BatchInput { public java.lang.String getRuleKey() { java.lang.Object ref = ruleKey_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - ruleKey_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + ruleKey_ = s; return s; } else { return (java.lang.String) ref; @@ -1696,6 +1700,7 @@ public final class BatchInput { return this; } + // optional int32 line = 6; private int line_ ; /** * optional int32 line = 6; @@ -1728,6 +1733,7 @@ public final class BatchInput { return this; } + // optional string msg = 7; private java.lang.Object msg_ = ""; /** * optional string msg = 7; @@ -1741,12 +1747,9 @@ public final class BatchInput { public java.lang.String getMsg() { java.lang.Object ref = msg_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - msg_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + msg_ = s; return s; } else { return (java.lang.String) ref; @@ -1804,6 +1807,7 @@ public final class BatchInput { return this; } + // optional .Severity severity = 8; private org.sonar.batch.protocol.Constants.Severity severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; /** * optional .Severity severity = 8; @@ -1839,6 +1843,7 @@ public final class BatchInput { return this; } + // optional bool manual_severity = 9; private boolean manualSeverity_ ; /** * optional bool manual_severity = 9; @@ -1871,6 +1876,7 @@ public final class BatchInput { return this; } + // optional string resolution = 10; private java.lang.Object resolution_ = ""; /** * optional string resolution = 10; @@ -1884,12 +1890,9 @@ public final class BatchInput { public java.lang.String getResolution() { java.lang.Object ref = resolution_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - resolution_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + resolution_ = s; return s; } else { return (java.lang.String) ref; @@ -1947,6 +1950,7 @@ public final class BatchInput { return this; } + // optional string status = 11; private java.lang.Object status_ = ""; /** * optional string status = 11; @@ -1960,12 +1964,9 @@ public final class BatchInput { public java.lang.String getStatus() { java.lang.Object ref = status_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - status_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + status_ = s; return s; } else { return (java.lang.String) ref; @@ -2023,6 +2024,7 @@ public final class BatchInput { return this; } + // optional string checksum = 12; private java.lang.Object checksum_ = ""; /** * optional string checksum = 12; @@ -2036,12 +2038,9 @@ public final class BatchInput { public java.lang.String getChecksum() { java.lang.Object ref = checksum_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - checksum_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + checksum_ = s; return s; } else { return (java.lang.String) ref; @@ -2099,6 +2098,7 @@ public final class BatchInput { return this; } + // optional string assignee_login = 13; private java.lang.Object assigneeLogin_ = ""; /** * optional string assignee_login = 13; @@ -2112,12 +2112,9 @@ public final class BatchInput { public java.lang.String getAssigneeLogin() { java.lang.Object ref = assigneeLogin_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - assigneeLogin_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + assigneeLogin_ = s; return s; } else { return (java.lang.String) ref; @@ -2175,6 +2172,7 @@ public final class BatchInput { return this; } + // optional int64 creation_date = 14; private long creationDate_ ; /** * optional int64 creation_date = 14; @@ -2218,7 +2216,7 @@ public final class BatchInput { // @@protoc_insertion_point(class_scope:ServerIssue) } - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_ServerIssue_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -2243,25 +2241,24 @@ public final class BatchInput { " \001(\003B\"\n\036org.sonar.batch.protocol.inputH\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_ServerIssue_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_ServerIssue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_ServerIssue_descriptor, + new java.lang.String[] { "Key", "ModuleKey", "Path", "RuleRepository", "RuleKey", "Line", "Msg", "Severity", "ManualSeverity", "Resolution", "Status", "Checksum", "AssigneeLogin", "CreationDate", }); + return null; + } + }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { org.sonar.batch.protocol.Constants.getDescriptor(), }, assigner); - internal_static_ServerIssue_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_ServerIssue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_ServerIssue_descriptor, - new java.lang.String[] { "Key", "ModuleKey", "Path", "RuleRepository", "RuleKey", "Line", "Msg", "Severity", "ManualSeverity", "Resolution", "Status", "Checksum", "AssigneeLogin", "CreationDate", }); - org.sonar.batch.protocol.Constants.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/output/BatchReport.java b/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/output/BatchReport.java index 0bdc5dc7df3..16575053a29 100644 --- a/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/output/BatchReport.java +++ b/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/output/BatchReport.java @@ -8,10 +8,10 @@ public final class BatchReport { public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } - public interface MetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:Metadata) - com.google.protobuf.MessageOrBuilder { + public interface MetadataOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional int64 analysis_date = 1; /** * optional int64 analysis_date = 1; */ @@ -21,6 +21,7 @@ public final class BatchReport { */ long getAnalysisDate(); + // optional string project_key = 2; /** * optional string project_key = 2; */ @@ -35,6 +36,7 @@ public final class BatchReport { com.google.protobuf.ByteString getProjectKeyBytes(); + // optional string branch = 6; /** * optional string branch = 6; */ @@ -49,6 +51,7 @@ public final class BatchReport { com.google.protobuf.ByteString getBranchBytes(); + // optional int32 root_component_ref = 3; /** * optional int32 root_component_ref = 3; */ @@ -58,6 +61,7 @@ public final class BatchReport { */ int getRootComponentRef(); + // optional int64 snapshot_id = 4; /** * optional int64 snapshot_id = 4; * @@ -75,6 +79,7 @@ public final class BatchReport { */ long getSnapshotId(); + // optional int32 deleted_components_count = 5; /** * optional int32 deleted_components_count = 5; */ @@ -88,9 +93,8 @@ public final class BatchReport { * Protobuf type {@code Metadata} */ public static final class Metadata extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Metadata) - MetadataOrBuilder { + com.google.protobuf.GeneratedMessage + implements MetadataOrBuilder { // Use Metadata.newBuilder() to construct. private Metadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -142,9 +146,8 @@ public final class BatchReport { break; } case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - projectKey_ = bs; + projectKey_ = input.readBytes(); break; } case 24: { @@ -163,9 +166,8 @@ public final class BatchReport { break; } case 50: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000004; - branch_ = bs; + branch_ = input.readBytes(); break; } } @@ -208,6 +210,7 @@ public final class BatchReport { } private int bitField0_; + // optional int64 analysis_date = 1; public static final int ANALYSIS_DATE_FIELD_NUMBER = 1; private long analysisDate_; /** @@ -223,6 +226,7 @@ public final class BatchReport { return analysisDate_; } + // optional string project_key = 2; public static final int PROJECT_KEY_FIELD_NUMBER = 2; private java.lang.Object projectKey_; /** @@ -265,6 +269,7 @@ public final class BatchReport { } } + // optional string branch = 6; public static final int BRANCH_FIELD_NUMBER = 6; private java.lang.Object branch_; /** @@ -307,6 +312,7 @@ public final class BatchReport { } } + // optional int32 root_component_ref = 3; public static final int ROOT_COMPONENT_REF_FIELD_NUMBER = 3; private int rootComponentRef_; /** @@ -322,6 +328,7 @@ public final class BatchReport { return rootComponentRef_; } + // optional int64 snapshot_id = 4; public static final int SNAPSHOT_ID_FIELD_NUMBER = 4; private long snapshotId_; /** @@ -345,6 +352,7 @@ public final class BatchReport { return snapshotId_; } + // optional int32 deleted_components_count = 5; public static final int DELETED_COMPONENTS_COUNT_FIELD_NUMBER = 5; private int deletedComponentsCount_; /** @@ -371,8 +379,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -514,9 +521,8 @@ public final class BatchReport { * Protobuf type {@code Metadata} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Metadata) - org.sonar.batch.protocol.output.BatchReport.MetadataOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.MetadataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Metadata_descriptor; @@ -678,6 +684,7 @@ public final class BatchReport { } private int bitField0_; + // optional int64 analysis_date = 1; private long analysisDate_ ; /** * optional int64 analysis_date = 1; @@ -710,6 +717,7 @@ public final class BatchReport { return this; } + // optional string project_key = 2; private java.lang.Object projectKey_ = ""; /** * optional string project_key = 2; @@ -723,12 +731,9 @@ public final class BatchReport { public java.lang.String getProjectKey() { java.lang.Object ref = projectKey_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - projectKey_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + projectKey_ = s; return s; } else { return (java.lang.String) ref; @@ -786,6 +791,7 @@ public final class BatchReport { return this; } + // optional string branch = 6; private java.lang.Object branch_ = ""; /** * optional string branch = 6; @@ -799,12 +805,9 @@ public final class BatchReport { public java.lang.String getBranch() { java.lang.Object ref = branch_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - branch_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + branch_ = s; return s; } else { return (java.lang.String) ref; @@ -862,6 +865,7 @@ public final class BatchReport { return this; } + // optional int32 root_component_ref = 3; private int rootComponentRef_ ; /** * optional int32 root_component_ref = 3; @@ -894,6 +898,7 @@ public final class BatchReport { return this; } + // optional int64 snapshot_id = 4; private long snapshotId_ ; /** * optional int64 snapshot_id = 4; @@ -942,6 +947,7 @@ public final class BatchReport { return this; } + // optional int32 deleted_components_count = 5; private int deletedComponentsCount_ ; /** * optional int32 deleted_components_count = 5; @@ -985,10 +991,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Metadata) } - public interface ComponentLinkOrBuilder extends - // @@protoc_insertion_point(interface_extends:ComponentLink) - com.google.protobuf.MessageOrBuilder { + public interface ComponentLinkOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional .ComponentLinkType type = 1; /** * optional .ComponentLinkType type = 1; */ @@ -998,6 +1004,7 @@ public final class BatchReport { */ org.sonar.batch.protocol.Constants.ComponentLinkType getType(); + // optional string href = 2; /** * optional string href = 2; */ @@ -1016,9 +1023,8 @@ public final class BatchReport { * Protobuf type {@code ComponentLink} */ public static final class ComponentLink extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:ComponentLink) - ComponentLinkOrBuilder { + com.google.protobuf.GeneratedMessage + implements ComponentLinkOrBuilder { // Use ComponentLink.newBuilder() to construct. private ComponentLink(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -1076,9 +1082,8 @@ public final class BatchReport { break; } case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - href_ = bs; + href_ = input.readBytes(); break; } } @@ -1121,6 +1126,7 @@ public final class BatchReport { } private int bitField0_; + // optional .ComponentLinkType type = 1; public static final int TYPE_FIELD_NUMBER = 1; private org.sonar.batch.protocol.Constants.ComponentLinkType type_; /** @@ -1136,6 +1142,7 @@ public final class BatchReport { return type_; } + // optional string href = 2; public static final int HREF_FIELD_NUMBER = 2; private java.lang.Object href_; /** @@ -1185,8 +1192,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -1300,9 +1306,8 @@ public final class BatchReport { * Protobuf type {@code ComponentLink} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:ComponentLink) - org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_ComponentLink_descriptor; @@ -1426,6 +1431,7 @@ public final class BatchReport { } private int bitField0_; + // optional .ComponentLinkType type = 1; private org.sonar.batch.protocol.Constants.ComponentLinkType type_ = org.sonar.batch.protocol.Constants.ComponentLinkType.HOME; /** * optional .ComponentLinkType type = 1; @@ -1461,6 +1467,7 @@ public final class BatchReport { return this; } + // optional string href = 2; private java.lang.Object href_ = ""; /** * optional string href = 2; @@ -1474,12 +1481,9 @@ public final class BatchReport { public java.lang.String getHref() { java.lang.Object ref = href_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - href_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + href_ = s; return s; } else { return (java.lang.String) ref; @@ -1548,10 +1552,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:ComponentLink) } - public interface EventOrBuilder extends - // @@protoc_insertion_point(interface_extends:Event) - com.google.protobuf.MessageOrBuilder { + public interface EventOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional int32 component_ref = 1; /** * optional int32 component_ref = 1; */ @@ -1561,6 +1565,7 @@ public final class BatchReport { */ int getComponentRef(); + // optional string name = 2; /** * optional string name = 2; */ @@ -1575,6 +1580,7 @@ public final class BatchReport { com.google.protobuf.ByteString getNameBytes(); + // optional string description = 3; /** * optional string description = 3; */ @@ -1589,6 +1595,7 @@ public final class BatchReport { com.google.protobuf.ByteString getDescriptionBytes(); + // optional .EventCategory category = 4; /** * optional .EventCategory category = 4; */ @@ -1598,6 +1605,7 @@ public final class BatchReport { */ org.sonar.batch.protocol.Constants.EventCategory getCategory(); + // optional string event_data = 5; /** * optional string event_data = 5; */ @@ -1620,9 +1628,8 @@ public final class BatchReport { * */ public static final class Event extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Event) - EventOrBuilder { + com.google.protobuf.GeneratedMessage + implements EventOrBuilder { // Use Event.newBuilder() to construct. private Event(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -1674,15 +1681,13 @@ public final class BatchReport { break; } case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - name_ = bs; + name_ = input.readBytes(); break; } case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000004; - description_ = bs; + description_ = input.readBytes(); break; } case 32: { @@ -1697,9 +1702,8 @@ public final class BatchReport { break; } case 42: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000010; - eventData_ = bs; + eventData_ = input.readBytes(); break; } } @@ -1742,6 +1746,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 component_ref = 1; public static final int COMPONENT_REF_FIELD_NUMBER = 1; private int componentRef_; /** @@ -1757,6 +1762,7 @@ public final class BatchReport { return componentRef_; } + // optional string name = 2; public static final int NAME_FIELD_NUMBER = 2; private java.lang.Object name_; /** @@ -1799,6 +1805,7 @@ public final class BatchReport { } } + // optional string description = 3; public static final int DESCRIPTION_FIELD_NUMBER = 3; private java.lang.Object description_; /** @@ -1841,6 +1848,7 @@ public final class BatchReport { } } + // optional .EventCategory category = 4; public static final int CATEGORY_FIELD_NUMBER = 4; private org.sonar.batch.protocol.Constants.EventCategory category_; /** @@ -1856,6 +1864,7 @@ public final class BatchReport { return category_; } + // optional string event_data = 5; public static final int EVENT_DATA_FIELD_NUMBER = 5; private java.lang.Object eventData_; /** @@ -1908,8 +1917,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -2048,9 +2056,8 @@ public final class BatchReport { * */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Event) - org.sonar.batch.protocol.output.BatchReport.EventOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.EventOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Event_descriptor; @@ -2205,6 +2212,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 component_ref = 1; private int componentRef_ ; /** * optional int32 component_ref = 1; @@ -2237,6 +2245,7 @@ public final class BatchReport { return this; } + // optional string name = 2; private java.lang.Object name_ = ""; /** * optional string name = 2; @@ -2250,12 +2259,9 @@ public final class BatchReport { public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + name_ = s; return s; } else { return (java.lang.String) ref; @@ -2313,6 +2319,7 @@ public final class BatchReport { return this; } + // optional string description = 3; private java.lang.Object description_ = ""; /** * optional string description = 3; @@ -2326,12 +2333,9 @@ public final class BatchReport { public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - description_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + description_ = s; return s; } else { return (java.lang.String) ref; @@ -2389,6 +2393,7 @@ public final class BatchReport { return this; } + // optional .EventCategory category = 4; private org.sonar.batch.protocol.Constants.EventCategory category_ = org.sonar.batch.protocol.Constants.EventCategory.ALERT; /** * optional .EventCategory category = 4; @@ -2424,6 +2429,7 @@ public final class BatchReport { return this; } + // optional string event_data = 5; private java.lang.Object eventData_ = ""; /** * optional string event_data = 5; @@ -2437,12 +2443,9 @@ public final class BatchReport { public java.lang.String getEventData() { java.lang.Object ref = eventData_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - eventData_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + eventData_ = s; return s; } else { return (java.lang.String) ref; @@ -2511,10 +2514,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Event) } - public interface ComponentOrBuilder extends - // @@protoc_insertion_point(interface_extends:Component) - com.google.protobuf.MessageOrBuilder { + public interface ComponentOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional int32 ref = 1; /** * optional int32 ref = 1; */ @@ -2524,6 +2527,7 @@ public final class BatchReport { */ int getRef(); + // optional string path = 2; /** * optional string path = 2; */ @@ -2538,6 +2542,7 @@ public final class BatchReport { com.google.protobuf.ByteString getPathBytes(); + // optional string name = 3; /** * optional string name = 3; */ @@ -2552,6 +2557,7 @@ public final class BatchReport { com.google.protobuf.ByteString getNameBytes(); + // optional .ComponentType type = 4; /** * optional .ComponentType type = 4; */ @@ -2561,6 +2567,7 @@ public final class BatchReport { */ org.sonar.batch.protocol.Constants.ComponentType getType(); + // optional bool is_test = 5; /** * optional bool is_test = 5; */ @@ -2570,6 +2577,7 @@ public final class BatchReport { */ boolean getIsTest(); + // optional string language = 6; /** * optional string language = 6; */ @@ -2584,6 +2592,7 @@ public final class BatchReport { com.google.protobuf.ByteString getLanguageBytes(); + // repeated int32 child_ref = 7 [packed = true]; /** * repeated int32 child_ref = 7 [packed = true]; */ @@ -2597,6 +2606,7 @@ public final class BatchReport { */ int getChildRef(int index); + // repeated .ComponentLink link = 10; /** * repeated .ComponentLink link = 10; */ @@ -2621,6 +2631,7 @@ public final class BatchReport { org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder getLinkOrBuilder( int index); + // optional string version = 12; /** * optional string version = 12; * @@ -2647,6 +2658,7 @@ public final class BatchReport { com.google.protobuf.ByteString getVersionBytes(); + // optional string key = 14; /** * optional string key = 14; * @@ -2673,6 +2685,7 @@ public final class BatchReport { com.google.protobuf.ByteString getKeyBytes(); + // optional int32 lines = 15; /** * optional int32 lines = 15; * @@ -2690,6 +2703,7 @@ public final class BatchReport { */ int getLines(); + // optional int64 id = 13; /** * optional int64 id = 13; * @@ -2707,6 +2721,7 @@ public final class BatchReport { */ long getId(); + // optional int64 snapshot_id = 8; /** * optional int64 snapshot_id = 8; */ @@ -2716,6 +2731,7 @@ public final class BatchReport { */ long getSnapshotId(); + // optional string uuid = 9; /** * optional string uuid = 9; */ @@ -2730,6 +2746,7 @@ public final class BatchReport { com.google.protobuf.ByteString getUuidBytes(); + // repeated .Event event = 11; /** * repeated .Event event = 11; */ @@ -2758,9 +2775,8 @@ public final class BatchReport { * Protobuf type {@code Component} */ public static final class Component extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Component) - ComponentOrBuilder { + com.google.protobuf.GeneratedMessage + implements ComponentOrBuilder { // Use Component.newBuilder() to construct. private Component(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -2812,15 +2828,13 @@ public final class BatchReport { break; } case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - path_ = bs; + path_ = input.readBytes(); break; } case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000004; - name_ = bs; + name_ = input.readBytes(); break; } case 32: { @@ -2840,9 +2854,8 @@ public final class BatchReport { break; } case 50: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000020; - language_ = bs; + language_ = input.readBytes(); break; } case 56: { @@ -2872,9 +2885,8 @@ public final class BatchReport { break; } case 74: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000800; - uuid_ = bs; + uuid_ = input.readBytes(); break; } case 82: { @@ -2894,9 +2906,8 @@ public final class BatchReport { break; } case 98: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000040; - version_ = bs; + version_ = input.readBytes(); break; } case 104: { @@ -2905,9 +2916,8 @@ public final class BatchReport { break; } case 114: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000080; - key_ = bs; + key_ = input.readBytes(); break; } case 120: { @@ -2964,6 +2974,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 ref = 1; public static final int REF_FIELD_NUMBER = 1; private int ref_; /** @@ -2979,6 +2990,7 @@ public final class BatchReport { return ref_; } + // optional string path = 2; public static final int PATH_FIELD_NUMBER = 2; private java.lang.Object path_; /** @@ -3021,6 +3033,7 @@ public final class BatchReport { } } + // optional string name = 3; public static final int NAME_FIELD_NUMBER = 3; private java.lang.Object name_; /** @@ -3063,6 +3076,7 @@ public final class BatchReport { } } + // optional .ComponentType type = 4; public static final int TYPE_FIELD_NUMBER = 4; private org.sonar.batch.protocol.Constants.ComponentType type_; /** @@ -3078,6 +3092,7 @@ public final class BatchReport { return type_; } + // optional bool is_test = 5; public static final int IS_TEST_FIELD_NUMBER = 5; private boolean isTest_; /** @@ -3093,6 +3108,7 @@ public final class BatchReport { return isTest_; } + // optional string language = 6; public static final int LANGUAGE_FIELD_NUMBER = 6; private java.lang.Object language_; /** @@ -3135,6 +3151,7 @@ public final class BatchReport { } } + // repeated int32 child_ref = 7 [packed = true]; public static final int CHILD_REF_FIELD_NUMBER = 7; private java.util.List childRef_; /** @@ -3158,6 +3175,7 @@ public final class BatchReport { } private int childRefMemoizedSerializedSize = -1; + // repeated .ComponentLink link = 10; public static final int LINK_FIELD_NUMBER = 10; private java.util.List link_; /** @@ -3193,6 +3211,7 @@ public final class BatchReport { return link_.get(index); } + // optional string version = 12; public static final int VERSION_FIELD_NUMBER = 12; private java.lang.Object version_; /** @@ -3247,6 +3266,7 @@ public final class BatchReport { } } + // optional string key = 14; public static final int KEY_FIELD_NUMBER = 14; private java.lang.Object key_; /** @@ -3301,6 +3321,7 @@ public final class BatchReport { } } + // optional int32 lines = 15; public static final int LINES_FIELD_NUMBER = 15; private int lines_; /** @@ -3324,6 +3345,7 @@ public final class BatchReport { return lines_; } + // optional int64 id = 13; public static final int ID_FIELD_NUMBER = 13; private long id_; /** @@ -3347,6 +3369,7 @@ public final class BatchReport { return id_; } + // optional int64 snapshot_id = 8; public static final int SNAPSHOT_ID_FIELD_NUMBER = 8; private long snapshotId_; /** @@ -3362,6 +3385,7 @@ public final class BatchReport { return snapshotId_; } + // optional string uuid = 9; public static final int UUID_FIELD_NUMBER = 9; private java.lang.Object uuid_; /** @@ -3404,6 +3428,7 @@ public final class BatchReport { } } + // repeated .Event event = 11; public static final int EVENT_FIELD_NUMBER = 11; private java.util.List event_; /** @@ -3459,8 +3484,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -3679,9 +3703,8 @@ public final class BatchReport { * Protobuf type {@code Component} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Component) - org.sonar.batch.protocol.output.BatchReport.ComponentOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.ComponentOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Component_descriptor; @@ -4006,6 +4029,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 ref = 1; private int ref_ ; /** * optional int32 ref = 1; @@ -4038,6 +4062,7 @@ public final class BatchReport { return this; } + // optional string path = 2; private java.lang.Object path_ = ""; /** * optional string path = 2; @@ -4051,12 +4076,9 @@ public final class BatchReport { public java.lang.String getPath() { java.lang.Object ref = path_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - path_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + path_ = s; return s; } else { return (java.lang.String) ref; @@ -4114,6 +4136,7 @@ public final class BatchReport { return this; } + // optional string name = 3; private java.lang.Object name_ = ""; /** * optional string name = 3; @@ -4127,12 +4150,9 @@ public final class BatchReport { public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + name_ = s; return s; } else { return (java.lang.String) ref; @@ -4190,6 +4210,7 @@ public final class BatchReport { return this; } + // optional .ComponentType type = 4; private org.sonar.batch.protocol.Constants.ComponentType type_ = org.sonar.batch.protocol.Constants.ComponentType.PROJECT; /** * optional .ComponentType type = 4; @@ -4225,6 +4246,7 @@ public final class BatchReport { return this; } + // optional bool is_test = 5; private boolean isTest_ ; /** * optional bool is_test = 5; @@ -4257,6 +4279,7 @@ public final class BatchReport { return this; } + // optional string language = 6; private java.lang.Object language_ = ""; /** * optional string language = 6; @@ -4270,12 +4293,9 @@ public final class BatchReport { public java.lang.String getLanguage() { java.lang.Object ref = language_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - language_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + language_ = s; return s; } else { return (java.lang.String) ref; @@ -4333,6 +4353,7 @@ public final class BatchReport { return this; } + // repeated int32 child_ref = 7 [packed = true]; private java.util.List childRef_ = java.util.Collections.emptyList(); private void ensureChildRefIsMutable() { if (!((bitField0_ & 0x00000040) == 0x00000040)) { @@ -4384,8 +4405,7 @@ public final class BatchReport { public Builder addAllChildRef( java.lang.Iterable values) { ensureChildRefIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, childRef_); + super.addAll(values, childRef_); onChanged(); return this; } @@ -4399,6 +4419,7 @@ public final class BatchReport { return this; } + // repeated .ComponentLink link = 10; private java.util.List link_ = java.util.Collections.emptyList(); private void ensureLinkIsMutable() { @@ -4540,8 +4561,7 @@ public final class BatchReport { java.lang.Iterable values) { if (linkBuilder_ == null) { ensureLinkIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, link_); + super.addAll(values, link_); onChanged(); } else { linkBuilder_.addAllMessages(values); @@ -4639,6 +4659,7 @@ public final class BatchReport { return linkBuilder_; } + // optional string version = 12; private java.lang.Object version_ = ""; /** * optional string version = 12; @@ -4660,12 +4681,9 @@ public final class BatchReport { public java.lang.String getVersion() { java.lang.Object ref = version_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - version_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + version_ = s; return s; } else { return (java.lang.String) ref; @@ -4739,6 +4757,7 @@ public final class BatchReport { return this; } + // optional string key = 14; private java.lang.Object key_ = ""; /** * optional string key = 14; @@ -4760,12 +4779,9 @@ public final class BatchReport { public java.lang.String getKey() { java.lang.Object ref = key_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - key_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + key_ = s; return s; } else { return (java.lang.String) ref; @@ -4839,6 +4855,7 @@ public final class BatchReport { return this; } + // optional int32 lines = 15; private int lines_ ; /** * optional int32 lines = 15; @@ -4887,6 +4904,7 @@ public final class BatchReport { return this; } + // optional int64 id = 13; private long id_ ; /** * optional int64 id = 13; @@ -4935,6 +4953,7 @@ public final class BatchReport { return this; } + // optional int64 snapshot_id = 8; private long snapshotId_ ; /** * optional int64 snapshot_id = 8; @@ -4967,6 +4986,7 @@ public final class BatchReport { return this; } + // optional string uuid = 9; private java.lang.Object uuid_ = ""; /** * optional string uuid = 9; @@ -4980,12 +5000,9 @@ public final class BatchReport { public java.lang.String getUuid() { java.lang.Object ref = uuid_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - uuid_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + uuid_ = s; return s; } else { return (java.lang.String) ref; @@ -5043,6 +5060,7 @@ public final class BatchReport { return this; } + // repeated .Event event = 11; private java.util.List event_ = java.util.Collections.emptyList(); private void ensureEventIsMutable() { @@ -5184,8 +5202,7 @@ public final class BatchReport { java.lang.Iterable values) { if (eventBuilder_ == null) { ensureEventIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, event_); + super.addAll(values, event_); onChanged(); } else { eventBuilder_.addAllMessages(values); @@ -5294,10 +5311,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Component) } - public interface MeasureOrBuilder extends - // @@protoc_insertion_point(interface_extends:Measure) - com.google.protobuf.MessageOrBuilder { + public interface MeasureOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional .MeasureValueType value_type = 1; /** * optional .MeasureValueType value_type = 1; */ @@ -5307,6 +5324,7 @@ public final class BatchReport { */ org.sonar.batch.protocol.Constants.MeasureValueType getValueType(); + // optional bool boolean_value = 2; /** * optional bool boolean_value = 2; * @@ -5324,6 +5342,7 @@ public final class BatchReport { */ boolean getBooleanValue(); + // optional int32 int_value = 3; /** * optional int32 int_value = 3; */ @@ -5333,6 +5352,7 @@ public final class BatchReport { */ int getIntValue(); + // optional int64 long_value = 4; /** * optional int64 long_value = 4; */ @@ -5342,6 +5362,7 @@ public final class BatchReport { */ long getLongValue(); + // optional double double_value = 5; /** * optional double double_value = 5; */ @@ -5351,6 +5372,7 @@ public final class BatchReport { */ double getDoubleValue(); + // optional string string_value = 6; /** * optional string string_value = 6; */ @@ -5365,6 +5387,7 @@ public final class BatchReport { com.google.protobuf.ByteString getStringValueBytes(); + // optional string metric_key = 7; /** * optional string metric_key = 7; */ @@ -5379,6 +5402,7 @@ public final class BatchReport { com.google.protobuf.ByteString getMetricKeyBytes(); + // optional string description = 9; /** * optional string description = 9; * @@ -5405,6 +5429,7 @@ public final class BatchReport { com.google.protobuf.ByteString getDescriptionBytes(); + // optional string rule_key = 10; /** * optional string rule_key = 10; */ @@ -5419,6 +5444,7 @@ public final class BatchReport { com.google.protobuf.ByteString getRuleKeyBytes(); + // optional .Severity severity = 11; /** * optional .Severity severity = 11; */ @@ -5428,6 +5454,7 @@ public final class BatchReport { */ org.sonar.batch.protocol.Constants.Severity getSeverity(); + // optional string alert_status = 12; /** * optional string alert_status = 12; */ @@ -5442,6 +5469,7 @@ public final class BatchReport { com.google.protobuf.ByteString getAlertStatusBytes(); + // optional string alert_text = 13; /** * optional string alert_text = 13; */ @@ -5456,6 +5484,7 @@ public final class BatchReport { com.google.protobuf.ByteString getAlertTextBytes(); + // optional double variation_value_1 = 14; /** * optional double variation_value_1 = 14; */ @@ -5465,6 +5494,7 @@ public final class BatchReport { */ double getVariationValue1(); + // optional double variation_value_2 = 15; /** * optional double variation_value_2 = 15; */ @@ -5474,6 +5504,7 @@ public final class BatchReport { */ double getVariationValue2(); + // optional double variation_value_3 = 16; /** * optional double variation_value_3 = 16; */ @@ -5483,6 +5514,7 @@ public final class BatchReport { */ double getVariationValue3(); + // optional double variation_value_4 = 17; /** * optional double variation_value_4 = 17; */ @@ -5492,6 +5524,7 @@ public final class BatchReport { */ double getVariationValue4(); + // optional double variation_value_5 = 18; /** * optional double variation_value_5 = 18; */ @@ -5501,21 +5534,23 @@ public final class BatchReport { */ double getVariationValue5(); + // optional int32 characteric_id = 19; /** - * optional int32 characteric_id = 20; + * optional int32 characteric_id = 19; */ boolean hasCharactericId(); /** - * optional int32 characteric_id = 20; + * optional int32 characteric_id = 19; */ int getCharactericId(); + // optional int32 person_id = 20; /** - * optional int32 person_id = 21; + * optional int32 person_id = 20; */ boolean hasPersonId(); /** - * optional int32 person_id = 21; + * optional int32 person_id = 20; */ int getPersonId(); } @@ -5523,9 +5558,8 @@ public final class BatchReport { * Protobuf type {@code Measure} */ public static final class Measure extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Measure) - MeasureOrBuilder { + com.google.protobuf.GeneratedMessage + implements MeasureOrBuilder { // Use Measure.newBuilder() to construct. private Measure(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -5603,27 +5637,23 @@ public final class BatchReport { break; } case 50: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000020; - stringValue_ = bs; + stringValue_ = input.readBytes(); break; } case 58: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000040; - metricKey_ = bs; + metricKey_ = input.readBytes(); break; } case 74: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000080; - description_ = bs; + description_ = input.readBytes(); break; } case 82: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000100; - ruleKey_ = bs; + ruleKey_ = input.readBytes(); break; } case 88: { @@ -5638,15 +5668,13 @@ public final class BatchReport { break; } case 98: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000400; - alertStatus_ = bs; + alertStatus_ = input.readBytes(); break; } case 106: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000800; - alertText_ = bs; + alertText_ = input.readBytes(); break; } case 113: { @@ -5674,12 +5702,12 @@ public final class BatchReport { variationValue5_ = input.readDouble(); break; } - case 160: { + case 152: { bitField0_ |= 0x00020000; charactericId_ = input.readInt32(); break; } - case 168: { + case 160: { bitField0_ |= 0x00040000; personId_ = input.readInt32(); break; @@ -5724,6 +5752,7 @@ public final class BatchReport { } private int bitField0_; + // optional .MeasureValueType value_type = 1; public static final int VALUE_TYPE_FIELD_NUMBER = 1; private org.sonar.batch.protocol.Constants.MeasureValueType valueType_; /** @@ -5739,6 +5768,7 @@ public final class BatchReport { return valueType_; } + // optional bool boolean_value = 2; public static final int BOOLEAN_VALUE_FIELD_NUMBER = 2; private boolean booleanValue_; /** @@ -5762,6 +5792,7 @@ public final class BatchReport { return booleanValue_; } + // optional int32 int_value = 3; public static final int INT_VALUE_FIELD_NUMBER = 3; private int intValue_; /** @@ -5777,6 +5808,7 @@ public final class BatchReport { return intValue_; } + // optional int64 long_value = 4; public static final int LONG_VALUE_FIELD_NUMBER = 4; private long longValue_; /** @@ -5792,6 +5824,7 @@ public final class BatchReport { return longValue_; } + // optional double double_value = 5; public static final int DOUBLE_VALUE_FIELD_NUMBER = 5; private double doubleValue_; /** @@ -5807,6 +5840,7 @@ public final class BatchReport { return doubleValue_; } + // optional string string_value = 6; public static final int STRING_VALUE_FIELD_NUMBER = 6; private java.lang.Object stringValue_; /** @@ -5849,6 +5883,7 @@ public final class BatchReport { } } + // optional string metric_key = 7; public static final int METRIC_KEY_FIELD_NUMBER = 7; private java.lang.Object metricKey_; /** @@ -5891,6 +5926,7 @@ public final class BatchReport { } } + // optional string description = 9; public static final int DESCRIPTION_FIELD_NUMBER = 9; private java.lang.Object description_; /** @@ -5945,6 +5981,7 @@ public final class BatchReport { } } + // optional string rule_key = 10; public static final int RULE_KEY_FIELD_NUMBER = 10; private java.lang.Object ruleKey_; /** @@ -5987,6 +6024,7 @@ public final class BatchReport { } } + // optional .Severity severity = 11; public static final int SEVERITY_FIELD_NUMBER = 11; private org.sonar.batch.protocol.Constants.Severity severity_; /** @@ -6002,6 +6040,7 @@ public final class BatchReport { return severity_; } + // optional string alert_status = 12; public static final int ALERT_STATUS_FIELD_NUMBER = 12; private java.lang.Object alertStatus_; /** @@ -6044,6 +6083,7 @@ public final class BatchReport { } } + // optional string alert_text = 13; public static final int ALERT_TEXT_FIELD_NUMBER = 13; private java.lang.Object alertText_; /** @@ -6086,6 +6126,7 @@ public final class BatchReport { } } + // optional double variation_value_1 = 14; public static final int VARIATION_VALUE_1_FIELD_NUMBER = 14; private double variationValue1_; /** @@ -6101,6 +6142,7 @@ public final class BatchReport { return variationValue1_; } + // optional double variation_value_2 = 15; public static final int VARIATION_VALUE_2_FIELD_NUMBER = 15; private double variationValue2_; /** @@ -6116,6 +6158,7 @@ public final class BatchReport { return variationValue2_; } + // optional double variation_value_3 = 16; public static final int VARIATION_VALUE_3_FIELD_NUMBER = 16; private double variationValue3_; /** @@ -6131,6 +6174,7 @@ public final class BatchReport { return variationValue3_; } + // optional double variation_value_4 = 17; public static final int VARIATION_VALUE_4_FIELD_NUMBER = 17; private double variationValue4_; /** @@ -6146,6 +6190,7 @@ public final class BatchReport { return variationValue4_; } + // optional double variation_value_5 = 18; public static final int VARIATION_VALUE_5_FIELD_NUMBER = 18; private double variationValue5_; /** @@ -6161,31 +6206,33 @@ public final class BatchReport { return variationValue5_; } - public static final int CHARACTERIC_ID_FIELD_NUMBER = 20; + // optional int32 characteric_id = 19; + public static final int CHARACTERIC_ID_FIELD_NUMBER = 19; private int charactericId_; /** - * optional int32 characteric_id = 20; + * optional int32 characteric_id = 19; */ public boolean hasCharactericId() { return ((bitField0_ & 0x00020000) == 0x00020000); } /** - * optional int32 characteric_id = 20; + * optional int32 characteric_id = 19; */ public int getCharactericId() { return charactericId_; } - public static final int PERSON_ID_FIELD_NUMBER = 21; + // optional int32 person_id = 20; + public static final int PERSON_ID_FIELD_NUMBER = 20; private int personId_; /** - * optional int32 person_id = 21; + * optional int32 person_id = 20; */ public boolean hasPersonId() { return ((bitField0_ & 0x00040000) == 0x00040000); } /** - * optional int32 person_id = 21; + * optional int32 person_id = 20; */ public int getPersonId() { return personId_; @@ -6215,8 +6262,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -6277,10 +6323,10 @@ public final class BatchReport { output.writeDouble(18, variationValue5_); } if (((bitField0_ & 0x00020000) == 0x00020000)) { - output.writeInt32(20, charactericId_); + output.writeInt32(19, charactericId_); } if (((bitField0_ & 0x00040000) == 0x00040000)) { - output.writeInt32(21, personId_); + output.writeInt32(20, personId_); } getUnknownFields().writeTo(output); } @@ -6361,11 +6407,11 @@ public final class BatchReport { } if (((bitField0_ & 0x00020000) == 0x00020000)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(20, charactericId_); + .computeInt32Size(19, charactericId_); } if (((bitField0_ & 0x00040000) == 0x00040000)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(21, personId_); + .computeInt32Size(20, personId_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -6449,9 +6495,8 @@ public final class BatchReport { * Protobuf type {@code Measure} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Measure) - org.sonar.batch.protocol.output.BatchReport.MeasureOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.MeasureOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Measure_descriptor; @@ -6738,6 +6783,7 @@ public final class BatchReport { } private int bitField0_; + // optional .MeasureValueType value_type = 1; private org.sonar.batch.protocol.Constants.MeasureValueType valueType_ = org.sonar.batch.protocol.Constants.MeasureValueType.INT; /** * optional .MeasureValueType value_type = 1; @@ -6773,6 +6819,7 @@ public final class BatchReport { return this; } + // optional bool boolean_value = 2; private boolean booleanValue_ ; /** * optional bool boolean_value = 2; @@ -6821,6 +6868,7 @@ public final class BatchReport { return this; } + // optional int32 int_value = 3; private int intValue_ ; /** * optional int32 int_value = 3; @@ -6853,6 +6901,7 @@ public final class BatchReport { return this; } + // optional int64 long_value = 4; private long longValue_ ; /** * optional int64 long_value = 4; @@ -6885,6 +6934,7 @@ public final class BatchReport { return this; } + // optional double double_value = 5; private double doubleValue_ ; /** * optional double double_value = 5; @@ -6917,6 +6967,7 @@ public final class BatchReport { return this; } + // optional string string_value = 6; private java.lang.Object stringValue_ = ""; /** * optional string string_value = 6; @@ -6930,12 +6981,9 @@ public final class BatchReport { public java.lang.String getStringValue() { java.lang.Object ref = stringValue_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - stringValue_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + stringValue_ = s; return s; } else { return (java.lang.String) ref; @@ -6993,6 +7041,7 @@ public final class BatchReport { return this; } + // optional string metric_key = 7; private java.lang.Object metricKey_ = ""; /** * optional string metric_key = 7; @@ -7006,12 +7055,9 @@ public final class BatchReport { public java.lang.String getMetricKey() { java.lang.Object ref = metricKey_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - metricKey_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + metricKey_ = s; return s; } else { return (java.lang.String) ref; @@ -7069,6 +7115,7 @@ public final class BatchReport { return this; } + // optional string description = 9; private java.lang.Object description_ = ""; /** * optional string description = 9; @@ -7090,12 +7137,9 @@ public final class BatchReport { public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - description_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + description_ = s; return s; } else { return (java.lang.String) ref; @@ -7169,6 +7213,7 @@ public final class BatchReport { return this; } + // optional string rule_key = 10; private java.lang.Object ruleKey_ = ""; /** * optional string rule_key = 10; @@ -7182,12 +7227,9 @@ public final class BatchReport { public java.lang.String getRuleKey() { java.lang.Object ref = ruleKey_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - ruleKey_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + ruleKey_ = s; return s; } else { return (java.lang.String) ref; @@ -7245,6 +7287,7 @@ public final class BatchReport { return this; } + // optional .Severity severity = 11; private org.sonar.batch.protocol.Constants.Severity severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; /** * optional .Severity severity = 11; @@ -7280,6 +7323,7 @@ public final class BatchReport { return this; } + // optional string alert_status = 12; private java.lang.Object alertStatus_ = ""; /** * optional string alert_status = 12; @@ -7293,12 +7337,9 @@ public final class BatchReport { public java.lang.String getAlertStatus() { java.lang.Object ref = alertStatus_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - alertStatus_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + alertStatus_ = s; return s; } else { return (java.lang.String) ref; @@ -7356,6 +7397,7 @@ public final class BatchReport { return this; } + // optional string alert_text = 13; private java.lang.Object alertText_ = ""; /** * optional string alert_text = 13; @@ -7369,12 +7411,9 @@ public final class BatchReport { public java.lang.String getAlertText() { java.lang.Object ref = alertText_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - alertText_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + alertText_ = s; return s; } else { return (java.lang.String) ref; @@ -7432,6 +7471,7 @@ public final class BatchReport { return this; } + // optional double variation_value_1 = 14; private double variationValue1_ ; /** * optional double variation_value_1 = 14; @@ -7464,6 +7504,7 @@ public final class BatchReport { return this; } + // optional double variation_value_2 = 15; private double variationValue2_ ; /** * optional double variation_value_2 = 15; @@ -7496,6 +7537,7 @@ public final class BatchReport { return this; } + // optional double variation_value_3 = 16; private double variationValue3_ ; /** * optional double variation_value_3 = 16; @@ -7528,6 +7570,7 @@ public final class BatchReport { return this; } + // optional double variation_value_4 = 17; private double variationValue4_ ; /** * optional double variation_value_4 = 17; @@ -7560,6 +7603,7 @@ public final class BatchReport { return this; } + // optional double variation_value_5 = 18; private double variationValue5_ ; /** * optional double variation_value_5 = 18; @@ -7592,21 +7636,22 @@ public final class BatchReport { return this; } + // optional int32 characteric_id = 19; private int charactericId_ ; /** - * optional int32 characteric_id = 20; + * optional int32 characteric_id = 19; */ public boolean hasCharactericId() { return ((bitField0_ & 0x00020000) == 0x00020000); } /** - * optional int32 characteric_id = 20; + * optional int32 characteric_id = 19; */ public int getCharactericId() { return charactericId_; } /** - * optional int32 characteric_id = 20; + * optional int32 characteric_id = 19; */ public Builder setCharactericId(int value) { bitField0_ |= 0x00020000; @@ -7615,7 +7660,7 @@ public final class BatchReport { return this; } /** - * optional int32 characteric_id = 20; + * optional int32 characteric_id = 19; */ public Builder clearCharactericId() { bitField0_ = (bitField0_ & ~0x00020000); @@ -7624,21 +7669,22 @@ public final class BatchReport { return this; } + // optional int32 person_id = 20; private int personId_ ; /** - * optional int32 person_id = 21; + * optional int32 person_id = 20; */ public boolean hasPersonId() { return ((bitField0_ & 0x00040000) == 0x00040000); } /** - * optional int32 person_id = 21; + * optional int32 person_id = 20; */ public int getPersonId() { return personId_; } /** - * optional int32 person_id = 21; + * optional int32 person_id = 20; */ public Builder setPersonId(int value) { bitField0_ |= 0x00040000; @@ -7647,7 +7693,7 @@ public final class BatchReport { return this; } /** - * optional int32 person_id = 21; + * optional int32 person_id = 20; */ public Builder clearPersonId() { bitField0_ = (bitField0_ & ~0x00040000); @@ -7667,10 +7713,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Measure) } - public interface MeasuresOrBuilder extends - // @@protoc_insertion_point(interface_extends:Measures) - com.google.protobuf.MessageOrBuilder { + public interface MeasuresOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional int32 component_ref = 1; /** * optional int32 component_ref = 1; */ @@ -7680,6 +7726,7 @@ public final class BatchReport { */ int getComponentRef(); + // repeated .Measure measure = 2; /** * repeated .Measure measure = 2; */ @@ -7708,9 +7755,8 @@ public final class BatchReport { * Protobuf type {@code Measures} */ public static final class Measures extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Measures) - MeasuresOrBuilder { + com.google.protobuf.GeneratedMessage + implements MeasuresOrBuilder { // Use Measures.newBuilder() to construct. private Measures(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -7812,6 +7858,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 component_ref = 1; public static final int COMPONENT_REF_FIELD_NUMBER = 1; private int componentRef_; /** @@ -7827,6 +7874,7 @@ public final class BatchReport { return componentRef_; } + // repeated .Measure measure = 2; public static final int MEASURE_FIELD_NUMBER = 2; private java.util.List measure_; /** @@ -7869,8 +7917,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -7984,9 +8031,8 @@ public final class BatchReport { * Protobuf type {@code Measures} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Measures) - org.sonar.batch.protocol.output.BatchReport.MeasuresOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.MeasuresOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Measures_descriptor; @@ -8141,6 +8187,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 component_ref = 1; private int componentRef_ ; /** * optional int32 component_ref = 1; @@ -8173,6 +8220,7 @@ public final class BatchReport { return this; } + // repeated .Measure measure = 2; private java.util.List measure_ = java.util.Collections.emptyList(); private void ensureMeasureIsMutable() { @@ -8314,8 +8362,7 @@ public final class BatchReport { java.lang.Iterable values) { if (measureBuilder_ == null) { ensureMeasureIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, measure_); + super.addAll(values, measure_); onChanged(); } else { measureBuilder_.addAllMessages(values); @@ -8424,10 +8471,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Measures) } - public interface IssueOrBuilder extends - // @@protoc_insertion_point(interface_extends:Issue) - com.google.protobuf.MessageOrBuilder { + public interface IssueOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional string rule_repository = 1; /** * optional string rule_repository = 1; */ @@ -8442,6 +8489,7 @@ public final class BatchReport { com.google.protobuf.ByteString getRuleRepositoryBytes(); + // optional string rule_key = 2; /** * optional string rule_key = 2; */ @@ -8456,6 +8504,7 @@ public final class BatchReport { com.google.protobuf.ByteString getRuleKeyBytes(); + // optional int32 line = 3; /** * optional int32 line = 3; */ @@ -8465,6 +8514,7 @@ public final class BatchReport { */ int getLine(); + // optional string msg = 4; /** * optional string msg = 4; */ @@ -8479,6 +8529,7 @@ public final class BatchReport { com.google.protobuf.ByteString getMsgBytes(); + // optional .Severity severity = 5; /** * optional .Severity severity = 5; */ @@ -8488,11 +8539,12 @@ public final class BatchReport { */ org.sonar.batch.protocol.Constants.Severity getSeverity(); + // repeated string tag = 6; /** * repeated string tag = 6; */ - com.google.protobuf.ProtocolStringList - getTagList(); + java.util.List + getTagList(); /** * repeated string tag = 6; */ @@ -8507,6 +8559,7 @@ public final class BatchReport { com.google.protobuf.ByteString getTagBytes(int index); + // optional double effort_to_fix = 7; /** * optional double effort_to_fix = 7; * @@ -8524,6 +8577,7 @@ public final class BatchReport { */ double getEffortToFix(); + // optional bool is_new = 8; /** * optional bool is_new = 8; */ @@ -8533,6 +8587,7 @@ public final class BatchReport { */ boolean getIsNew(); + // optional string uuid = 9; /** * optional string uuid = 9; */ @@ -8547,6 +8602,7 @@ public final class BatchReport { com.google.protobuf.ByteString getUuidBytes(); + // optional int64 debt_in_minutes = 10; /** * optional int64 debt_in_minutes = 10; */ @@ -8556,6 +8612,7 @@ public final class BatchReport { */ long getDebtInMinutes(); + // optional string resolution = 11; /** * optional string resolution = 11; */ @@ -8570,6 +8627,7 @@ public final class BatchReport { com.google.protobuf.ByteString getResolutionBytes(); + // optional string status = 12; /** * optional string status = 12; */ @@ -8584,6 +8642,7 @@ public final class BatchReport { com.google.protobuf.ByteString getStatusBytes(); + // optional string checksum = 13; /** * optional string checksum = 13; */ @@ -8598,6 +8657,7 @@ public final class BatchReport { com.google.protobuf.ByteString getChecksumBytes(); + // optional bool manual_severity = 14; /** * optional bool manual_severity = 14; */ @@ -8607,6 +8667,7 @@ public final class BatchReport { */ boolean getManualSeverity(); + // optional string reporter = 15; /** * optional string reporter = 15; */ @@ -8621,6 +8682,7 @@ public final class BatchReport { com.google.protobuf.ByteString getReporterBytes(); + // optional string assignee = 16; /** * optional string assignee = 16; */ @@ -8635,6 +8697,7 @@ public final class BatchReport { com.google.protobuf.ByteString getAssigneeBytes(); + // optional string action_plan_key = 17; /** * optional string action_plan_key = 17; */ @@ -8649,6 +8712,7 @@ public final class BatchReport { com.google.protobuf.ByteString getActionPlanKeyBytes(); + // optional string attributes = 18; /** * optional string attributes = 18; */ @@ -8663,6 +8727,7 @@ public final class BatchReport { com.google.protobuf.ByteString getAttributesBytes(); + // optional string author_login = 19; /** * optional string author_login = 19; */ @@ -8677,6 +8742,7 @@ public final class BatchReport { com.google.protobuf.ByteString getAuthorLoginBytes(); + // optional int64 creation_date = 20; /** * optional int64 creation_date = 20; */ @@ -8686,6 +8752,7 @@ public final class BatchReport { */ long getCreationDate(); + // optional int64 close_date = 21; /** * optional int64 close_date = 21; */ @@ -8695,6 +8762,7 @@ public final class BatchReport { */ long getCloseDate(); + // optional int64 update_date = 22; /** * optional int64 update_date = 22; */ @@ -8704,6 +8772,7 @@ public final class BatchReport { */ long getUpdateDate(); + // optional int64 selected_at = 23; /** * optional int64 selected_at = 23; */ @@ -8713,6 +8782,7 @@ public final class BatchReport { */ long getSelectedAt(); + // optional string diff_fields = 24; /** * optional string diff_fields = 24; */ @@ -8727,6 +8797,7 @@ public final class BatchReport { com.google.protobuf.ByteString getDiffFieldsBytes(); + // optional bool is_changed = 25; /** * optional bool is_changed = 25; */ @@ -8736,6 +8807,7 @@ public final class BatchReport { */ boolean getIsChanged(); + // optional bool must_send_notification = 26; /** * optional bool must_send_notification = 26; */ @@ -8749,9 +8821,8 @@ public final class BatchReport { * Protobuf type {@code Issue} */ public static final class Issue extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Issue) - IssueOrBuilder { + com.google.protobuf.GeneratedMessage + implements IssueOrBuilder { // Use Issue.newBuilder() to construct. private Issue(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -8798,15 +8869,13 @@ public final class BatchReport { break; } case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; - ruleRepository_ = bs; + ruleRepository_ = input.readBytes(); break; } case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - ruleKey_ = bs; + ruleKey_ = input.readBytes(); break; } case 24: { @@ -8815,9 +8884,8 @@ public final class BatchReport { break; } case 34: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000008; - msg_ = bs; + msg_ = input.readBytes(); break; } case 40: { @@ -8832,12 +8900,11 @@ public final class BatchReport { break; } case 50: { - com.google.protobuf.ByteString bs = input.readBytes(); if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { tag_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000020; } - tag_.add(bs); + tag_.add(input.readBytes()); break; } case 57: { @@ -8851,9 +8918,8 @@ public final class BatchReport { break; } case 74: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000080; - uuid_ = bs; + uuid_ = input.readBytes(); break; } case 80: { @@ -8862,21 +8928,18 @@ public final class BatchReport { break; } case 90: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000200; - resolution_ = bs; + resolution_ = input.readBytes(); break; } case 98: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000400; - status_ = bs; + status_ = input.readBytes(); break; } case 106: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000800; - checksum_ = bs; + checksum_ = input.readBytes(); break; } case 112: { @@ -8885,33 +8948,28 @@ public final class BatchReport { break; } case 122: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00002000; - reporter_ = bs; + reporter_ = input.readBytes(); break; } case 130: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00004000; - assignee_ = bs; + assignee_ = input.readBytes(); break; } case 138: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00008000; - actionPlanKey_ = bs; + actionPlanKey_ = input.readBytes(); break; } case 146: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00010000; - attributes_ = bs; + attributes_ = input.readBytes(); break; } case 154: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00020000; - authorLogin_ = bs; + authorLogin_ = input.readBytes(); break; } case 160: { @@ -8935,9 +8993,8 @@ public final class BatchReport { break; } case 194: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00400000; - diffFields_ = bs; + diffFields_ = input.readBytes(); break; } case 200: { @@ -8959,7 +9016,7 @@ public final class BatchReport { e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - tag_ = tag_.getUnmodifiableView(); + tag_ = new com.google.protobuf.UnmodifiableLazyStringList(tag_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -8993,6 +9050,7 @@ public final class BatchReport { } private int bitField0_; + // optional string rule_repository = 1; public static final int RULE_REPOSITORY_FIELD_NUMBER = 1; private java.lang.Object ruleRepository_; /** @@ -9035,6 +9093,7 @@ public final class BatchReport { } } + // optional string rule_key = 2; public static final int RULE_KEY_FIELD_NUMBER = 2; private java.lang.Object ruleKey_; /** @@ -9077,6 +9136,7 @@ public final class BatchReport { } } + // optional int32 line = 3; public static final int LINE_FIELD_NUMBER = 3; private int line_; /** @@ -9092,6 +9152,7 @@ public final class BatchReport { return line_; } + // optional string msg = 4; public static final int MSG_FIELD_NUMBER = 4; private java.lang.Object msg_; /** @@ -9134,6 +9195,7 @@ public final class BatchReport { } } + // optional .Severity severity = 5; public static final int SEVERITY_FIELD_NUMBER = 5; private org.sonar.batch.protocol.Constants.Severity severity_; /** @@ -9149,12 +9211,13 @@ public final class BatchReport { return severity_; } + // repeated string tag = 6; public static final int TAG_FIELD_NUMBER = 6; private com.google.protobuf.LazyStringList tag_; /** * repeated string tag = 6; */ - public com.google.protobuf.ProtocolStringList + public java.util.List getTagList() { return tag_; } @@ -9178,6 +9241,7 @@ public final class BatchReport { return tag_.getByteString(index); } + // optional double effort_to_fix = 7; public static final int EFFORT_TO_FIX_FIELD_NUMBER = 7; private double effortToFix_; /** @@ -9201,6 +9265,7 @@ public final class BatchReport { return effortToFix_; } + // optional bool is_new = 8; public static final int IS_NEW_FIELD_NUMBER = 8; private boolean isNew_; /** @@ -9216,6 +9281,7 @@ public final class BatchReport { return isNew_; } + // optional string uuid = 9; public static final int UUID_FIELD_NUMBER = 9; private java.lang.Object uuid_; /** @@ -9258,6 +9324,7 @@ public final class BatchReport { } } + // optional int64 debt_in_minutes = 10; public static final int DEBT_IN_MINUTES_FIELD_NUMBER = 10; private long debtInMinutes_; /** @@ -9273,6 +9340,7 @@ public final class BatchReport { return debtInMinutes_; } + // optional string resolution = 11; public static final int RESOLUTION_FIELD_NUMBER = 11; private java.lang.Object resolution_; /** @@ -9315,6 +9383,7 @@ public final class BatchReport { } } + // optional string status = 12; public static final int STATUS_FIELD_NUMBER = 12; private java.lang.Object status_; /** @@ -9357,6 +9426,7 @@ public final class BatchReport { } } + // optional string checksum = 13; public static final int CHECKSUM_FIELD_NUMBER = 13; private java.lang.Object checksum_; /** @@ -9399,6 +9469,7 @@ public final class BatchReport { } } + // optional bool manual_severity = 14; public static final int MANUAL_SEVERITY_FIELD_NUMBER = 14; private boolean manualSeverity_; /** @@ -9414,6 +9485,7 @@ public final class BatchReport { return manualSeverity_; } + // optional string reporter = 15; public static final int REPORTER_FIELD_NUMBER = 15; private java.lang.Object reporter_; /** @@ -9456,6 +9528,7 @@ public final class BatchReport { } } + // optional string assignee = 16; public static final int ASSIGNEE_FIELD_NUMBER = 16; private java.lang.Object assignee_; /** @@ -9498,6 +9571,7 @@ public final class BatchReport { } } + // optional string action_plan_key = 17; public static final int ACTION_PLAN_KEY_FIELD_NUMBER = 17; private java.lang.Object actionPlanKey_; /** @@ -9540,6 +9614,7 @@ public final class BatchReport { } } + // optional string attributes = 18; public static final int ATTRIBUTES_FIELD_NUMBER = 18; private java.lang.Object attributes_; /** @@ -9582,6 +9657,7 @@ public final class BatchReport { } } + // optional string author_login = 19; public static final int AUTHOR_LOGIN_FIELD_NUMBER = 19; private java.lang.Object authorLogin_; /** @@ -9624,6 +9700,7 @@ public final class BatchReport { } } + // optional int64 creation_date = 20; public static final int CREATION_DATE_FIELD_NUMBER = 20; private long creationDate_; /** @@ -9639,6 +9716,7 @@ public final class BatchReport { return creationDate_; } + // optional int64 close_date = 21; public static final int CLOSE_DATE_FIELD_NUMBER = 21; private long closeDate_; /** @@ -9654,6 +9732,7 @@ public final class BatchReport { return closeDate_; } + // optional int64 update_date = 22; public static final int UPDATE_DATE_FIELD_NUMBER = 22; private long updateDate_; /** @@ -9669,6 +9748,7 @@ public final class BatchReport { return updateDate_; } + // optional int64 selected_at = 23; public static final int SELECTED_AT_FIELD_NUMBER = 23; private long selectedAt_; /** @@ -9684,6 +9764,7 @@ public final class BatchReport { return selectedAt_; } + // optional string diff_fields = 24; public static final int DIFF_FIELDS_FIELD_NUMBER = 24; private java.lang.Object diffFields_; /** @@ -9726,6 +9807,7 @@ public final class BatchReport { } } + // optional bool is_changed = 25; public static final int IS_CHANGED_FIELD_NUMBER = 25; private boolean isChanged_; /** @@ -9741,6 +9823,7 @@ public final class BatchReport { return isChanged_; } + // optional bool must_send_notification = 26; public static final int MUST_SEND_NOTIFICATION_FIELD_NUMBER = 26; private boolean mustSendNotification_; /** @@ -9787,8 +9870,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -10075,9 +10157,8 @@ public final class BatchReport { * Protobuf type {@code Issue} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Issue) - org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Issue_descriptor; @@ -10211,7 +10292,8 @@ public final class BatchReport { } result.severity_ = severity_; if (((bitField0_ & 0x00000020) == 0x00000020)) { - tag_ = tag_.getUnmodifiableView(); + tag_ = new com.google.protobuf.UnmodifiableLazyStringList( + tag_); bitField0_ = (bitField0_ & ~0x00000020); } result.tag_ = tag_; @@ -10449,6 +10531,7 @@ public final class BatchReport { } private int bitField0_; + // optional string rule_repository = 1; private java.lang.Object ruleRepository_ = ""; /** * optional string rule_repository = 1; @@ -10462,12 +10545,9 @@ public final class BatchReport { public java.lang.String getRuleRepository() { java.lang.Object ref = ruleRepository_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - ruleRepository_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + ruleRepository_ = s; return s; } else { return (java.lang.String) ref; @@ -10525,6 +10605,7 @@ public final class BatchReport { return this; } + // optional string rule_key = 2; private java.lang.Object ruleKey_ = ""; /** * optional string rule_key = 2; @@ -10538,12 +10619,9 @@ public final class BatchReport { public java.lang.String getRuleKey() { java.lang.Object ref = ruleKey_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - ruleKey_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + ruleKey_ = s; return s; } else { return (java.lang.String) ref; @@ -10601,6 +10679,7 @@ public final class BatchReport { return this; } + // optional int32 line = 3; private int line_ ; /** * optional int32 line = 3; @@ -10633,6 +10712,7 @@ public final class BatchReport { return this; } + // optional string msg = 4; private java.lang.Object msg_ = ""; /** * optional string msg = 4; @@ -10646,12 +10726,9 @@ public final class BatchReport { public java.lang.String getMsg() { java.lang.Object ref = msg_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - msg_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + msg_ = s; return s; } else { return (java.lang.String) ref; @@ -10709,6 +10786,7 @@ public final class BatchReport { return this; } + // optional .Severity severity = 5; private org.sonar.batch.protocol.Constants.Severity severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; /** * optional .Severity severity = 5; @@ -10744,6 +10822,7 @@ public final class BatchReport { return this; } + // repeated string tag = 6; private com.google.protobuf.LazyStringList tag_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureTagIsMutable() { if (!((bitField0_ & 0x00000020) == 0x00000020)) { @@ -10754,9 +10833,9 @@ public final class BatchReport { /** * repeated string tag = 6; */ - public com.google.protobuf.ProtocolStringList + public java.util.List getTagList() { - return tag_.getUnmodifiableView(); + return java.util.Collections.unmodifiableList(tag_); } /** * repeated string tag = 6; @@ -10809,8 +10888,7 @@ public final class BatchReport { public Builder addAllTag( java.lang.Iterable values) { ensureTagIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, tag_); + super.addAll(values, tag_); onChanged(); return this; } @@ -10837,6 +10915,7 @@ public final class BatchReport { return this; } + // optional double effort_to_fix = 7; private double effortToFix_ ; /** * optional double effort_to_fix = 7; @@ -10885,6 +10964,7 @@ public final class BatchReport { return this; } + // optional bool is_new = 8; private boolean isNew_ ; /** * optional bool is_new = 8; @@ -10917,6 +10997,7 @@ public final class BatchReport { return this; } + // optional string uuid = 9; private java.lang.Object uuid_ = ""; /** * optional string uuid = 9; @@ -10930,12 +11011,9 @@ public final class BatchReport { public java.lang.String getUuid() { java.lang.Object ref = uuid_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - uuid_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + uuid_ = s; return s; } else { return (java.lang.String) ref; @@ -10993,6 +11071,7 @@ public final class BatchReport { return this; } + // optional int64 debt_in_minutes = 10; private long debtInMinutes_ ; /** * optional int64 debt_in_minutes = 10; @@ -11025,6 +11104,7 @@ public final class BatchReport { return this; } + // optional string resolution = 11; private java.lang.Object resolution_ = ""; /** * optional string resolution = 11; @@ -11038,12 +11118,9 @@ public final class BatchReport { public java.lang.String getResolution() { java.lang.Object ref = resolution_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - resolution_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + resolution_ = s; return s; } else { return (java.lang.String) ref; @@ -11101,6 +11178,7 @@ public final class BatchReport { return this; } + // optional string status = 12; private java.lang.Object status_ = ""; /** * optional string status = 12; @@ -11114,12 +11192,9 @@ public final class BatchReport { public java.lang.String getStatus() { java.lang.Object ref = status_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - status_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + status_ = s; return s; } else { return (java.lang.String) ref; @@ -11177,6 +11252,7 @@ public final class BatchReport { return this; } + // optional string checksum = 13; private java.lang.Object checksum_ = ""; /** * optional string checksum = 13; @@ -11190,12 +11266,9 @@ public final class BatchReport { public java.lang.String getChecksum() { java.lang.Object ref = checksum_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - checksum_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + checksum_ = s; return s; } else { return (java.lang.String) ref; @@ -11253,6 +11326,7 @@ public final class BatchReport { return this; } + // optional bool manual_severity = 14; private boolean manualSeverity_ ; /** * optional bool manual_severity = 14; @@ -11285,6 +11359,7 @@ public final class BatchReport { return this; } + // optional string reporter = 15; private java.lang.Object reporter_ = ""; /** * optional string reporter = 15; @@ -11298,12 +11373,9 @@ public final class BatchReport { public java.lang.String getReporter() { java.lang.Object ref = reporter_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - reporter_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + reporter_ = s; return s; } else { return (java.lang.String) ref; @@ -11361,6 +11433,7 @@ public final class BatchReport { return this; } + // optional string assignee = 16; private java.lang.Object assignee_ = ""; /** * optional string assignee = 16; @@ -11374,12 +11447,9 @@ public final class BatchReport { public java.lang.String getAssignee() { java.lang.Object ref = assignee_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - assignee_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + assignee_ = s; return s; } else { return (java.lang.String) ref; @@ -11437,6 +11507,7 @@ public final class BatchReport { return this; } + // optional string action_plan_key = 17; private java.lang.Object actionPlanKey_ = ""; /** * optional string action_plan_key = 17; @@ -11450,12 +11521,9 @@ public final class BatchReport { public java.lang.String getActionPlanKey() { java.lang.Object ref = actionPlanKey_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - actionPlanKey_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + actionPlanKey_ = s; return s; } else { return (java.lang.String) ref; @@ -11513,6 +11581,7 @@ public final class BatchReport { return this; } + // optional string attributes = 18; private java.lang.Object attributes_ = ""; /** * optional string attributes = 18; @@ -11526,12 +11595,9 @@ public final class BatchReport { public java.lang.String getAttributes() { java.lang.Object ref = attributes_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - attributes_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + attributes_ = s; return s; } else { return (java.lang.String) ref; @@ -11589,6 +11655,7 @@ public final class BatchReport { return this; } + // optional string author_login = 19; private java.lang.Object authorLogin_ = ""; /** * optional string author_login = 19; @@ -11602,12 +11669,9 @@ public final class BatchReport { public java.lang.String getAuthorLogin() { java.lang.Object ref = authorLogin_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - authorLogin_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + authorLogin_ = s; return s; } else { return (java.lang.String) ref; @@ -11665,6 +11729,7 @@ public final class BatchReport { return this; } + // optional int64 creation_date = 20; private long creationDate_ ; /** * optional int64 creation_date = 20; @@ -11697,6 +11762,7 @@ public final class BatchReport { return this; } + // optional int64 close_date = 21; private long closeDate_ ; /** * optional int64 close_date = 21; @@ -11729,6 +11795,7 @@ public final class BatchReport { return this; } + // optional int64 update_date = 22; private long updateDate_ ; /** * optional int64 update_date = 22; @@ -11761,6 +11828,7 @@ public final class BatchReport { return this; } + // optional int64 selected_at = 23; private long selectedAt_ ; /** * optional int64 selected_at = 23; @@ -11793,6 +11861,7 @@ public final class BatchReport { return this; } + // optional string diff_fields = 24; private java.lang.Object diffFields_ = ""; /** * optional string diff_fields = 24; @@ -11806,12 +11875,9 @@ public final class BatchReport { public java.lang.String getDiffFields() { java.lang.Object ref = diffFields_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - diffFields_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + diffFields_ = s; return s; } else { return (java.lang.String) ref; @@ -11869,6 +11935,7 @@ public final class BatchReport { return this; } + // optional bool is_changed = 25; private boolean isChanged_ ; /** * optional bool is_changed = 25; @@ -11901,6 +11968,7 @@ public final class BatchReport { return this; } + // optional bool must_send_notification = 26; private boolean mustSendNotification_ ; /** * optional bool must_send_notification = 26; @@ -11944,10 +12012,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Issue) } - public interface IssuesOrBuilder extends - // @@protoc_insertion_point(interface_extends:Issues) - com.google.protobuf.MessageOrBuilder { + public interface IssuesOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional int32 component_ref = 1; /** * optional int32 component_ref = 1; */ @@ -11957,6 +12025,7 @@ public final class BatchReport { */ int getComponentRef(); + // repeated .Issue issue = 2; /** * repeated .Issue issue = 2; */ @@ -11981,6 +12050,7 @@ public final class BatchReport { org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder getIssueOrBuilder( int index); + // optional string component_uuid = 3; /** * optional string component_uuid = 3; * @@ -12011,9 +12081,8 @@ public final class BatchReport { * Protobuf type {@code Issues} */ public static final class Issues extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Issues) - IssuesOrBuilder { + com.google.protobuf.GeneratedMessage + implements IssuesOrBuilder { // Use Issues.newBuilder() to construct. private Issues(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -12073,9 +12142,8 @@ public final class BatchReport { break; } case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - componentUuid_ = bs; + componentUuid_ = input.readBytes(); break; } } @@ -12121,6 +12189,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 component_ref = 1; public static final int COMPONENT_REF_FIELD_NUMBER = 1; private int componentRef_; /** @@ -12136,6 +12205,7 @@ public final class BatchReport { return componentRef_; } + // repeated .Issue issue = 2; public static final int ISSUE_FIELD_NUMBER = 2; private java.util.List issue_; /** @@ -12171,6 +12241,7 @@ public final class BatchReport { return issue_.get(index); } + // optional string component_uuid = 3; public static final int COMPONENT_UUID_FIELD_NUMBER = 3; private java.lang.Object componentUuid_; /** @@ -12233,8 +12304,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -12355,9 +12425,8 @@ public final class BatchReport { * Protobuf type {@code Issues} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Issues) - org.sonar.batch.protocol.output.BatchReport.IssuesOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.IssuesOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Issues_descriptor; @@ -12523,6 +12592,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 component_ref = 1; private int componentRef_ ; /** * optional int32 component_ref = 1; @@ -12555,6 +12625,7 @@ public final class BatchReport { return this; } + // repeated .Issue issue = 2; private java.util.List issue_ = java.util.Collections.emptyList(); private void ensureIssueIsMutable() { @@ -12696,8 +12767,7 @@ public final class BatchReport { java.lang.Iterable values) { if (issueBuilder_ == null) { ensureIssueIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, issue_); + super.addAll(values, issue_); onChanged(); } else { issueBuilder_.addAllMessages(values); @@ -12795,6 +12865,7 @@ public final class BatchReport { return issueBuilder_; } + // optional string component_uuid = 3; private java.lang.Object componentUuid_ = ""; /** * optional string component_uuid = 3; @@ -12816,12 +12887,9 @@ public final class BatchReport { public java.lang.String getComponentUuid() { java.lang.Object ref = componentUuid_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - componentUuid_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + componentUuid_ = s; return s; } else { return (java.lang.String) ref; @@ -12906,10 +12974,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Issues) } - public interface ChangesetsOrBuilder extends - // @@protoc_insertion_point(interface_extends:Changesets) - com.google.protobuf.MessageOrBuilder { + public interface ChangesetsOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional int32 component_ref = 1; /** * optional int32 component_ref = 1; */ @@ -12919,6 +12987,7 @@ public final class BatchReport { */ int getComponentRef(); + // repeated .Changesets.Changeset changeset = 2; /** * repeated .Changesets.Changeset changeset = 2; */ @@ -12943,6 +13012,7 @@ public final class BatchReport { org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder getChangesetOrBuilder( int index); + // repeated int32 changesetIndexByLine = 3 [packed = true]; /** * repeated int32 changesetIndexByLine = 3 [packed = true]; * @@ -12972,9 +13042,8 @@ public final class BatchReport { * Protobuf type {@code Changesets} */ public static final class Changesets extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Changesets) - ChangesetsOrBuilder { + com.google.protobuf.GeneratedMessage + implements ChangesetsOrBuilder { // Use Changesets.newBuilder() to construct. private Changesets(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -13099,10 +13168,10 @@ public final class BatchReport { return PARSER; } - public interface ChangesetOrBuilder extends - // @@protoc_insertion_point(interface_extends:Changesets.Changeset) - com.google.protobuf.MessageOrBuilder { + public interface ChangesetOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional string revision = 1; /** * optional string revision = 1; */ @@ -13117,6 +13186,7 @@ public final class BatchReport { com.google.protobuf.ByteString getRevisionBytes(); + // optional string author = 2; /** * optional string author = 2; */ @@ -13131,6 +13201,7 @@ public final class BatchReport { com.google.protobuf.ByteString getAuthorBytes(); + // optional int64 date = 3; /** * optional int64 date = 3; */ @@ -13144,9 +13215,8 @@ public final class BatchReport { * Protobuf type {@code Changesets.Changeset} */ public static final class Changeset extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Changesets.Changeset) - ChangesetOrBuilder { + com.google.protobuf.GeneratedMessage + implements ChangesetOrBuilder { // Use Changeset.newBuilder() to construct. private Changeset(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -13193,15 +13263,13 @@ public final class BatchReport { break; } case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; - revision_ = bs; + revision_ = input.readBytes(); break; } case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - author_ = bs; + author_ = input.readBytes(); break; } case 24: { @@ -13249,6 +13317,7 @@ public final class BatchReport { } private int bitField0_; + // optional string revision = 1; public static final int REVISION_FIELD_NUMBER = 1; private java.lang.Object revision_; /** @@ -13291,6 +13360,7 @@ public final class BatchReport { } } + // optional string author = 2; public static final int AUTHOR_FIELD_NUMBER = 2; private java.lang.Object author_; /** @@ -13333,6 +13403,7 @@ public final class BatchReport { } } + // optional int64 date = 3; public static final int DATE_FIELD_NUMBER = 3; private long date_; /** @@ -13356,8 +13427,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -13478,9 +13548,8 @@ public final class BatchReport { * Protobuf type {@code Changesets.Changeset} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Changesets.Changeset) - org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_Changeset_descriptor; @@ -13615,6 +13684,7 @@ public final class BatchReport { } private int bitField0_; + // optional string revision = 1; private java.lang.Object revision_ = ""; /** * optional string revision = 1; @@ -13628,12 +13698,9 @@ public final class BatchReport { public java.lang.String getRevision() { java.lang.Object ref = revision_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - revision_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + revision_ = s; return s; } else { return (java.lang.String) ref; @@ -13691,6 +13758,7 @@ public final class BatchReport { return this; } + // optional string author = 2; private java.lang.Object author_ = ""; /** * optional string author = 2; @@ -13704,12 +13772,9 @@ public final class BatchReport { public java.lang.String getAuthor() { java.lang.Object ref = author_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - author_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + author_ = s; return s; } else { return (java.lang.String) ref; @@ -13767,6 +13832,7 @@ public final class BatchReport { return this; } + // optional int64 date = 3; private long date_ ; /** * optional int64 date = 3; @@ -13811,6 +13877,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 component_ref = 1; public static final int COMPONENT_REF_FIELD_NUMBER = 1; private int componentRef_; /** @@ -13826,6 +13893,7 @@ public final class BatchReport { return componentRef_; } + // repeated .Changesets.Changeset changeset = 2; public static final int CHANGESET_FIELD_NUMBER = 2; private java.util.List changeset_; /** @@ -13861,6 +13929,7 @@ public final class BatchReport { return changeset_.get(index); } + // repeated int32 changesetIndexByLine = 3 [packed = true]; public static final int CHANGESETINDEXBYLINE_FIELD_NUMBER = 3; private java.util.List changesetIndexByLine_; /** @@ -13904,8 +13973,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -14040,9 +14108,8 @@ public final class BatchReport { * Protobuf type {@code Changesets} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Changesets) - org.sonar.batch.protocol.output.BatchReport.ChangesetsOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.ChangesetsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_descriptor; @@ -14214,6 +14281,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 component_ref = 1; private int componentRef_ ; /** * optional int32 component_ref = 1; @@ -14246,6 +14314,7 @@ public final class BatchReport { return this; } + // repeated .Changesets.Changeset changeset = 2; private java.util.List changeset_ = java.util.Collections.emptyList(); private void ensureChangesetIsMutable() { @@ -14387,8 +14456,7 @@ public final class BatchReport { java.lang.Iterable values) { if (changesetBuilder_ == null) { ensureChangesetIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, changeset_); + super.addAll(values, changeset_); onChanged(); } else { changesetBuilder_.addAllMessages(values); @@ -14486,6 +14554,7 @@ public final class BatchReport { return changesetBuilder_; } + // repeated int32 changesetIndexByLine = 3 [packed = true]; private java.util.List changesetIndexByLine_ = java.util.Collections.emptyList(); private void ensureChangesetIndexByLineIsMutable() { if (!((bitField0_ & 0x00000004) == 0x00000004)) { @@ -14561,8 +14630,7 @@ public final class BatchReport { public Builder addAllChangesetIndexByLine( java.lang.Iterable values) { ensureChangesetIndexByLineIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, changesetIndexByLine_); + super.addAll(values, changesetIndexByLine_); onChanged(); return this; } @@ -14591,10 +14659,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Changesets) } - public interface DuplicateOrBuilder extends - // @@protoc_insertion_point(interface_extends:Duplicate) - com.google.protobuf.MessageOrBuilder { + public interface DuplicateOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional int32 other_file_ref = 1; /** * optional int32 other_file_ref = 1; * @@ -14612,6 +14680,7 @@ public final class BatchReport { */ int getOtherFileRef(); + // optional .Range range = 2; /** * optional .Range range = 2; */ @@ -14625,6 +14694,7 @@ public final class BatchReport { */ org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getRangeOrBuilder(); + // optional string other_file_key = 3; /** * optional string other_file_key = 3; * @@ -14655,9 +14725,8 @@ public final class BatchReport { * Protobuf type {@code Duplicate} */ public static final class Duplicate extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Duplicate) - DuplicateOrBuilder { + com.google.protobuf.GeneratedMessage + implements DuplicateOrBuilder { // Use Duplicate.newBuilder() to construct. private Duplicate(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -14722,9 +14791,8 @@ public final class BatchReport { break; } case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000004; - otherFileKey_ = bs; + otherFileKey_ = input.readBytes(); break; } } @@ -14767,6 +14835,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 other_file_ref = 1; public static final int OTHER_FILE_REF_FIELD_NUMBER = 1; private int otherFileRef_; /** @@ -14790,6 +14859,7 @@ public final class BatchReport { return otherFileRef_; } + // optional .Range range = 2; public static final int RANGE_FIELD_NUMBER = 2; private org.sonar.batch.protocol.output.BatchReport.Range range_; /** @@ -14811,6 +14881,7 @@ public final class BatchReport { return range_; } + // optional string other_file_key = 3; public static final int OTHER_FILE_KEY_FIELD_NUMBER = 3; private java.lang.Object otherFileKey_; /** @@ -14873,8 +14944,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -14995,9 +15065,8 @@ public final class BatchReport { * Protobuf type {@code Duplicate} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Duplicate) - org.sonar.batch.protocol.output.BatchReport.DuplicateOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.DuplicateOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplicate_descriptor; @@ -15139,6 +15208,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 other_file_ref = 1; private int otherFileRef_ ; /** * optional int32 other_file_ref = 1; @@ -15187,6 +15257,7 @@ public final class BatchReport { return this; } + // optional .Range range = 2; private org.sonar.batch.protocol.output.BatchReport.Range range_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> rangeBuilder_; @@ -15295,7 +15366,7 @@ public final class BatchReport { if (rangeBuilder_ == null) { rangeBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder>( - getRange(), + range_, getParentForChildren(), isClean()); range_ = null; @@ -15303,6 +15374,7 @@ public final class BatchReport { return rangeBuilder_; } + // optional string other_file_key = 3; private java.lang.Object otherFileKey_ = ""; /** * optional string other_file_key = 3; @@ -15324,12 +15396,9 @@ public final class BatchReport { public java.lang.String getOtherFileKey() { java.lang.Object ref = otherFileKey_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - otherFileKey_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + otherFileKey_ = s; return s; } else { return (java.lang.String) ref; @@ -15414,10 +15483,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Duplicate) } - public interface DuplicationOrBuilder extends - // @@protoc_insertion_point(interface_extends:Duplication) - com.google.protobuf.MessageOrBuilder { + public interface DuplicationOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional .Range origin_position = 1; /** * optional .Range origin_position = 1; * @@ -15443,6 +15512,7 @@ public final class BatchReport { */ org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getOriginPositionOrBuilder(); + // repeated .Duplicate duplicate = 2; /** * repeated .Duplicate duplicate = 2; */ @@ -15471,9 +15541,8 @@ public final class BatchReport { * Protobuf type {@code Duplication} */ public static final class Duplication extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Duplication) - DuplicationOrBuilder { + com.google.protobuf.GeneratedMessage + implements DuplicationOrBuilder { // Use Duplication.newBuilder() to construct. private Duplication(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -15583,6 +15652,7 @@ public final class BatchReport { } private int bitField0_; + // optional .Range origin_position = 1; public static final int ORIGIN_POSITION_FIELD_NUMBER = 1; private org.sonar.batch.protocol.output.BatchReport.Range originPosition_; /** @@ -15616,6 +15686,7 @@ public final class BatchReport { return originPosition_; } + // repeated .Duplicate duplicate = 2; public static final int DUPLICATE_FIELD_NUMBER = 2; private java.util.List duplicate_; /** @@ -15658,8 +15729,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -15773,9 +15843,8 @@ public final class BatchReport { * Protobuf type {@code Duplication} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Duplication) - org.sonar.batch.protocol.output.BatchReport.DuplicationOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.DuplicationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplication_descriptor; @@ -15939,6 +16008,7 @@ public final class BatchReport { } private int bitField0_; + // optional .Range origin_position = 1; private org.sonar.batch.protocol.output.BatchReport.Range originPosition_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> originPositionBuilder_; @@ -16083,7 +16153,7 @@ public final class BatchReport { if (originPositionBuilder_ == null) { originPositionBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder>( - getOriginPosition(), + originPosition_, getParentForChildren(), isClean()); originPosition_ = null; @@ -16091,6 +16161,7 @@ public final class BatchReport { return originPositionBuilder_; } + // repeated .Duplicate duplicate = 2; private java.util.List duplicate_ = java.util.Collections.emptyList(); private void ensureDuplicateIsMutable() { @@ -16232,8 +16303,7 @@ public final class BatchReport { java.lang.Iterable values) { if (duplicateBuilder_ == null) { ensureDuplicateIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, duplicate_); + super.addAll(values, duplicate_); onChanged(); } else { duplicateBuilder_.addAllMessages(values); @@ -16342,10 +16412,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Duplication) } - public interface DuplicationsOrBuilder extends - // @@protoc_insertion_point(interface_extends:Duplications) - com.google.protobuf.MessageOrBuilder { + public interface DuplicationsOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional int32 component_ref = 1; /** * optional int32 component_ref = 1; */ @@ -16355,6 +16425,7 @@ public final class BatchReport { */ int getComponentRef(); + // repeated .Duplication duplication = 2; /** * repeated .Duplication duplication = 2; */ @@ -16383,9 +16454,8 @@ public final class BatchReport { * Protobuf type {@code Duplications} */ public static final class Duplications extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Duplications) - DuplicationsOrBuilder { + com.google.protobuf.GeneratedMessage + implements DuplicationsOrBuilder { // Use Duplications.newBuilder() to construct. private Duplications(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -16487,6 +16557,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 component_ref = 1; public static final int COMPONENT_REF_FIELD_NUMBER = 1; private int componentRef_; /** @@ -16502,6 +16573,7 @@ public final class BatchReport { return componentRef_; } + // repeated .Duplication duplication = 2; public static final int DUPLICATION_FIELD_NUMBER = 2; private java.util.List duplication_; /** @@ -16544,8 +16616,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -16659,9 +16730,8 @@ public final class BatchReport { * Protobuf type {@code Duplications} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Duplications) - org.sonar.batch.protocol.output.BatchReport.DuplicationsOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.DuplicationsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplications_descriptor; @@ -16816,6 +16886,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 component_ref = 1; private int componentRef_ ; /** * optional int32 component_ref = 1; @@ -16848,6 +16919,7 @@ public final class BatchReport { return this; } + // repeated .Duplication duplication = 2; private java.util.List duplication_ = java.util.Collections.emptyList(); private void ensureDuplicationIsMutable() { @@ -16989,8 +17061,7 @@ public final class BatchReport { java.lang.Iterable values) { if (duplicationBuilder_ == null) { ensureDuplicationIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, duplication_); + super.addAll(values, duplication_); onChanged(); } else { duplicationBuilder_.addAllMessages(values); @@ -17099,10 +17170,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Duplications) } - public interface RangeOrBuilder extends - // @@protoc_insertion_point(interface_extends:Range) - com.google.protobuf.MessageOrBuilder { + public interface RangeOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional int32 start_line = 1; /** * optional int32 start_line = 1; * @@ -17120,6 +17191,7 @@ public final class BatchReport { */ int getStartLine(); + // optional int32 end_line = 2; /** * optional int32 end_line = 2; * @@ -17137,6 +17209,7 @@ public final class BatchReport { */ int getEndLine(); + // optional int32 start_offset = 3; /** * optional int32 start_offset = 3; * @@ -17154,6 +17227,7 @@ public final class BatchReport { */ int getStartOffset(); + // optional int32 end_offset = 4; /** * optional int32 end_offset = 4; * @@ -17179,9 +17253,8 @@ public final class BatchReport { * */ public static final class Range extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Range) - RangeOrBuilder { + com.google.protobuf.GeneratedMessage + implements RangeOrBuilder { // Use Range.newBuilder() to construct. private Range(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -17287,6 +17360,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 start_line = 1; public static final int START_LINE_FIELD_NUMBER = 1; private int startLine_; /** @@ -17310,6 +17384,7 @@ public final class BatchReport { return startLine_; } + // optional int32 end_line = 2; public static final int END_LINE_FIELD_NUMBER = 2; private int endLine_; /** @@ -17333,6 +17408,7 @@ public final class BatchReport { return endLine_; } + // optional int32 start_offset = 3; public static final int START_OFFSET_FIELD_NUMBER = 3; private int startOffset_; /** @@ -17356,6 +17432,7 @@ public final class BatchReport { return startOffset_; } + // optional int32 end_offset = 4; public static final int END_OFFSET_FIELD_NUMBER = 4; private int endOffset_; /** @@ -17388,8 +17465,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -17521,9 +17597,8 @@ public final class BatchReport { * */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Range) - org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Range_descriptor; @@ -17663,6 +17738,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 start_line = 1; private int startLine_ ; /** * optional int32 start_line = 1; @@ -17711,6 +17787,7 @@ public final class BatchReport { return this; } + // optional int32 end_line = 2; private int endLine_ ; /** * optional int32 end_line = 2; @@ -17759,6 +17836,7 @@ public final class BatchReport { return this; } + // optional int32 start_offset = 3; private int startOffset_ ; /** * optional int32 start_offset = 3; @@ -17807,6 +17885,7 @@ public final class BatchReport { return this; } + // optional int32 end_offset = 4; private int endOffset_ ; /** * optional int32 end_offset = 4; @@ -17866,10 +17945,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Range) } - public interface SymbolsOrBuilder extends - // @@protoc_insertion_point(interface_extends:Symbols) - com.google.protobuf.MessageOrBuilder { + public interface SymbolsOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional int32 file_ref = 1; /** * optional int32 file_ref = 1; */ @@ -17879,6 +17958,7 @@ public final class BatchReport { */ int getFileRef(); + // repeated .Symbols.Symbol symbol = 2; /** * repeated .Symbols.Symbol symbol = 2; */ @@ -17907,9 +17987,8 @@ public final class BatchReport { * Protobuf type {@code Symbols} */ public static final class Symbols extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Symbols) - SymbolsOrBuilder { + com.google.protobuf.GeneratedMessage + implements SymbolsOrBuilder { // Use Symbols.newBuilder() to construct. private Symbols(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -18010,10 +18089,10 @@ public final class BatchReport { return PARSER; } - public interface SymbolOrBuilder extends - // @@protoc_insertion_point(interface_extends:Symbols.Symbol) - com.google.protobuf.MessageOrBuilder { + public interface SymbolOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional .Range declaration = 1; /** * optional .Range declaration = 1; */ @@ -18027,6 +18106,7 @@ public final class BatchReport { */ org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getDeclarationOrBuilder(); + // repeated .Range reference = 2; /** * repeated .Range reference = 2; */ @@ -18055,9 +18135,8 @@ public final class BatchReport { * Protobuf type {@code Symbols.Symbol} */ public static final class Symbol extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Symbols.Symbol) - SymbolOrBuilder { + com.google.protobuf.GeneratedMessage + implements SymbolOrBuilder { // Use Symbol.newBuilder() to construct. private Symbol(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -18167,6 +18246,7 @@ public final class BatchReport { } private int bitField0_; + // optional .Range declaration = 1; public static final int DECLARATION_FIELD_NUMBER = 1; private org.sonar.batch.protocol.output.BatchReport.Range declaration_; /** @@ -18188,6 +18268,7 @@ public final class BatchReport { return declaration_; } + // repeated .Range reference = 2; public static final int REFERENCE_FIELD_NUMBER = 2; private java.util.List reference_; /** @@ -18230,8 +18311,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -18345,9 +18425,8 @@ public final class BatchReport { * Protobuf type {@code Symbols.Symbol} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Symbols.Symbol) - org.sonar.batch.protocol.output.BatchReport.Symbols.SymbolOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.Symbols.SymbolOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbols_Symbol_descriptor; @@ -18511,6 +18590,7 @@ public final class BatchReport { } private int bitField0_; + // optional .Range declaration = 1; private org.sonar.batch.protocol.output.BatchReport.Range declaration_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> declarationBuilder_; @@ -18619,7 +18699,7 @@ public final class BatchReport { if (declarationBuilder_ == null) { declarationBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder>( - getDeclaration(), + declaration_, getParentForChildren(), isClean()); declaration_ = null; @@ -18627,6 +18707,7 @@ public final class BatchReport { return declarationBuilder_; } + // repeated .Range reference = 2; private java.util.List reference_ = java.util.Collections.emptyList(); private void ensureReferenceIsMutable() { @@ -18768,8 +18849,7 @@ public final class BatchReport { java.lang.Iterable values) { if (referenceBuilder_ == null) { ensureReferenceIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, reference_); + super.addAll(values, reference_); onChanged(); } else { referenceBuilder_.addAllMessages(values); @@ -18879,6 +18959,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 file_ref = 1; public static final int FILE_REF_FIELD_NUMBER = 1; private int fileRef_; /** @@ -18894,6 +18975,7 @@ public final class BatchReport { return fileRef_; } + // repeated .Symbols.Symbol symbol = 2; public static final int SYMBOL_FIELD_NUMBER = 2; private java.util.List symbol_; /** @@ -18936,8 +19018,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -19051,9 +19132,8 @@ public final class BatchReport { * Protobuf type {@code Symbols} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Symbols) - org.sonar.batch.protocol.output.BatchReport.SymbolsOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.SymbolsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbols_descriptor; @@ -19208,6 +19288,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 file_ref = 1; private int fileRef_ ; /** * optional int32 file_ref = 1; @@ -19240,6 +19321,7 @@ public final class BatchReport { return this; } + // repeated .Symbols.Symbol symbol = 2; private java.util.List symbol_ = java.util.Collections.emptyList(); private void ensureSymbolIsMutable() { @@ -19381,8 +19463,7 @@ public final class BatchReport { java.lang.Iterable values) { if (symbolBuilder_ == null) { ensureSymbolIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, symbol_); + super.addAll(values, symbol_); onChanged(); } else { symbolBuilder_.addAllMessages(values); @@ -19491,10 +19572,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Symbols) } - public interface CoverageOrBuilder extends - // @@protoc_insertion_point(interface_extends:Coverage) - com.google.protobuf.MessageOrBuilder { + public interface CoverageOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional int32 line = 1; /** * optional int32 line = 1; */ @@ -19504,6 +19585,7 @@ public final class BatchReport { */ int getLine(); + // optional int32 conditions = 2; /** * optional int32 conditions = 2; * @@ -19521,6 +19603,7 @@ public final class BatchReport { */ int getConditions(); + // optional bool ut_hits = 3; /** * optional bool ut_hits = 3; */ @@ -19530,6 +19613,7 @@ public final class BatchReport { */ boolean getUtHits(); + // optional bool it_hits = 4; /** * optional bool it_hits = 4; */ @@ -19539,6 +19623,7 @@ public final class BatchReport { */ boolean getItHits(); + // optional int32 ut_covered_conditions = 5; /** * optional int32 ut_covered_conditions = 5; */ @@ -19548,6 +19633,7 @@ public final class BatchReport { */ int getUtCoveredConditions(); + // optional int32 it_covered_conditions = 6; /** * optional int32 it_covered_conditions = 6; */ @@ -19557,6 +19643,7 @@ public final class BatchReport { */ int getItCoveredConditions(); + // optional int32 overall_covered_conditions = 7; /** * optional int32 overall_covered_conditions = 7; */ @@ -19575,9 +19662,8 @@ public final class BatchReport { * */ public static final class Coverage extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Coverage) - CoverageOrBuilder { + com.google.protobuf.GeneratedMessage + implements CoverageOrBuilder { // Use Coverage.newBuilder() to construct. private Coverage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -19698,6 +19784,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 line = 1; public static final int LINE_FIELD_NUMBER = 1; private int line_; /** @@ -19713,6 +19800,7 @@ public final class BatchReport { return line_; } + // optional int32 conditions = 2; public static final int CONDITIONS_FIELD_NUMBER = 2; private int conditions_; /** @@ -19736,6 +19824,7 @@ public final class BatchReport { return conditions_; } + // optional bool ut_hits = 3; public static final int UT_HITS_FIELD_NUMBER = 3; private boolean utHits_; /** @@ -19751,6 +19840,7 @@ public final class BatchReport { return utHits_; } + // optional bool it_hits = 4; public static final int IT_HITS_FIELD_NUMBER = 4; private boolean itHits_; /** @@ -19766,6 +19856,7 @@ public final class BatchReport { return itHits_; } + // optional int32 ut_covered_conditions = 5; public static final int UT_COVERED_CONDITIONS_FIELD_NUMBER = 5; private int utCoveredConditions_; /** @@ -19781,6 +19872,7 @@ public final class BatchReport { return utCoveredConditions_; } + // optional int32 it_covered_conditions = 6; public static final int IT_COVERED_CONDITIONS_FIELD_NUMBER = 6; private int itCoveredConditions_; /** @@ -19796,6 +19888,7 @@ public final class BatchReport { return itCoveredConditions_; } + // optional int32 overall_covered_conditions = 7; public static final int OVERALL_COVERED_CONDITIONS_FIELD_NUMBER = 7; private int overallCoveredConditions_; /** @@ -19823,8 +19916,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -19978,9 +20070,8 @@ public final class BatchReport { * */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Coverage) - org.sonar.batch.protocol.output.BatchReport.CoverageOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.CoverageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Coverage_descriptor; @@ -20147,6 +20238,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 line = 1; private int line_ ; /** * optional int32 line = 1; @@ -20179,6 +20271,7 @@ public final class BatchReport { return this; } + // optional int32 conditions = 2; private int conditions_ ; /** * optional int32 conditions = 2; @@ -20227,6 +20320,7 @@ public final class BatchReport { return this; } + // optional bool ut_hits = 3; private boolean utHits_ ; /** * optional bool ut_hits = 3; @@ -20259,6 +20353,7 @@ public final class BatchReport { return this; } + // optional bool it_hits = 4; private boolean itHits_ ; /** * optional bool it_hits = 4; @@ -20291,6 +20386,7 @@ public final class BatchReport { return this; } + // optional int32 ut_covered_conditions = 5; private int utCoveredConditions_ ; /** * optional int32 ut_covered_conditions = 5; @@ -20323,6 +20419,7 @@ public final class BatchReport { return this; } + // optional int32 it_covered_conditions = 6; private int itCoveredConditions_ ; /** * optional int32 it_covered_conditions = 6; @@ -20355,6 +20452,7 @@ public final class BatchReport { return this; } + // optional int32 overall_covered_conditions = 7; private int overallCoveredConditions_ ; /** * optional int32 overall_covered_conditions = 7; @@ -20398,10 +20496,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Coverage) } - public interface SyntaxHighlightingOrBuilder extends - // @@protoc_insertion_point(interface_extends:SyntaxHighlighting) - com.google.protobuf.MessageOrBuilder { + public interface SyntaxHighlightingOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional .Range range = 1; /** * optional .Range range = 1; */ @@ -20415,6 +20513,7 @@ public final class BatchReport { */ org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getRangeOrBuilder(); + // optional .HighlightingType type = 2; /** * optional .HighlightingType type = 2; */ @@ -20433,9 +20532,8 @@ public final class BatchReport { * */ public static final class SyntaxHighlighting extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:SyntaxHighlighting) - SyntaxHighlightingOrBuilder { + com.google.protobuf.GeneratedMessage + implements SyntaxHighlightingOrBuilder { // Use SyntaxHighlighting.newBuilder() to construct. private SyntaxHighlighting(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -20545,6 +20643,7 @@ public final class BatchReport { } private int bitField0_; + // optional .Range range = 1; public static final int RANGE_FIELD_NUMBER = 1; private org.sonar.batch.protocol.output.BatchReport.Range range_; /** @@ -20566,6 +20665,7 @@ public final class BatchReport { return range_; } + // optional .HighlightingType type = 2; public static final int TYPE_FIELD_NUMBER = 2; private org.sonar.batch.protocol.Constants.HighlightingType type_; /** @@ -20588,8 +20688,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -20708,9 +20807,8 @@ public final class BatchReport { * */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:SyntaxHighlighting) - org.sonar.batch.protocol.output.BatchReport.SyntaxHighlightingOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.SyntaxHighlightingOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_SyntaxHighlighting_descriptor; @@ -20841,6 +20939,7 @@ public final class BatchReport { } private int bitField0_; + // optional .Range range = 1; private org.sonar.batch.protocol.output.BatchReport.Range range_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> rangeBuilder_; @@ -20949,7 +21048,7 @@ public final class BatchReport { if (rangeBuilder_ == null) { rangeBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder>( - getRange(), + range_, getParentForChildren(), isClean()); range_ = null; @@ -20957,6 +21056,7 @@ public final class BatchReport { return rangeBuilder_; } + // optional .HighlightingType type = 2; private org.sonar.batch.protocol.Constants.HighlightingType type_ = org.sonar.batch.protocol.Constants.HighlightingType.ANNOTATION; /** * optional .HighlightingType type = 2; @@ -21003,10 +21103,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:SyntaxHighlighting) } - public interface TestOrBuilder extends - // @@protoc_insertion_point(interface_extends:Test) - com.google.protobuf.MessageOrBuilder { + public interface TestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional string name = 1; /** * optional string name = 1; */ @@ -21021,57 +21121,52 @@ public final class BatchReport { com.google.protobuf.ByteString getNameBytes(); + // optional .TestStatus status = 2; /** - * optional .TestType type = 2; - */ - boolean hasType(); - /** - * optional .TestType type = 2; - */ - org.sonar.batch.protocol.Constants.TestType getType(); - - /** - * optional .TestStatus status = 3; + * optional .TestStatus status = 2; */ boolean hasStatus(); /** - * optional .TestStatus status = 3; + * optional .TestStatus status = 2; */ org.sonar.batch.protocol.Constants.TestStatus getStatus(); + // optional int64 duration_in_ms = 3; /** - * optional int64 duration_in_ms = 4; + * optional int64 duration_in_ms = 3; */ boolean hasDurationInMs(); /** - * optional int64 duration_in_ms = 4; + * optional int64 duration_in_ms = 3; */ long getDurationInMs(); + // optional string stacktrace = 4; /** - * optional string stacktrace = 5; + * optional string stacktrace = 4; */ boolean hasStacktrace(); /** - * optional string stacktrace = 5; + * optional string stacktrace = 4; */ java.lang.String getStacktrace(); /** - * optional string stacktrace = 5; + * optional string stacktrace = 4; */ com.google.protobuf.ByteString getStacktraceBytes(); + // optional string msg = 5; /** - * optional string msg = 6; + * optional string msg = 5; */ boolean hasMsg(); /** - * optional string msg = 6; + * optional string msg = 5; */ java.lang.String getMsg(); /** - * optional string msg = 6; + * optional string msg = 5; */ com.google.protobuf.ByteString getMsgBytes(); @@ -21080,9 +21175,8 @@ public final class BatchReport { * Protobuf type {@code Test} */ public static final class Test extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Test) - TestOrBuilder { + com.google.protobuf.GeneratedMessage + implements TestOrBuilder { // Use Test.newBuilder() to construct. private Test(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -21129,48 +21223,34 @@ public final class BatchReport { break; } case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; - name_ = bs; + name_ = input.readBytes(); break; } case 16: { int rawValue = input.readEnum(); - org.sonar.batch.protocol.Constants.TestType value = org.sonar.batch.protocol.Constants.TestType.valueOf(rawValue); + org.sonar.batch.protocol.Constants.TestStatus value = org.sonar.batch.protocol.Constants.TestStatus.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(2, rawValue); } else { bitField0_ |= 0x00000002; - type_ = value; + status_ = value; } break; } case 24: { - int rawValue = input.readEnum(); - org.sonar.batch.protocol.Constants.TestStatus value = org.sonar.batch.protocol.Constants.TestStatus.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(3, rawValue); - } else { - bitField0_ |= 0x00000004; - status_ = value; - } + bitField0_ |= 0x00000004; + durationInMs_ = input.readInt64(); break; } - case 32: { + case 34: { bitField0_ |= 0x00000008; - durationInMs_ = input.readInt64(); + stacktrace_ = input.readBytes(); break; } case 42: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000010; - stacktrace_ = bs; - break; - } - case 50: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000020; - msg_ = bs; + msg_ = input.readBytes(); break; } } @@ -21213,6 +21293,7 @@ public final class BatchReport { } private int bitField0_; + // optional string name = 1; public static final int NAME_FIELD_NUMBER = 1; private java.lang.Object name_; /** @@ -21255,61 +21336,49 @@ public final class BatchReport { } } - public static final int TYPE_FIELD_NUMBER = 2; - private org.sonar.batch.protocol.Constants.TestType type_; - /** - * optional .TestType type = 2; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional .TestType type = 2; - */ - public org.sonar.batch.protocol.Constants.TestType getType() { - return type_; - } - - public static final int STATUS_FIELD_NUMBER = 3; + // optional .TestStatus status = 2; + public static final int STATUS_FIELD_NUMBER = 2; private org.sonar.batch.protocol.Constants.TestStatus status_; /** - * optional .TestStatus status = 3; + * optional .TestStatus status = 2; */ public boolean hasStatus() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .TestStatus status = 3; + * optional .TestStatus status = 2; */ public org.sonar.batch.protocol.Constants.TestStatus getStatus() { return status_; } - public static final int DURATION_IN_MS_FIELD_NUMBER = 4; + // optional int64 duration_in_ms = 3; + public static final int DURATION_IN_MS_FIELD_NUMBER = 3; private long durationInMs_; /** - * optional int64 duration_in_ms = 4; + * optional int64 duration_in_ms = 3; */ public boolean hasDurationInMs() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional int64 duration_in_ms = 4; + * optional int64 duration_in_ms = 3; */ public long getDurationInMs() { return durationInMs_; } - public static final int STACKTRACE_FIELD_NUMBER = 5; + // optional string stacktrace = 4; + public static final int STACKTRACE_FIELD_NUMBER = 4; private java.lang.Object stacktrace_; /** - * optional string stacktrace = 5; + * optional string stacktrace = 4; */ public boolean hasStacktrace() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional string stacktrace = 5; + * optional string stacktrace = 4; */ public java.lang.String getStacktrace() { java.lang.Object ref = stacktrace_; @@ -21326,7 +21395,7 @@ public final class BatchReport { } } /** - * optional string stacktrace = 5; + * optional string stacktrace = 4; */ public com.google.protobuf.ByteString getStacktraceBytes() { @@ -21342,16 +21411,17 @@ public final class BatchReport { } } - public static final int MSG_FIELD_NUMBER = 6; + // optional string msg = 5; + public static final int MSG_FIELD_NUMBER = 5; private java.lang.Object msg_; /** - * optional string msg = 6; + * optional string msg = 5; */ public boolean hasMsg() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional string msg = 6; + * optional string msg = 5; */ public java.lang.String getMsg() { java.lang.Object ref = msg_; @@ -21368,7 +21438,7 @@ public final class BatchReport { } } /** - * optional string msg = 6; + * optional string msg = 5; */ public com.google.protobuf.ByteString getMsgBytes() { @@ -21386,7 +21456,6 @@ public final class BatchReport { private void initFields() { name_ = ""; - type_ = org.sonar.batch.protocol.Constants.TestType.UT; status_ = org.sonar.batch.protocol.Constants.TestStatus.OK; durationInMs_ = 0L; stacktrace_ = ""; @@ -21395,8 +21464,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -21409,19 +21477,16 @@ public final class BatchReport { output.writeBytes(1, getNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(2, type_.getNumber()); + output.writeEnum(2, status_.getNumber()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeEnum(3, status_.getNumber()); + output.writeInt64(3, durationInMs_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt64(4, durationInMs_); + output.writeBytes(4, getStacktraceBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(5, getStacktraceBytes()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBytes(6, getMsgBytes()); + output.writeBytes(5, getMsgBytes()); } getUnknownFields().writeTo(output); } @@ -21438,23 +21503,19 @@ public final class BatchReport { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, type_.getNumber()); + .computeEnumSize(2, status_.getNumber()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, status_.getNumber()); + .computeInt64Size(3, durationInMs_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, durationInMs_); + .computeBytesSize(4, getStacktraceBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, getStacktraceBytes()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(6, getMsgBytes()); + .computeBytesSize(5, getMsgBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -21538,9 +21599,8 @@ public final class BatchReport { * Protobuf type {@code Test} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Test) - org.sonar.batch.protocol.output.BatchReport.TestOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.TestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Test_descriptor; @@ -21575,16 +21635,14 @@ public final class BatchReport { super.clear(); name_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - type_ = org.sonar.batch.protocol.Constants.TestType.UT; - bitField0_ = (bitField0_ & ~0x00000002); status_ = org.sonar.batch.protocol.Constants.TestStatus.OK; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); durationInMs_ = 0L; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); stacktrace_ = ""; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000008); msg_ = ""; - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -21620,22 +21678,18 @@ public final class BatchReport { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.type_ = type_; + result.status_ = status_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.status_ = status_; + result.durationInMs_ = durationInMs_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } - result.durationInMs_ = durationInMs_; + result.stacktrace_ = stacktrace_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } - result.stacktrace_ = stacktrace_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } result.msg_ = msg_; result.bitField0_ = to_bitField0_; onBuilt(); @@ -21658,9 +21712,6 @@ public final class BatchReport { name_ = other.name_; onChanged(); } - if (other.hasType()) { - setType(other.getType()); - } if (other.hasStatus()) { setStatus(other.getStatus()); } @@ -21668,12 +21719,12 @@ public final class BatchReport { setDurationInMs(other.getDurationInMs()); } if (other.hasStacktrace()) { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; stacktrace_ = other.stacktrace_; onChanged(); } if (other.hasMsg()) { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; msg_ = other.msg_; onChanged(); } @@ -21704,6 +21755,7 @@ public final class BatchReport { } private int bitField0_; + // optional string name = 1; private java.lang.Object name_ = ""; /** * optional string name = 1; @@ -21717,12 +21769,9 @@ public final class BatchReport { public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + name_ = s; return s; } else { return (java.lang.String) ref; @@ -21780,134 +21829,99 @@ public final class BatchReport { return this; } - private org.sonar.batch.protocol.Constants.TestType type_ = org.sonar.batch.protocol.Constants.TestType.UT; - /** - * optional .TestType type = 2; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional .TestType type = 2; - */ - public org.sonar.batch.protocol.Constants.TestType getType() { - return type_; - } - /** - * optional .TestType type = 2; - */ - public Builder setType(org.sonar.batch.protocol.Constants.TestType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - type_ = value; - onChanged(); - return this; - } - /** - * optional .TestType type = 2; - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000002); - type_ = org.sonar.batch.protocol.Constants.TestType.UT; - onChanged(); - return this; - } - + // optional .TestStatus status = 2; private org.sonar.batch.protocol.Constants.TestStatus status_ = org.sonar.batch.protocol.Constants.TestStatus.OK; /** - * optional .TestStatus status = 3; + * optional .TestStatus status = 2; */ public boolean hasStatus() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .TestStatus status = 3; + * optional .TestStatus status = 2; */ public org.sonar.batch.protocol.Constants.TestStatus getStatus() { return status_; } /** - * optional .TestStatus status = 3; + * optional .TestStatus status = 2; */ public Builder setStatus(org.sonar.batch.protocol.Constants.TestStatus value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; status_ = value; onChanged(); return this; } /** - * optional .TestStatus status = 3; + * optional .TestStatus status = 2; */ public Builder clearStatus() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); status_ = org.sonar.batch.protocol.Constants.TestStatus.OK; onChanged(); return this; } + // optional int64 duration_in_ms = 3; private long durationInMs_ ; /** - * optional int64 duration_in_ms = 4; + * optional int64 duration_in_ms = 3; */ public boolean hasDurationInMs() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional int64 duration_in_ms = 4; + * optional int64 duration_in_ms = 3; */ public long getDurationInMs() { return durationInMs_; } /** - * optional int64 duration_in_ms = 4; + * optional int64 duration_in_ms = 3; */ public Builder setDurationInMs(long value) { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; durationInMs_ = value; onChanged(); return this; } /** - * optional int64 duration_in_ms = 4; + * optional int64 duration_in_ms = 3; */ public Builder clearDurationInMs() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); durationInMs_ = 0L; onChanged(); return this; } + // optional string stacktrace = 4; private java.lang.Object stacktrace_ = ""; /** - * optional string stacktrace = 5; + * optional string stacktrace = 4; */ public boolean hasStacktrace() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional string stacktrace = 5; + * optional string stacktrace = 4; */ public java.lang.String getStacktrace() { java.lang.Object ref = stacktrace_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - stacktrace_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + stacktrace_ = s; return s; } else { return (java.lang.String) ref; } } /** - * optional string stacktrace = 5; + * optional string stacktrace = 4; */ public com.google.protobuf.ByteString getStacktraceBytes() { @@ -21923,67 +21937,65 @@ public final class BatchReport { } } /** - * optional string stacktrace = 5; + * optional string stacktrace = 4; */ public Builder setStacktrace( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; stacktrace_ = value; onChanged(); return this; } /** - * optional string stacktrace = 5; + * optional string stacktrace = 4; */ public Builder clearStacktrace() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000008); stacktrace_ = getDefaultInstance().getStacktrace(); onChanged(); return this; } /** - * optional string stacktrace = 5; + * optional string stacktrace = 4; */ public Builder setStacktraceBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; stacktrace_ = value; onChanged(); return this; } + // optional string msg = 5; private java.lang.Object msg_ = ""; /** - * optional string msg = 6; + * optional string msg = 5; */ public boolean hasMsg() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional string msg = 6; + * optional string msg = 5; */ public java.lang.String getMsg() { java.lang.Object ref = msg_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - msg_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + msg_ = s; return s; } else { return (java.lang.String) ref; } } /** - * optional string msg = 6; + * optional string msg = 5; */ public com.google.protobuf.ByteString getMsgBytes() { @@ -21999,36 +22011,36 @@ public final class BatchReport { } } /** - * optional string msg = 6; + * optional string msg = 5; */ public Builder setMsg( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; msg_ = value; onChanged(); return this; } /** - * optional string msg = 6; + * optional string msg = 5; */ public Builder clearMsg() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000010); msg_ = getDefaultInstance().getMsg(); onChanged(); return this; } /** - * optional string msg = 6; + * optional string msg = 5; */ public Builder setMsgBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; msg_ = value; onChanged(); return this; @@ -22045,10 +22057,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Test) } - public interface CoverageDetailOrBuilder extends - // @@protoc_insertion_point(interface_extends:CoverageDetail) - com.google.protobuf.MessageOrBuilder { + public interface CoverageDetailOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional string test_name = 1; /** * optional string test_name = 1; */ @@ -22063,6 +22075,7 @@ public final class BatchReport { com.google.protobuf.ByteString getTestNameBytes(); + // repeated .CoverageDetail.CoveredFile covered_file = 2; /** * repeated .CoverageDetail.CoveredFile covered_file = 2; */ @@ -22091,9 +22104,8 @@ public final class BatchReport { * Protobuf type {@code CoverageDetail} */ public static final class CoverageDetail extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:CoverageDetail) - CoverageDetailOrBuilder { + com.google.protobuf.GeneratedMessage + implements CoverageDetailOrBuilder { // Use CoverageDetail.newBuilder() to construct. private CoverageDetail(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -22140,9 +22152,8 @@ public final class BatchReport { break; } case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; - testName_ = bs; + testName_ = input.readBytes(); break; } case 18: { @@ -22195,10 +22206,10 @@ public final class BatchReport { return PARSER; } - public interface CoveredFileOrBuilder extends - // @@protoc_insertion_point(interface_extends:CoverageDetail.CoveredFile) - com.google.protobuf.MessageOrBuilder { + public interface CoveredFileOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional int32 file_ref = 1; /** * optional int32 file_ref = 1; */ @@ -22208,6 +22219,7 @@ public final class BatchReport { */ int getFileRef(); + // repeated int32 covered_line = 2 [packed = true]; /** * repeated int32 covered_line = 2 [packed = true]; */ @@ -22225,9 +22237,8 @@ public final class BatchReport { * Protobuf type {@code CoverageDetail.CoveredFile} */ public static final class CoveredFile extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:CoverageDetail.CoveredFile) - CoveredFileOrBuilder { + com.google.protobuf.GeneratedMessage + implements CoveredFileOrBuilder { // Use CoveredFile.newBuilder() to construct. private CoveredFile(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -22342,6 +22353,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 file_ref = 1; public static final int FILE_REF_FIELD_NUMBER = 1; private int fileRef_; /** @@ -22357,6 +22369,7 @@ public final class BatchReport { return fileRef_; } + // repeated int32 covered_line = 2 [packed = true]; public static final int COVERED_LINE_FIELD_NUMBER = 2; private java.util.List coveredLine_; /** @@ -22387,8 +22400,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -22516,9 +22528,8 @@ public final class BatchReport { * Protobuf type {@code CoverageDetail.CoveredFile} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:CoverageDetail.CoveredFile) - org.sonar.batch.protocol.output.BatchReport.CoverageDetail.CoveredFileOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.CoverageDetail.CoveredFileOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_CoverageDetail_CoveredFile_descriptor; @@ -22648,6 +22659,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 file_ref = 1; private int fileRef_ ; /** * optional int32 file_ref = 1; @@ -22680,6 +22692,7 @@ public final class BatchReport { return this; } + // repeated int32 covered_line = 2 [packed = true]; private java.util.List coveredLine_ = java.util.Collections.emptyList(); private void ensureCoveredLineIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { @@ -22731,8 +22744,7 @@ public final class BatchReport { public Builder addAllCoveredLine( java.lang.Iterable values) { ensureCoveredLineIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, coveredLine_); + super.addAll(values, coveredLine_); onChanged(); return this; } @@ -22758,6 +22770,7 @@ public final class BatchReport { } private int bitField0_; + // optional string test_name = 1; public static final int TEST_NAME_FIELD_NUMBER = 1; private java.lang.Object testName_; /** @@ -22800,6 +22813,7 @@ public final class BatchReport { } } + // repeated .CoverageDetail.CoveredFile covered_file = 2; public static final int COVERED_FILE_FIELD_NUMBER = 2; private java.util.List coveredFile_; /** @@ -22842,8 +22856,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -22957,9 +22970,8 @@ public final class BatchReport { * Protobuf type {@code CoverageDetail} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:CoverageDetail) - org.sonar.batch.protocol.output.BatchReport.CoverageDetailOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.CoverageDetailOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_CoverageDetail_descriptor; @@ -23116,6 +23128,7 @@ public final class BatchReport { } private int bitField0_; + // optional string test_name = 1; private java.lang.Object testName_ = ""; /** * optional string test_name = 1; @@ -23129,12 +23142,9 @@ public final class BatchReport { public java.lang.String getTestName() { java.lang.Object ref = testName_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - testName_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + testName_ = s; return s; } else { return (java.lang.String) ref; @@ -23192,6 +23202,7 @@ public final class BatchReport { return this; } + // repeated .CoverageDetail.CoveredFile covered_file = 2; private java.util.List coveredFile_ = java.util.Collections.emptyList(); private void ensureCoveredFileIsMutable() { @@ -23333,8 +23344,7 @@ public final class BatchReport { java.lang.Iterable values) { if (coveredFileBuilder_ == null) { ensureCoveredFileIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, coveredFile_); + super.addAll(values, coveredFile_); onChanged(); } else { coveredFileBuilder_.addAllMessages(values); @@ -23443,10 +23453,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:CoverageDetail) } - public interface FileDependencyOrBuilder extends - // @@protoc_insertion_point(interface_extends:FileDependency) - com.google.protobuf.MessageOrBuilder { + public interface FileDependencyOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional int32 to_file_ref = 1; /** * optional int32 to_file_ref = 1; */ @@ -23456,6 +23466,7 @@ public final class BatchReport { */ int getToFileRef(); + // optional int32 weight = 2; /** * optional int32 weight = 2; */ @@ -23469,9 +23480,8 @@ public final class BatchReport { * Protobuf type {@code FileDependency} */ public static final class FileDependency extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:FileDependency) - FileDependencyOrBuilder { + com.google.protobuf.GeneratedMessage + implements FileDependencyOrBuilder { // Use FileDependency.newBuilder() to construct. private FileDependency(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -23567,6 +23577,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 to_file_ref = 1; public static final int TO_FILE_REF_FIELD_NUMBER = 1; private int toFileRef_; /** @@ -23582,6 +23593,7 @@ public final class BatchReport { return toFileRef_; } + // optional int32 weight = 2; public static final int WEIGHT_FIELD_NUMBER = 2; private int weight_; /** @@ -23604,8 +23616,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -23719,9 +23730,8 @@ public final class BatchReport { * Protobuf type {@code FileDependency} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:FileDependency) - org.sonar.batch.protocol.output.BatchReport.FileDependencyOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.FileDependencyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_FileDependency_descriptor; @@ -23843,6 +23853,7 @@ public final class BatchReport { } private int bitField0_; + // optional int32 to_file_ref = 1; private int toFileRef_ ; /** * optional int32 to_file_ref = 1; @@ -23875,6 +23886,7 @@ public final class BatchReport { return this; } + // optional int32 weight = 2; private int weight_ ; /** * optional int32 weight = 2; @@ -23918,10 +23930,10 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:FileDependency) } - public interface ModuleDependenciesOrBuilder extends - // @@protoc_insertion_point(interface_extends:ModuleDependencies) - com.google.protobuf.MessageOrBuilder { + public interface ModuleDependenciesOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // repeated .ModuleDependencies.ModuleDependency dep = 1; /** * repeated .ModuleDependencies.ModuleDependency dep = 1; */ @@ -23950,9 +23962,8 @@ public final class BatchReport { * Protobuf type {@code ModuleDependencies} */ public static final class ModuleDependencies extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:ModuleDependencies) - ModuleDependenciesOrBuilder { + com.google.protobuf.GeneratedMessage + implements ModuleDependenciesOrBuilder { // Use ModuleDependencies.newBuilder() to construct. private ModuleDependencies(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -24048,10 +24059,10 @@ public final class BatchReport { return PARSER; } - public interface ModuleDependencyOrBuilder extends - // @@protoc_insertion_point(interface_extends:ModuleDependencies.ModuleDependency) - com.google.protobuf.MessageOrBuilder { + public interface ModuleDependencyOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional string key = 1; /** * optional string key = 1; */ @@ -24066,6 +24077,7 @@ public final class BatchReport { com.google.protobuf.ByteString getKeyBytes(); + // optional string version = 2; /** * optional string version = 2; */ @@ -24080,6 +24092,7 @@ public final class BatchReport { com.google.protobuf.ByteString getVersionBytes(); + // optional string scope = 3; /** * optional string scope = 3; */ @@ -24094,6 +24107,7 @@ public final class BatchReport { com.google.protobuf.ByteString getScopeBytes(); + // repeated .ModuleDependencies.ModuleDependency child = 4; /** * repeated .ModuleDependencies.ModuleDependency child = 4; */ @@ -24122,9 +24136,8 @@ public final class BatchReport { * Protobuf type {@code ModuleDependencies.ModuleDependency} */ public static final class ModuleDependency extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:ModuleDependencies.ModuleDependency) - ModuleDependencyOrBuilder { + com.google.protobuf.GeneratedMessage + implements ModuleDependencyOrBuilder { // Use ModuleDependency.newBuilder() to construct. private ModuleDependency(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -24171,21 +24184,18 @@ public final class BatchReport { break; } case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; - key_ = bs; + key_ = input.readBytes(); break; } case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - version_ = bs; + version_ = input.readBytes(); break; } case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000004; - scope_ = bs; + scope_ = input.readBytes(); break; } case 34: { @@ -24239,6 +24249,7 @@ public final class BatchReport { } private int bitField0_; + // optional string key = 1; public static final int KEY_FIELD_NUMBER = 1; private java.lang.Object key_; /** @@ -24281,6 +24292,7 @@ public final class BatchReport { } } + // optional string version = 2; public static final int VERSION_FIELD_NUMBER = 2; private java.lang.Object version_; /** @@ -24323,6 +24335,7 @@ public final class BatchReport { } } + // optional string scope = 3; public static final int SCOPE_FIELD_NUMBER = 3; private java.lang.Object scope_; /** @@ -24365,6 +24378,7 @@ public final class BatchReport { } } + // repeated .ModuleDependencies.ModuleDependency child = 4; public static final int CHILD_FIELD_NUMBER = 4; private java.util.List child_; /** @@ -24409,8 +24423,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -24538,9 +24551,8 @@ public final class BatchReport { * Protobuf type {@code ModuleDependencies.ModuleDependency} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:ModuleDependencies.ModuleDependency) - org.sonar.batch.protocol.output.BatchReport.ModuleDependencies.ModuleDependencyOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.ModuleDependencies.ModuleDependencyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_ModuleDependencies_ModuleDependency_descriptor; @@ -24719,6 +24731,7 @@ public final class BatchReport { } private int bitField0_; + // optional string key = 1; private java.lang.Object key_ = ""; /** * optional string key = 1; @@ -24732,12 +24745,9 @@ public final class BatchReport { public java.lang.String getKey() { java.lang.Object ref = key_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - key_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + key_ = s; return s; } else { return (java.lang.String) ref; @@ -24795,6 +24805,7 @@ public final class BatchReport { return this; } + // optional string version = 2; private java.lang.Object version_ = ""; /** * optional string version = 2; @@ -24808,12 +24819,9 @@ public final class BatchReport { public java.lang.String getVersion() { java.lang.Object ref = version_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - version_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + version_ = s; return s; } else { return (java.lang.String) ref; @@ -24871,6 +24879,7 @@ public final class BatchReport { return this; } + // optional string scope = 3; private java.lang.Object scope_ = ""; /** * optional string scope = 3; @@ -24884,12 +24893,9 @@ public final class BatchReport { public java.lang.String getScope() { java.lang.Object ref = scope_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - scope_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + scope_ = s; return s; } else { return (java.lang.String) ref; @@ -24947,6 +24953,7 @@ public final class BatchReport { return this; } + // repeated .ModuleDependencies.ModuleDependency child = 4; private java.util.List child_ = java.util.Collections.emptyList(); private void ensureChildIsMutable() { @@ -25088,8 +25095,7 @@ public final class BatchReport { java.lang.Iterable values) { if (childBuilder_ == null) { ensureChildIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, child_); + super.addAll(values, child_); onChanged(); } else { childBuilder_.addAllMessages(values); @@ -25198,6 +25204,7 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:ModuleDependencies.ModuleDependency) } + // repeated .ModuleDependencies.ModuleDependency dep = 1; public static final int DEP_FIELD_NUMBER = 1; private java.util.List dep_; /** @@ -25239,8 +25246,7 @@ public final class BatchReport { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -25347,9 +25353,8 @@ public final class BatchReport { * Protobuf type {@code ModuleDependencies} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:ModuleDependencies) - org.sonar.batch.protocol.output.BatchReport.ModuleDependenciesOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.batch.protocol.output.BatchReport.ModuleDependenciesOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_ModuleDependencies_descriptor; @@ -25493,6 +25498,7 @@ public final class BatchReport { } private int bitField0_; + // repeated .ModuleDependencies.ModuleDependency dep = 1; private java.util.List dep_ = java.util.Collections.emptyList(); private void ensureDepIsMutable() { @@ -25634,8 +25640,7 @@ public final class BatchReport { java.lang.Iterable values) { if (depBuilder_ == null) { ensureDepIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, dep_); + super.addAll(values, dep_); onChanged(); } else { depBuilder_.addAllMessages(values); @@ -25744,122 +25749,122 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:ModuleDependencies) } - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Metadata_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Metadata_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_ComponentLink_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_ComponentLink_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Event_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Event_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Component_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Component_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Measure_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Measure_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Measures_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Measures_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Issue_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Issue_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Issues_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Issues_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Changesets_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Changesets_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Changesets_Changeset_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Changesets_Changeset_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Duplicate_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Duplicate_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Duplication_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Duplication_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Duplications_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Duplications_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Range_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Range_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Symbols_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Symbols_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Symbols_Symbol_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Symbols_Symbol_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Coverage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Coverage_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_SyntaxHighlighting_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_SyntaxHighlighting_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Test_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Test_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_CoverageDetail_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_CoverageDetail_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_CoverageDetail_CoveredFile_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_CoverageDetail_CoveredFile_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_FileDependency_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_FileDependency_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_ModuleDependencies_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_ModuleDependencies_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_ModuleDependencies_ModuleDependency_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -25900,8 +25905,8 @@ public final class BatchReport { "riation_value_1\030\016 \001(\001\022\031\n\021variation_value" + "_2\030\017 \001(\001\022\031\n\021variation_value_3\030\020 \001(\001\022\031\n\021v" + "ariation_value_4\030\021 \001(\001\022\031\n\021variation_valu" + - "e_5\030\022 \001(\001\022\026\n\016characteric_id\030\024 \001(\005\022\021\n\tper" + - "son_id\030\025 \001(\005\"<\n\010Measures\022\025\n\rcomponent_re" + + "e_5\030\022 \001(\001\022\026\n\016characteric_id\030\023 \001(\005\022\021\n\tper" + + "son_id\030\024 \001(\005\"<\n\010Measures\022\025\n\rcomponent_re" + "f\030\001 \001(\005\022\031\n\007measure\030\002 \003(\0132\010.Measure\"\231\004\n\005I", "ssue\022\027\n\017rule_repository\030\001 \001(\t\022\020\n\010rule_ke" + "y\030\002 \001(\t\022\014\n\004line\030\003 \001(\005\022\013\n\003msg\030\004 \001(\t\022\033\n\010se" + @@ -25940,180 +25945,178 @@ public final class BatchReport { "t_covered_conditions\030\006 \001(\005\022\"\n\032overall_co" + "vered_conditions\030\007 \001(\005\"L\n\022SyntaxHighligh" + "ting\022\025\n\005range\030\001 \001(\0132\006.Range\022\037\n\004type\030\002 \001(" + - "\0162\021.HighlightingType\"\203\001\n\004Test\022\014\n\004name\030\001 " + - "\001(\t\022\027\n\004type\030\002 \001(\0162\t.TestType\022\033\n\006status\030\003" + - " \001(\0162\013.TestStatus\022\026\n\016duration_in_ms\030\004 \001(", - "\003\022\022\n\nstacktrace\030\005 \001(\t\022\013\n\003msg\030\006 \001(\t\"\221\001\n\016C" + - "overageDetail\022\021\n\ttest_name\030\001 \001(\t\0221\n\014cove" + - "red_file\030\002 \003(\0132\033.CoverageDetail.CoveredF" + - "ile\0329\n\013CoveredFile\022\020\n\010file_ref\030\001 \001(\005\022\030\n\014" + - "covered_line\030\002 \003(\005B\002\020\001\"5\n\016FileDependency" + - "\022\023\n\013to_file_ref\030\001 \001(\005\022\016\n\006weight\030\002 \001(\005\"\275\001" + - "\n\022ModuleDependencies\0221\n\003dep\030\001 \003(\0132$.Modu" + - "leDependencies.ModuleDependency\032t\n\020Modul" + - "eDependency\022\013\n\003key\030\001 \001(\t\022\017\n\007version\030\002 \001(" + - "\t\022\r\n\005scope\030\003 \001(\t\0223\n\005child\030\004 \003(\0132$.Module", - "Dependencies.ModuleDependencyB#\n\037org.son" + - "ar.batch.protocol.outputH\001" + "\0162\021.HighlightingType\"j\n\004Test\022\014\n\004name\030\001 \001" + + "(\t\022\033\n\006status\030\002 \001(\0162\013.TestStatus\022\026\n\016durat" + + "ion_in_ms\030\003 \001(\003\022\022\n\nstacktrace\030\004 \001(\t\022\013\n\003m", + "sg\030\005 \001(\t\"\221\001\n\016CoverageDetail\022\021\n\ttest_name" + + "\030\001 \001(\t\0221\n\014covered_file\030\002 \003(\0132\033.CoverageD" + + "etail.CoveredFile\0329\n\013CoveredFile\022\020\n\010file" + + "_ref\030\001 \001(\005\022\030\n\014covered_line\030\002 \003(\005B\002\020\001\"5\n\016" + + "FileDependency\022\023\n\013to_file_ref\030\001 \001(\005\022\016\n\006w" + + "eight\030\002 \001(\005\"\275\001\n\022ModuleDependencies\0221\n\003de" + + "p\030\001 \003(\0132$.ModuleDependencies.ModuleDepen" + + "dency\032t\n\020ModuleDependency\022\013\n\003key\030\001 \001(\t\022\017" + + "\n\007version\030\002 \001(\t\022\r\n\005scope\030\003 \001(\t\0223\n\005child\030" + + "\004 \003(\0132$.ModuleDependencies.ModuleDepende", + "ncyB#\n\037org.sonar.batch.protocol.outputH\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_Metadata_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Metadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Metadata_descriptor, + new java.lang.String[] { "AnalysisDate", "ProjectKey", "Branch", "RootComponentRef", "SnapshotId", "DeletedComponentsCount", }); + internal_static_ComponentLink_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_ComponentLink_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_ComponentLink_descriptor, + new java.lang.String[] { "Type", "Href", }); + internal_static_Event_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_Event_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Event_descriptor, + new java.lang.String[] { "ComponentRef", "Name", "Description", "Category", "EventData", }); + internal_static_Component_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_Component_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Component_descriptor, + new java.lang.String[] { "Ref", "Path", "Name", "Type", "IsTest", "Language", "ChildRef", "Link", "Version", "Key", "Lines", "Id", "SnapshotId", "Uuid", "Event", }); + internal_static_Measure_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_Measure_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Measure_descriptor, + new java.lang.String[] { "ValueType", "BooleanValue", "IntValue", "LongValue", "DoubleValue", "StringValue", "MetricKey", "Description", "RuleKey", "Severity", "AlertStatus", "AlertText", "VariationValue1", "VariationValue2", "VariationValue3", "VariationValue4", "VariationValue5", "CharactericId", "PersonId", }); + internal_static_Measures_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_Measures_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Measures_descriptor, + new java.lang.String[] { "ComponentRef", "Measure", }); + internal_static_Issue_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_Issue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Issue_descriptor, + new java.lang.String[] { "RuleRepository", "RuleKey", "Line", "Msg", "Severity", "Tag", "EffortToFix", "IsNew", "Uuid", "DebtInMinutes", "Resolution", "Status", "Checksum", "ManualSeverity", "Reporter", "Assignee", "ActionPlanKey", "Attributes", "AuthorLogin", "CreationDate", "CloseDate", "UpdateDate", "SelectedAt", "DiffFields", "IsChanged", "MustSendNotification", }); + internal_static_Issues_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_Issues_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Issues_descriptor, + new java.lang.String[] { "ComponentRef", "Issue", "ComponentUuid", }); + internal_static_Changesets_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_Changesets_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Changesets_descriptor, + new java.lang.String[] { "ComponentRef", "Changeset", "ChangesetIndexByLine", }); + internal_static_Changesets_Changeset_descriptor = + internal_static_Changesets_descriptor.getNestedTypes().get(0); + internal_static_Changesets_Changeset_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Changesets_Changeset_descriptor, + new java.lang.String[] { "Revision", "Author", "Date", }); + internal_static_Duplicate_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_Duplicate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Duplicate_descriptor, + new java.lang.String[] { "OtherFileRef", "Range", "OtherFileKey", }); + internal_static_Duplication_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_Duplication_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Duplication_descriptor, + new java.lang.String[] { "OriginPosition", "Duplicate", }); + internal_static_Duplications_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_Duplications_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Duplications_descriptor, + new java.lang.String[] { "ComponentRef", "Duplication", }); + internal_static_Range_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_Range_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Range_descriptor, + new java.lang.String[] { "StartLine", "EndLine", "StartOffset", "EndOffset", }); + internal_static_Symbols_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_Symbols_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Symbols_descriptor, + new java.lang.String[] { "FileRef", "Symbol", }); + internal_static_Symbols_Symbol_descriptor = + internal_static_Symbols_descriptor.getNestedTypes().get(0); + internal_static_Symbols_Symbol_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Symbols_Symbol_descriptor, + new java.lang.String[] { "Declaration", "Reference", }); + internal_static_Coverage_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_Coverage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Coverage_descriptor, + new java.lang.String[] { "Line", "Conditions", "UtHits", "ItHits", "UtCoveredConditions", "ItCoveredConditions", "OverallCoveredConditions", }); + internal_static_SyntaxHighlighting_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_SyntaxHighlighting_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_SyntaxHighlighting_descriptor, + new java.lang.String[] { "Range", "Type", }); + internal_static_Test_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_Test_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Test_descriptor, + new java.lang.String[] { "Name", "Status", "DurationInMs", "Stacktrace", "Msg", }); + internal_static_CoverageDetail_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_CoverageDetail_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_CoverageDetail_descriptor, + new java.lang.String[] { "TestName", "CoveredFile", }); + internal_static_CoverageDetail_CoveredFile_descriptor = + internal_static_CoverageDetail_descriptor.getNestedTypes().get(0); + internal_static_CoverageDetail_CoveredFile_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_CoverageDetail_CoveredFile_descriptor, + new java.lang.String[] { "FileRef", "CoveredLine", }); + internal_static_FileDependency_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_FileDependency_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_FileDependency_descriptor, + new java.lang.String[] { "ToFileRef", "Weight", }); + internal_static_ModuleDependencies_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_ModuleDependencies_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_ModuleDependencies_descriptor, + new java.lang.String[] { "Dep", }); + internal_static_ModuleDependencies_ModuleDependency_descriptor = + internal_static_ModuleDependencies_descriptor.getNestedTypes().get(0); + internal_static_ModuleDependencies_ModuleDependency_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_ModuleDependencies_ModuleDependency_descriptor, + new java.lang.String[] { "Key", "Version", "Scope", "Child", }); + return null; + } + }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { org.sonar.batch.protocol.Constants.getDescriptor(), }, assigner); - internal_static_Metadata_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_Metadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Metadata_descriptor, - new java.lang.String[] { "AnalysisDate", "ProjectKey", "Branch", "RootComponentRef", "SnapshotId", "DeletedComponentsCount", }); - internal_static_ComponentLink_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_ComponentLink_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_ComponentLink_descriptor, - new java.lang.String[] { "Type", "Href", }); - internal_static_Event_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_Event_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Event_descriptor, - new java.lang.String[] { "ComponentRef", "Name", "Description", "Category", "EventData", }); - internal_static_Component_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_Component_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Component_descriptor, - new java.lang.String[] { "Ref", "Path", "Name", "Type", "IsTest", "Language", "ChildRef", "Link", "Version", "Key", "Lines", "Id", "SnapshotId", "Uuid", "Event", }); - internal_static_Measure_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_Measure_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Measure_descriptor, - new java.lang.String[] { "ValueType", "BooleanValue", "IntValue", "LongValue", "DoubleValue", "StringValue", "MetricKey", "Description", "RuleKey", "Severity", "AlertStatus", "AlertText", "VariationValue1", "VariationValue2", "VariationValue3", "VariationValue4", "VariationValue5", "CharactericId", "PersonId", }); - internal_static_Measures_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_Measures_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Measures_descriptor, - new java.lang.String[] { "ComponentRef", "Measure", }); - internal_static_Issue_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_Issue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Issue_descriptor, - new java.lang.String[] { "RuleRepository", "RuleKey", "Line", "Msg", "Severity", "Tag", "EffortToFix", "IsNew", "Uuid", "DebtInMinutes", "Resolution", "Status", "Checksum", "ManualSeverity", "Reporter", "Assignee", "ActionPlanKey", "Attributes", "AuthorLogin", "CreationDate", "CloseDate", "UpdateDate", "SelectedAt", "DiffFields", "IsChanged", "MustSendNotification", }); - internal_static_Issues_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_Issues_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Issues_descriptor, - new java.lang.String[] { "ComponentRef", "Issue", "ComponentUuid", }); - internal_static_Changesets_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_Changesets_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Changesets_descriptor, - new java.lang.String[] { "ComponentRef", "Changeset", "ChangesetIndexByLine", }); - internal_static_Changesets_Changeset_descriptor = - internal_static_Changesets_descriptor.getNestedTypes().get(0); - internal_static_Changesets_Changeset_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Changesets_Changeset_descriptor, - new java.lang.String[] { "Revision", "Author", "Date", }); - internal_static_Duplicate_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_Duplicate_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Duplicate_descriptor, - new java.lang.String[] { "OtherFileRef", "Range", "OtherFileKey", }); - internal_static_Duplication_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_Duplication_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Duplication_descriptor, - new java.lang.String[] { "OriginPosition", "Duplicate", }); - internal_static_Duplications_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_Duplications_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Duplications_descriptor, - new java.lang.String[] { "ComponentRef", "Duplication", }); - internal_static_Range_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_Range_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Range_descriptor, - new java.lang.String[] { "StartLine", "EndLine", "StartOffset", "EndOffset", }); - internal_static_Symbols_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_Symbols_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Symbols_descriptor, - new java.lang.String[] { "FileRef", "Symbol", }); - internal_static_Symbols_Symbol_descriptor = - internal_static_Symbols_descriptor.getNestedTypes().get(0); - internal_static_Symbols_Symbol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Symbols_Symbol_descriptor, - new java.lang.String[] { "Declaration", "Reference", }); - internal_static_Coverage_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_Coverage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Coverage_descriptor, - new java.lang.String[] { "Line", "Conditions", "UtHits", "ItHits", "UtCoveredConditions", "ItCoveredConditions", "OverallCoveredConditions", }); - internal_static_SyntaxHighlighting_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_SyntaxHighlighting_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_SyntaxHighlighting_descriptor, - new java.lang.String[] { "Range", "Type", }); - internal_static_Test_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_Test_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Test_descriptor, - new java.lang.String[] { "Name", "Type", "Status", "DurationInMs", "Stacktrace", "Msg", }); - internal_static_CoverageDetail_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_CoverageDetail_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_CoverageDetail_descriptor, - new java.lang.String[] { "TestName", "CoveredFile", }); - internal_static_CoverageDetail_CoveredFile_descriptor = - internal_static_CoverageDetail_descriptor.getNestedTypes().get(0); - internal_static_CoverageDetail_CoveredFile_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_CoverageDetail_CoveredFile_descriptor, - new java.lang.String[] { "FileRef", "CoveredLine", }); - internal_static_FileDependency_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_FileDependency_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_FileDependency_descriptor, - new java.lang.String[] { "ToFileRef", "Weight", }); - internal_static_ModuleDependencies_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_ModuleDependencies_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_ModuleDependencies_descriptor, - new java.lang.String[] { "Dep", }); - internal_static_ModuleDependencies_ModuleDependency_descriptor = - internal_static_ModuleDependencies_descriptor.getNestedTypes().get(0); - internal_static_ModuleDependencies_ModuleDependency_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_ModuleDependencies_ModuleDependency_descriptor, - new java.lang.String[] { "Key", "Version", "Scope", "Child", }); - org.sonar.batch.protocol.Constants.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/sonar-batch-protocol/src/main/gen-java/org/sonar/server/source/db/FileSourceDb.java b/sonar-batch-protocol/src/main/gen-java/org/sonar/server/source/db/FileSourceDb.java index 8dad4b4b2b6..6603bc8ef05 100644 --- a/sonar-batch-protocol/src/main/gen-java/org/sonar/server/source/db/FileSourceDb.java +++ b/sonar-batch-protocol/src/main/gen-java/org/sonar/server/source/db/FileSourceDb.java @@ -8,10 +8,10 @@ public final class FileSourceDb { public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } - public interface LineOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.sonar.server.source.db.Line) - com.google.protobuf.MessageOrBuilder { + public interface LineOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional int32 line = 1; /** * optional int32 line = 1; */ @@ -21,6 +21,7 @@ public final class FileSourceDb { */ int getLine(); + // optional string source = 2; /** * optional string source = 2; */ @@ -35,6 +36,7 @@ public final class FileSourceDb { com.google.protobuf.ByteString getSourceBytes(); + // optional string scm_revision = 3; /** * optional string scm_revision = 3; * @@ -61,6 +63,7 @@ public final class FileSourceDb { com.google.protobuf.ByteString getScmRevisionBytes(); + // optional string scm_author = 4; /** * optional string scm_author = 4; */ @@ -75,6 +78,7 @@ public final class FileSourceDb { com.google.protobuf.ByteString getScmAuthorBytes(); + // optional int64 scm_date = 5; /** * optional int64 scm_date = 5; */ @@ -84,6 +88,7 @@ public final class FileSourceDb { */ long getScmDate(); + // optional int32 ut_line_hits = 6; /** * optional int32 ut_line_hits = 6; * @@ -101,6 +106,7 @@ public final class FileSourceDb { */ int getUtLineHits(); + // optional int32 ut_conditions = 7; /** * optional int32 ut_conditions = 7; */ @@ -110,6 +116,7 @@ public final class FileSourceDb { */ int getUtConditions(); + // optional int32 ut_covered_conditions = 8; /** * optional int32 ut_covered_conditions = 8; */ @@ -119,6 +126,7 @@ public final class FileSourceDb { */ int getUtCoveredConditions(); + // optional int32 it_line_hits = 9; /** * optional int32 it_line_hits = 9; * @@ -136,6 +144,7 @@ public final class FileSourceDb { */ int getItLineHits(); + // optional int32 it_conditions = 10; /** * optional int32 it_conditions = 10; */ @@ -145,6 +154,7 @@ public final class FileSourceDb { */ int getItConditions(); + // optional int32 it_covered_conditions = 11; /** * optional int32 it_covered_conditions = 11; */ @@ -154,6 +164,7 @@ public final class FileSourceDb { */ int getItCoveredConditions(); + // optional int32 overall_line_hits = 12; /** * optional int32 overall_line_hits = 12; * @@ -171,6 +182,7 @@ public final class FileSourceDb { */ int getOverallLineHits(); + // optional int32 overall_conditions = 13; /** * optional int32 overall_conditions = 13; */ @@ -180,6 +192,7 @@ public final class FileSourceDb { */ int getOverallConditions(); + // optional int32 overall_covered_conditions = 14; /** * optional int32 overall_covered_conditions = 14; */ @@ -189,6 +202,7 @@ public final class FileSourceDb { */ int getOverallCoveredConditions(); + // optional string highlighting = 15; /** * optional string highlighting = 15; */ @@ -203,6 +217,7 @@ public final class FileSourceDb { com.google.protobuf.ByteString getHighlightingBytes(); + // optional string symbols = 16; /** * optional string symbols = 16; */ @@ -217,6 +232,7 @@ public final class FileSourceDb { com.google.protobuf.ByteString getSymbolsBytes(); + // repeated int32 duplication = 17 [packed = true]; /** * repeated int32 duplication = 17 [packed = true]; */ @@ -234,9 +250,8 @@ public final class FileSourceDb { * Protobuf type {@code org.sonar.server.source.db.Line} */ public static final class Line extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:org.sonar.server.source.db.Line) - LineOrBuilder { + com.google.protobuf.GeneratedMessage + implements LineOrBuilder { // Use Line.newBuilder() to construct. private Line(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -288,21 +303,18 @@ public final class FileSourceDb { break; } case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - source_ = bs; + source_ = input.readBytes(); break; } case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000004; - scmRevision_ = bs; + scmRevision_ = input.readBytes(); break; } case 34: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000008; - scmAuthor_ = bs; + scmAuthor_ = input.readBytes(); break; } case 40: { @@ -356,15 +368,13 @@ public final class FileSourceDb { break; } case 122: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00004000; - highlighting_ = bs; + highlighting_ = input.readBytes(); break; } case 130: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00008000; - symbols_ = bs; + symbols_ = input.readBytes(); break; } case 136: { @@ -431,6 +441,7 @@ public final class FileSourceDb { } private int bitField0_; + // optional int32 line = 1; public static final int LINE_FIELD_NUMBER = 1; private int line_; /** @@ -446,6 +457,7 @@ public final class FileSourceDb { return line_; } + // optional string source = 2; public static final int SOURCE_FIELD_NUMBER = 2; private java.lang.Object source_; /** @@ -488,6 +500,7 @@ public final class FileSourceDb { } } + // optional string scm_revision = 3; public static final int SCM_REVISION_FIELD_NUMBER = 3; private java.lang.Object scmRevision_; /** @@ -542,6 +555,7 @@ public final class FileSourceDb { } } + // optional string scm_author = 4; public static final int SCM_AUTHOR_FIELD_NUMBER = 4; private java.lang.Object scmAuthor_; /** @@ -584,6 +598,7 @@ public final class FileSourceDb { } } + // optional int64 scm_date = 5; public static final int SCM_DATE_FIELD_NUMBER = 5; private long scmDate_; /** @@ -599,6 +614,7 @@ public final class FileSourceDb { return scmDate_; } + // optional int32 ut_line_hits = 6; public static final int UT_LINE_HITS_FIELD_NUMBER = 6; private int utLineHits_; /** @@ -622,6 +638,7 @@ public final class FileSourceDb { return utLineHits_; } + // optional int32 ut_conditions = 7; public static final int UT_CONDITIONS_FIELD_NUMBER = 7; private int utConditions_; /** @@ -637,6 +654,7 @@ public final class FileSourceDb { return utConditions_; } + // optional int32 ut_covered_conditions = 8; public static final int UT_COVERED_CONDITIONS_FIELD_NUMBER = 8; private int utCoveredConditions_; /** @@ -652,6 +670,7 @@ public final class FileSourceDb { return utCoveredConditions_; } + // optional int32 it_line_hits = 9; public static final int IT_LINE_HITS_FIELD_NUMBER = 9; private int itLineHits_; /** @@ -675,6 +694,7 @@ public final class FileSourceDb { return itLineHits_; } + // optional int32 it_conditions = 10; public static final int IT_CONDITIONS_FIELD_NUMBER = 10; private int itConditions_; /** @@ -690,6 +710,7 @@ public final class FileSourceDb { return itConditions_; } + // optional int32 it_covered_conditions = 11; public static final int IT_COVERED_CONDITIONS_FIELD_NUMBER = 11; private int itCoveredConditions_; /** @@ -705,6 +726,7 @@ public final class FileSourceDb { return itCoveredConditions_; } + // optional int32 overall_line_hits = 12; public static final int OVERALL_LINE_HITS_FIELD_NUMBER = 12; private int overallLineHits_; /** @@ -728,6 +750,7 @@ public final class FileSourceDb { return overallLineHits_; } + // optional int32 overall_conditions = 13; public static final int OVERALL_CONDITIONS_FIELD_NUMBER = 13; private int overallConditions_; /** @@ -743,6 +766,7 @@ public final class FileSourceDb { return overallConditions_; } + // optional int32 overall_covered_conditions = 14; public static final int OVERALL_COVERED_CONDITIONS_FIELD_NUMBER = 14; private int overallCoveredConditions_; /** @@ -758,6 +782,7 @@ public final class FileSourceDb { return overallCoveredConditions_; } + // optional string highlighting = 15; public static final int HIGHLIGHTING_FIELD_NUMBER = 15; private java.lang.Object highlighting_; /** @@ -800,6 +825,7 @@ public final class FileSourceDb { } } + // optional string symbols = 16; public static final int SYMBOLS_FIELD_NUMBER = 16; private java.lang.Object symbols_; /** @@ -842,6 +868,7 @@ public final class FileSourceDb { } } + // repeated int32 duplication = 17 [packed = true]; public static final int DUPLICATION_FIELD_NUMBER = 17; private java.util.List duplication_; /** @@ -887,8 +914,7 @@ public final class FileSourceDb { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -1121,9 +1147,8 @@ public final class FileSourceDb { * Protobuf type {@code org.sonar.server.source.db.Line} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:org.sonar.server.source.db.Line) - org.sonar.server.source.db.FileSourceDb.LineOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.server.source.db.FileSourceDb.LineOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Line_descriptor; @@ -1398,6 +1423,7 @@ public final class FileSourceDb { } private int bitField0_; + // optional int32 line = 1; private int line_ ; /** * optional int32 line = 1; @@ -1430,6 +1456,7 @@ public final class FileSourceDb { return this; } + // optional string source = 2; private java.lang.Object source_ = ""; /** * optional string source = 2; @@ -1443,12 +1470,9 @@ public final class FileSourceDb { public java.lang.String getSource() { java.lang.Object ref = source_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - source_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + source_ = s; return s; } else { return (java.lang.String) ref; @@ -1506,6 +1530,7 @@ public final class FileSourceDb { return this; } + // optional string scm_revision = 3; private java.lang.Object scmRevision_ = ""; /** * optional string scm_revision = 3; @@ -1527,12 +1552,9 @@ public final class FileSourceDb { public java.lang.String getScmRevision() { java.lang.Object ref = scmRevision_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - scmRevision_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + scmRevision_ = s; return s; } else { return (java.lang.String) ref; @@ -1606,6 +1628,7 @@ public final class FileSourceDb { return this; } + // optional string scm_author = 4; private java.lang.Object scmAuthor_ = ""; /** * optional string scm_author = 4; @@ -1619,12 +1642,9 @@ public final class FileSourceDb { public java.lang.String getScmAuthor() { java.lang.Object ref = scmAuthor_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - scmAuthor_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + scmAuthor_ = s; return s; } else { return (java.lang.String) ref; @@ -1682,6 +1702,7 @@ public final class FileSourceDb { return this; } + // optional int64 scm_date = 5; private long scmDate_ ; /** * optional int64 scm_date = 5; @@ -1714,6 +1735,7 @@ public final class FileSourceDb { return this; } + // optional int32 ut_line_hits = 6; private int utLineHits_ ; /** * optional int32 ut_line_hits = 6; @@ -1762,6 +1784,7 @@ public final class FileSourceDb { return this; } + // optional int32 ut_conditions = 7; private int utConditions_ ; /** * optional int32 ut_conditions = 7; @@ -1794,6 +1817,7 @@ public final class FileSourceDb { return this; } + // optional int32 ut_covered_conditions = 8; private int utCoveredConditions_ ; /** * optional int32 ut_covered_conditions = 8; @@ -1826,6 +1850,7 @@ public final class FileSourceDb { return this; } + // optional int32 it_line_hits = 9; private int itLineHits_ ; /** * optional int32 it_line_hits = 9; @@ -1874,6 +1899,7 @@ public final class FileSourceDb { return this; } + // optional int32 it_conditions = 10; private int itConditions_ ; /** * optional int32 it_conditions = 10; @@ -1906,6 +1932,7 @@ public final class FileSourceDb { return this; } + // optional int32 it_covered_conditions = 11; private int itCoveredConditions_ ; /** * optional int32 it_covered_conditions = 11; @@ -1938,6 +1965,7 @@ public final class FileSourceDb { return this; } + // optional int32 overall_line_hits = 12; private int overallLineHits_ ; /** * optional int32 overall_line_hits = 12; @@ -1986,6 +2014,7 @@ public final class FileSourceDb { return this; } + // optional int32 overall_conditions = 13; private int overallConditions_ ; /** * optional int32 overall_conditions = 13; @@ -2018,6 +2047,7 @@ public final class FileSourceDb { return this; } + // optional int32 overall_covered_conditions = 14; private int overallCoveredConditions_ ; /** * optional int32 overall_covered_conditions = 14; @@ -2050,6 +2080,7 @@ public final class FileSourceDb { return this; } + // optional string highlighting = 15; private java.lang.Object highlighting_ = ""; /** * optional string highlighting = 15; @@ -2063,12 +2094,9 @@ public final class FileSourceDb { public java.lang.String getHighlighting() { java.lang.Object ref = highlighting_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - highlighting_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + highlighting_ = s; return s; } else { return (java.lang.String) ref; @@ -2126,6 +2154,7 @@ public final class FileSourceDb { return this; } + // optional string symbols = 16; private java.lang.Object symbols_ = ""; /** * optional string symbols = 16; @@ -2139,12 +2168,9 @@ public final class FileSourceDb { public java.lang.String getSymbols() { java.lang.Object ref = symbols_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - symbols_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + symbols_ = s; return s; } else { return (java.lang.String) ref; @@ -2202,6 +2228,7 @@ public final class FileSourceDb { return this; } + // repeated int32 duplication = 17 [packed = true]; private java.util.List duplication_ = java.util.Collections.emptyList(); private void ensureDuplicationIsMutable() { if (!((bitField0_ & 0x00010000) == 0x00010000)) { @@ -2253,8 +2280,7 @@ public final class FileSourceDb { public Builder addAllDuplication( java.lang.Iterable values) { ensureDuplicationIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, duplication_); + super.addAll(values, duplication_); onChanged(); return this; } @@ -2279,10 +2305,10 @@ public final class FileSourceDb { // @@protoc_insertion_point(class_scope:org.sonar.server.source.db.Line) } - public interface DataOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.sonar.server.source.db.Data) - com.google.protobuf.MessageOrBuilder { + public interface DataOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // repeated .org.sonar.server.source.db.Line lines = 1; /** * repeated .org.sonar.server.source.db.Line lines = 1; */ @@ -2311,9 +2337,8 @@ public final class FileSourceDb { * Protobuf type {@code org.sonar.server.source.db.Data} */ public static final class Data extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:org.sonar.server.source.db.Data) - DataOrBuilder { + com.google.protobuf.GeneratedMessage + implements DataOrBuilder { // Use Data.newBuilder() to construct. private Data(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -2409,6 +2434,7 @@ public final class FileSourceDb { return PARSER; } + // repeated .org.sonar.server.source.db.Line lines = 1; public static final int LINES_FIELD_NUMBER = 1; private java.util.List lines_; /** @@ -2450,8 +2476,7 @@ public final class FileSourceDb { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -2558,9 +2583,8 @@ public final class FileSourceDb { * Protobuf type {@code org.sonar.server.source.db.Data} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:org.sonar.server.source.db.Data) - org.sonar.server.source.db.FileSourceDb.DataOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.server.source.db.FileSourceDb.DataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Data_descriptor; @@ -2704,6 +2728,7 @@ public final class FileSourceDb { } private int bitField0_; + // repeated .org.sonar.server.source.db.Line lines = 1; private java.util.List lines_ = java.util.Collections.emptyList(); private void ensureLinesIsMutable() { @@ -2845,8 +2870,7 @@ public final class FileSourceDb { java.lang.Iterable values) { if (linesBuilder_ == null) { ensureLinesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, lines_); + super.addAll(values, lines_); onChanged(); } else { linesBuilder_.addAllMessages(values); @@ -2955,12 +2979,12 @@ public final class FileSourceDb { // @@protoc_insertion_point(class_scope:org.sonar.server.source.db.Data) } - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_sonar_server_source_db_Line_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_sonar_server_source_db_Line_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_sonar_server_source_db_Data_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -2989,29 +3013,29 @@ public final class FileSourceDb { " .org.sonar.server.source.db.LineB\002H\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_org_sonar_server_source_db_Line_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_sonar_server_source_db_Line_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_sonar_server_source_db_Line_descriptor, + new java.lang.String[] { "Line", "Source", "ScmRevision", "ScmAuthor", "ScmDate", "UtLineHits", "UtConditions", "UtCoveredConditions", "ItLineHits", "ItConditions", "ItCoveredConditions", "OverallLineHits", "OverallConditions", "OverallCoveredConditions", "Highlighting", "Symbols", "Duplication", }); + internal_static_org_sonar_server_source_db_Data_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_org_sonar_server_source_db_Data_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_sonar_server_source_db_Data_descriptor, + new java.lang.String[] { "Lines", }); + return null; + } + }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); - internal_static_org_sonar_server_source_db_Line_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_sonar_server_source_db_Line_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_sonar_server_source_db_Line_descriptor, - new java.lang.String[] { "Line", "Source", "ScmRevision", "ScmAuthor", "ScmDate", "UtLineHits", "UtConditions", "UtCoveredConditions", "ItLineHits", "ItConditions", "ItCoveredConditions", "OverallLineHits", "OverallConditions", "OverallCoveredConditions", "Highlighting", "Symbols", "Duplication", }); - internal_static_org_sonar_server_source_db_Data_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_org_sonar_server_source_db_Data_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_sonar_server_source_db_Data_descriptor, - new java.lang.String[] { "Lines", }); } // @@protoc_insertion_point(outer_class_scope) diff --git a/sonar-batch-protocol/src/main/gen-java/org/sonar/server/source/db/FileSourceTestDb.java b/sonar-batch-protocol/src/main/gen-java/org/sonar/server/source/db/FileSourceTestDb.java index 47c041fb8c4..e03062ece80 100644 --- a/sonar-batch-protocol/src/main/gen-java/org/sonar/server/source/db/FileSourceTestDb.java +++ b/sonar-batch-protocol/src/main/gen-java/org/sonar/server/source/db/FileSourceTestDb.java @@ -8,10 +8,10 @@ public final class FileSourceTestDb { public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } - public interface TestOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.sonar.server.source.db.Test) - com.google.protobuf.MessageOrBuilder { + public interface TestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional string uuid = 1; /** * optional string uuid = 1; */ @@ -26,6 +26,7 @@ public final class FileSourceTestDb { com.google.protobuf.ByteString getUuidBytes(); + // optional string key = 2; /** * optional string key = 2; */ @@ -40,6 +41,7 @@ public final class FileSourceTestDb { com.google.protobuf.ByteString getKeyBytes(); + // optional string method_name = 3; /** * optional string method_name = 3; */ @@ -54,6 +56,7 @@ public final class FileSourceTestDb { com.google.protobuf.ByteString getMethodNameBytes(); + // optional string status = 4; /** * optional string status = 4; */ @@ -68,6 +71,7 @@ public final class FileSourceTestDb { com.google.protobuf.ByteString getStatusBytes(); + // optional string test_message = 5; /** * optional string test_message = 5; */ @@ -82,6 +86,7 @@ public final class FileSourceTestDb { com.google.protobuf.ByteString getTestMessageBytes(); + // optional string type = 6; /** * optional string type = 6; */ @@ -96,6 +101,7 @@ public final class FileSourceTestDb { com.google.protobuf.ByteString getTypeBytes(); + // repeated .org.sonar.server.source.db.Test.CoverageBlock coverage_block = 7; /** * repeated .org.sonar.server.source.db.Test.CoverageBlock coverage_block = 7; */ @@ -124,9 +130,8 @@ public final class FileSourceTestDb { * Protobuf type {@code org.sonar.server.source.db.Test} */ public static final class Test extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:org.sonar.server.source.db.Test) - TestOrBuilder { + com.google.protobuf.GeneratedMessage + implements TestOrBuilder { // Use Test.newBuilder() to construct. private Test(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -173,39 +178,33 @@ public final class FileSourceTestDb { break; } case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; - uuid_ = bs; + uuid_ = input.readBytes(); break; } case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - key_ = bs; + key_ = input.readBytes(); break; } case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000004; - methodName_ = bs; + methodName_ = input.readBytes(); break; } case 34: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000008; - status_ = bs; + status_ = input.readBytes(); break; } case 42: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000010; - testMessage_ = bs; + testMessage_ = input.readBytes(); break; } case 50: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000020; - type_ = bs; + type_ = input.readBytes(); break; } case 58: { @@ -258,10 +257,10 @@ public final class FileSourceTestDb { return PARSER; } - public interface CoverageBlockOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.sonar.server.source.db.Test.CoverageBlock) - com.google.protobuf.MessageOrBuilder { + public interface CoverageBlockOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // optional string uuid = 1; /** * optional string uuid = 1; */ @@ -276,6 +275,7 @@ public final class FileSourceTestDb { com.google.protobuf.ByteString getUuidBytes(); + // optional string key = 2; /** * optional string key = 2; * @@ -302,6 +302,7 @@ public final class FileSourceTestDb { com.google.protobuf.ByteString getKeyBytes(); + // optional string long_name = 3; /** * optional string long_name = 3; */ @@ -316,6 +317,7 @@ public final class FileSourceTestDb { com.google.protobuf.ByteString getLongNameBytes(); + // repeated int32 lines = 4; /** * repeated int32 lines = 4; */ @@ -329,6 +331,7 @@ public final class FileSourceTestDb { */ int getLines(int index); + // optional int32 nb_covered_lines = 5; /** * optional int32 nb_covered_lines = 5; */ @@ -342,9 +345,8 @@ public final class FileSourceTestDb { * Protobuf type {@code org.sonar.server.source.db.Test.CoverageBlock} */ public static final class CoverageBlock extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:org.sonar.server.source.db.Test.CoverageBlock) - CoverageBlockOrBuilder { + com.google.protobuf.GeneratedMessage + implements CoverageBlockOrBuilder { // Use CoverageBlock.newBuilder() to construct. private CoverageBlock(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -391,21 +393,18 @@ public final class FileSourceTestDb { break; } case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; - uuid_ = bs; + uuid_ = input.readBytes(); break; } case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - key_ = bs; + key_ = input.readBytes(); break; } case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000004; - longName_ = bs; + longName_ = input.readBytes(); break; } case 32: { @@ -477,6 +476,7 @@ public final class FileSourceTestDb { } private int bitField0_; + // optional string uuid = 1; public static final int UUID_FIELD_NUMBER = 1; private java.lang.Object uuid_; /** @@ -519,6 +519,7 @@ public final class FileSourceTestDb { } } + // optional string key = 2; public static final int KEY_FIELD_NUMBER = 2; private java.lang.Object key_; /** @@ -573,6 +574,7 @@ public final class FileSourceTestDb { } } + // optional string long_name = 3; public static final int LONG_NAME_FIELD_NUMBER = 3; private java.lang.Object longName_; /** @@ -615,6 +617,7 @@ public final class FileSourceTestDb { } } + // repeated int32 lines = 4; public static final int LINES_FIELD_NUMBER = 4; private java.util.List lines_; /** @@ -637,6 +640,7 @@ public final class FileSourceTestDb { return lines_.get(index); } + // optional int32 nb_covered_lines = 5; public static final int NB_COVERED_LINES_FIELD_NUMBER = 5; private int nbCoveredLines_; /** @@ -662,8 +666,7 @@ public final class FileSourceTestDb { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -803,9 +806,8 @@ public final class FileSourceTestDb { * Protobuf type {@code org.sonar.server.source.db.Test.CoverageBlock} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:org.sonar.server.source.db.Test.CoverageBlock) - org.sonar.server.source.db.FileSourceTestDb.Test.CoverageBlockOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.server.source.db.FileSourceTestDb.Test.CoverageBlockOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.server.source.db.FileSourceTestDb.internal_static_org_sonar_server_source_db_Test_CoverageBlock_descriptor; @@ -968,6 +970,7 @@ public final class FileSourceTestDb { } private int bitField0_; + // optional string uuid = 1; private java.lang.Object uuid_ = ""; /** * optional string uuid = 1; @@ -981,12 +984,9 @@ public final class FileSourceTestDb { public java.lang.String getUuid() { java.lang.Object ref = uuid_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - uuid_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + uuid_ = s; return s; } else { return (java.lang.String) ref; @@ -1044,6 +1044,7 @@ public final class FileSourceTestDb { return this; } + // optional string key = 2; private java.lang.Object key_ = ""; /** * optional string key = 2; @@ -1065,12 +1066,9 @@ public final class FileSourceTestDb { public java.lang.String getKey() { java.lang.Object ref = key_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - key_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + key_ = s; return s; } else { return (java.lang.String) ref; @@ -1144,6 +1142,7 @@ public final class FileSourceTestDb { return this; } + // optional string long_name = 3; private java.lang.Object longName_ = ""; /** * optional string long_name = 3; @@ -1157,12 +1156,9 @@ public final class FileSourceTestDb { public java.lang.String getLongName() { java.lang.Object ref = longName_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - longName_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + longName_ = s; return s; } else { return (java.lang.String) ref; @@ -1220,6 +1216,7 @@ public final class FileSourceTestDb { return this; } + // repeated int32 lines = 4; private java.util.List lines_ = java.util.Collections.emptyList(); private void ensureLinesIsMutable() { if (!((bitField0_ & 0x00000008) == 0x00000008)) { @@ -1271,8 +1268,7 @@ public final class FileSourceTestDb { public Builder addAllLines( java.lang.Iterable values) { ensureLinesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, lines_); + super.addAll(values, lines_); onChanged(); return this; } @@ -1286,6 +1282,7 @@ public final class FileSourceTestDb { return this; } + // optional int32 nb_covered_lines = 5; private int nbCoveredLines_ ; /** * optional int32 nb_covered_lines = 5; @@ -1330,6 +1327,7 @@ public final class FileSourceTestDb { } private int bitField0_; + // optional string uuid = 1; public static final int UUID_FIELD_NUMBER = 1; private java.lang.Object uuid_; /** @@ -1372,6 +1370,7 @@ public final class FileSourceTestDb { } } + // optional string key = 2; public static final int KEY_FIELD_NUMBER = 2; private java.lang.Object key_; /** @@ -1414,6 +1413,7 @@ public final class FileSourceTestDb { } } + // optional string method_name = 3; public static final int METHOD_NAME_FIELD_NUMBER = 3; private java.lang.Object methodName_; /** @@ -1456,6 +1456,7 @@ public final class FileSourceTestDb { } } + // optional string status = 4; public static final int STATUS_FIELD_NUMBER = 4; private java.lang.Object status_; /** @@ -1498,6 +1499,7 @@ public final class FileSourceTestDb { } } + // optional string test_message = 5; public static final int TEST_MESSAGE_FIELD_NUMBER = 5; private java.lang.Object testMessage_; /** @@ -1540,6 +1542,7 @@ public final class FileSourceTestDb { } } + // optional string type = 6; public static final int TYPE_FIELD_NUMBER = 6; private java.lang.Object type_; /** @@ -1582,6 +1585,7 @@ public final class FileSourceTestDb { } } + // repeated .org.sonar.server.source.db.Test.CoverageBlock coverage_block = 7; public static final int COVERAGE_BLOCK_FIELD_NUMBER = 7; private java.util.List coverageBlock_; /** @@ -1629,8 +1633,7 @@ public final class FileSourceTestDb { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -1779,9 +1782,8 @@ public final class FileSourceTestDb { * Protobuf type {@code org.sonar.server.source.db.Test} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:org.sonar.server.source.db.Test) - org.sonar.server.source.db.FileSourceTestDb.TestOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.server.source.db.FileSourceTestDb.TestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.server.source.db.FileSourceTestDb.internal_static_org_sonar_server_source_db_Test_descriptor; @@ -1993,6 +1995,7 @@ public final class FileSourceTestDb { } private int bitField0_; + // optional string uuid = 1; private java.lang.Object uuid_ = ""; /** * optional string uuid = 1; @@ -2006,12 +2009,9 @@ public final class FileSourceTestDb { public java.lang.String getUuid() { java.lang.Object ref = uuid_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - uuid_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + uuid_ = s; return s; } else { return (java.lang.String) ref; @@ -2069,6 +2069,7 @@ public final class FileSourceTestDb { return this; } + // optional string key = 2; private java.lang.Object key_ = ""; /** * optional string key = 2; @@ -2082,12 +2083,9 @@ public final class FileSourceTestDb { public java.lang.String getKey() { java.lang.Object ref = key_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - key_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + key_ = s; return s; } else { return (java.lang.String) ref; @@ -2145,6 +2143,7 @@ public final class FileSourceTestDb { return this; } + // optional string method_name = 3; private java.lang.Object methodName_ = ""; /** * optional string method_name = 3; @@ -2158,12 +2157,9 @@ public final class FileSourceTestDb { public java.lang.String getMethodName() { java.lang.Object ref = methodName_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - methodName_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + methodName_ = s; return s; } else { return (java.lang.String) ref; @@ -2221,6 +2217,7 @@ public final class FileSourceTestDb { return this; } + // optional string status = 4; private java.lang.Object status_ = ""; /** * optional string status = 4; @@ -2234,12 +2231,9 @@ public final class FileSourceTestDb { public java.lang.String getStatus() { java.lang.Object ref = status_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - status_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + status_ = s; return s; } else { return (java.lang.String) ref; @@ -2297,6 +2291,7 @@ public final class FileSourceTestDb { return this; } + // optional string test_message = 5; private java.lang.Object testMessage_ = ""; /** * optional string test_message = 5; @@ -2310,12 +2305,9 @@ public final class FileSourceTestDb { public java.lang.String getTestMessage() { java.lang.Object ref = testMessage_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - testMessage_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + testMessage_ = s; return s; } else { return (java.lang.String) ref; @@ -2373,6 +2365,7 @@ public final class FileSourceTestDb { return this; } + // optional string type = 6; private java.lang.Object type_ = ""; /** * optional string type = 6; @@ -2386,12 +2379,9 @@ public final class FileSourceTestDb { public java.lang.String getType() { java.lang.Object ref = type_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - type_ = s; - } + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + type_ = s; return s; } else { return (java.lang.String) ref; @@ -2449,6 +2439,7 @@ public final class FileSourceTestDb { return this; } + // repeated .org.sonar.server.source.db.Test.CoverageBlock coverage_block = 7; private java.util.List coverageBlock_ = java.util.Collections.emptyList(); private void ensureCoverageBlockIsMutable() { @@ -2590,8 +2581,7 @@ public final class FileSourceTestDb { java.lang.Iterable values) { if (coverageBlockBuilder_ == null) { ensureCoverageBlockIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, coverageBlock_); + super.addAll(values, coverageBlock_); onChanged(); } else { coverageBlockBuilder_.addAllMessages(values); @@ -2700,10 +2690,10 @@ public final class FileSourceTestDb { // @@protoc_insertion_point(class_scope:org.sonar.server.source.db.Test) } - public interface TestsOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.sonar.server.source.db.Tests) - com.google.protobuf.MessageOrBuilder { + public interface TestsOrBuilder + extends com.google.protobuf.MessageOrBuilder { + // repeated .org.sonar.server.source.db.Test test = 1; /** * repeated .org.sonar.server.source.db.Test test = 1; */ @@ -2732,9 +2722,8 @@ public final class FileSourceTestDb { * Protobuf type {@code org.sonar.server.source.db.Tests} */ public static final class Tests extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:org.sonar.server.source.db.Tests) - TestsOrBuilder { + com.google.protobuf.GeneratedMessage + implements TestsOrBuilder { // Use Tests.newBuilder() to construct. private Tests(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); @@ -2830,6 +2819,7 @@ public final class FileSourceTestDb { return PARSER; } + // repeated .org.sonar.server.source.db.Test test = 1; public static final int TEST_FIELD_NUMBER = 1; private java.util.List test_; /** @@ -2871,8 +2861,7 @@ public final class FileSourceTestDb { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; @@ -2979,9 +2968,8 @@ public final class FileSourceTestDb { * Protobuf type {@code org.sonar.server.source.db.Tests} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:org.sonar.server.source.db.Tests) - org.sonar.server.source.db.FileSourceTestDb.TestsOrBuilder { + com.google.protobuf.GeneratedMessage.Builder + implements org.sonar.server.source.db.FileSourceTestDb.TestsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.sonar.server.source.db.FileSourceTestDb.internal_static_org_sonar_server_source_db_Tests_descriptor; @@ -3125,6 +3113,7 @@ public final class FileSourceTestDb { } private int bitField0_; + // repeated .org.sonar.server.source.db.Test test = 1; private java.util.List test_ = java.util.Collections.emptyList(); private void ensureTestIsMutable() { @@ -3266,8 +3255,7 @@ public final class FileSourceTestDb { java.lang.Iterable values) { if (testBuilder_ == null) { ensureTestIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, test_); + super.addAll(values, test_); onChanged(); } else { testBuilder_.addAllMessages(values); @@ -3376,17 +3364,17 @@ public final class FileSourceTestDb { // @@protoc_insertion_point(class_scope:org.sonar.server.source.db.Tests) } - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_sonar_server_source_db_Test_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_sonar_server_source_db_Test_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_sonar_server_source_db_Test_CoverageBlock_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_sonar_server_source_db_Test_CoverageBlock_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_sonar_server_source_db_Tests_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -3413,35 +3401,35 @@ public final class FileSourceTestDb { "\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_org_sonar_server_source_db_Test_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_sonar_server_source_db_Test_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_sonar_server_source_db_Test_descriptor, + new java.lang.String[] { "Uuid", "Key", "MethodName", "Status", "TestMessage", "Type", "CoverageBlock", }); + internal_static_org_sonar_server_source_db_Test_CoverageBlock_descriptor = + internal_static_org_sonar_server_source_db_Test_descriptor.getNestedTypes().get(0); + internal_static_org_sonar_server_source_db_Test_CoverageBlock_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_sonar_server_source_db_Test_CoverageBlock_descriptor, + new java.lang.String[] { "Uuid", "Key", "LongName", "Lines", "NbCoveredLines", }); + internal_static_org_sonar_server_source_db_Tests_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_org_sonar_server_source_db_Tests_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_sonar_server_source_db_Tests_descriptor, + new java.lang.String[] { "Test", }); + return null; + } + }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); - internal_static_org_sonar_server_source_db_Test_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_sonar_server_source_db_Test_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_sonar_server_source_db_Test_descriptor, - new java.lang.String[] { "Uuid", "Key", "MethodName", "Status", "TestMessage", "Type", "CoverageBlock", }); - internal_static_org_sonar_server_source_db_Test_CoverageBlock_descriptor = - internal_static_org_sonar_server_source_db_Test_descriptor.getNestedTypes().get(0); - internal_static_org_sonar_server_source_db_Test_CoverageBlock_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_sonar_server_source_db_Test_CoverageBlock_descriptor, - new java.lang.String[] { "Uuid", "Key", "LongName", "Lines", "NbCoveredLines", }); - internal_static_org_sonar_server_source_db_Tests_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_org_sonar_server_source_db_Tests_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_sonar_server_source_db_Tests_descriptor, - new java.lang.String[] { "Test", }); } // @@protoc_insertion_point(outer_class_scope) diff --git a/sonar-batch-protocol/src/main/protobuf/batch_report.proto b/sonar-batch-protocol/src/main/protobuf/batch_report.proto index 9a955eb1323..634286f7dd0 100644 --- a/sonar-batch-protocol/src/main/protobuf/batch_report.proto +++ b/sonar-batch-protocol/src/main/protobuf/batch_report.proto @@ -234,11 +234,10 @@ message SyntaxHighlighting { message Test { optional string name = 1; - optional TestType type = 2; - optional TestStatus status = 3; - optional int64 duration_in_ms = 4; - optional string stacktrace = 5; - optional string msg = 6; + optional TestStatus status = 2; + optional int64 duration_in_ms = 3; + optional string stacktrace = 4; + optional string msg = 5; } message CoverageDetail { diff --git a/sonar-batch-protocol/src/main/protobuf/constants.proto b/sonar-batch-protocol/src/main/protobuf/constants.proto index 26eee4a1cd9..de6317e1290 100644 --- a/sonar-batch-protocol/src/main/protobuf/constants.proto +++ b/sonar-batch-protocol/src/main/protobuf/constants.proto @@ -73,11 +73,6 @@ enum HighlightingType { PREPROCESS_DIRECTIVE = 8; } -enum TestType { - UT = 1; - IT = 2; -} - enum TestStatus { OK = 1; FAILURE = 2; diff --git a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/BatchReportReaderTest.java b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/BatchReportReaderTest.java index dd36ebc8482..223e997950e 100644 --- a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/BatchReportReaderTest.java +++ b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/BatchReportReaderTest.java @@ -201,7 +201,7 @@ public class BatchReportReaderTest { .build()) .setType(Constants.HighlightingType.ANNOTATION) .build() - )); + )); try (InputStream inputStream = FileUtils.openInputStream(sut.readComponentSyntaxHighlighting(1))) { BatchReport.SyntaxHighlighting syntaxHighlighting = BatchReport.SyntaxHighlighting.PARSER.parseDelimitedFrom(inputStream); @@ -328,7 +328,6 @@ public class BatchReportReaderTest { .setStacktrace("stacktrace") .setMsg("message") .setStatus(Constants.TestStatus.OK) - .setType(Constants.TestType.IT) .build())); try (InputStream inputStream = FileUtils.openInputStream(sut.readTests(1))) { @@ -336,7 +335,6 @@ public class BatchReportReaderTest { assertThat(testResult.getDurationInMs()).isEqualTo(60_000); assertThat(testResult.getStacktrace()).isEqualTo("stacktrace"); assertThat(testResult.getMsg()).isEqualTo("message"); - assertThat(testResult.getType()).isEqualTo(Constants.TestType.IT); assertThat(testResult.getStatus()).isEqualTo(Constants.TestStatus.OK); } } @@ -353,11 +351,11 @@ public class BatchReportReaderTest { BatchReport.CoverageDetail.newBuilder() .setTestName("test-name") .addCoveredFile(BatchReport.CoverageDetail.CoveredFile.newBuilder() - .addAllCoveredLine(Arrays.asList(1, 2, 3, 5, 7)) - .setFileRef(2) + .addAllCoveredLine(Arrays.asList(1, 2, 3, 5, 7)) + .setFileRef(2) ) .build() - )); + )); try (InputStream inputStream = FileUtils.openInputStream(sut.readCoverageDetails(1))) { BatchReport.CoverageDetail coverageDetail = BatchReport.CoverageDetail.PARSER.parseDelimitedFrom(inputStream); @@ -380,7 +378,7 @@ public class BatchReportReaderTest { .setToFileRef(5) .setWeight(20) .build() - )); + )); try (InputStream inputStream = FileUtils.openInputStream(sut.readFileDependencies(1))) { BatchReport.FileDependency fileDependency = BatchReport.FileDependency.PARSER.parseDelimitedFrom(inputStream); diff --git a/sonar-batch/src/main/java/org/sonar/batch/deprecated/perspectives/BatchPerspectives.java b/sonar-batch/src/main/java/org/sonar/batch/deprecated/perspectives/BatchPerspectives.java index d743cca7301..445508ab0f5 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/deprecated/perspectives/BatchPerspectives.java +++ b/sonar-batch/src/main/java/org/sonar/batch/deprecated/perspectives/BatchPerspectives.java @@ -19,10 +19,6 @@ */ package org.sonar.batch.deprecated.perspectives; -import org.sonar.core.component.PerspectiveBuilder; -import org.sonar.core.component.PerspectiveNotFoundException; -import org.sonar.core.component.ResourceComponent; - import com.google.common.collect.Maps; import org.sonar.api.batch.SonarIndex; import org.sonar.api.batch.fs.InputDir; @@ -34,6 +30,9 @@ import org.sonar.api.component.ResourcePerspectives; import org.sonar.api.resources.Directory; import org.sonar.api.resources.File; import org.sonar.api.resources.Resource; +import org.sonar.core.component.PerspectiveBuilder; +import org.sonar.core.component.PerspectiveNotFoundException; +import org.sonar.core.component.ResourceComponent; import javax.annotation.CheckForNull; diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/ResourceCache.java b/sonar-batch/src/main/java/org/sonar/batch/index/ResourceCache.java index db5c29edeb4..12ca8d6be65 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/ResourceCache.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/ResourceCache.java @@ -19,6 +19,7 @@ */ package org.sonar.batch.index; +import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; import com.google.common.base.Strings; import com.google.common.collect.Maps; @@ -27,6 +28,8 @@ import org.sonar.api.batch.fs.InputFile; import org.sonar.api.batch.fs.internal.DefaultInputFile; import org.sonar.api.resources.Library; import org.sonar.api.resources.Resource; +import org.sonar.api.resources.ResourceUtils; +import org.sonar.core.component.ScanGraph; import javax.annotation.CheckForNull; import javax.annotation.Nullable; @@ -41,6 +44,16 @@ public class ResourceCache implements BatchComponent { private final Map libraries = Maps.newLinkedHashMap(); private BatchResource root; + private final ScanGraph scanGraph; + + public ResourceCache(ScanGraph scanGraph) { + this.scanGraph = scanGraph; + } + + @VisibleForTesting + public ResourceCache() { + this.scanGraph = null; + } @CheckForNull public BatchResource get(String componentKey) { @@ -73,6 +86,9 @@ public class ResourceCache implements BatchComponent { } else { libraries.put((Library) resource, batchResource); } + if (scanGraph != null && ResourceUtils.isPersistable(batchResource.resource())) { + scanGraph.addComponent(batchResource.resource()); + } return batchResource; } 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 3566bb0edcd..1520a672cc5 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 @@ -54,15 +54,15 @@ public class ResourcePersister implements ScanPersister { private final DatabaseSession session; private final ResourcePermissions permissions; private final ResourceCache resourceCache; - private final ScanGraph graph; private final ProjectTree projectTree; + private final ScanGraph scanGraph; - public ResourcePersister(ProjectTree projectTree, DatabaseSession session, ResourcePermissions permissions, ResourceCache resourceCache, ScanGraph graph) { + public ResourcePersister(ProjectTree projectTree, DatabaseSession session, ResourcePermissions permissions, ResourceCache resourceCache, ScanGraph scanGraph) { this.projectTree = projectTree; this.session = session; this.permissions = permissions; this.resourceCache = resourceCache; - this.graph = graph; + this.scanGraph = scanGraph; } @Override @@ -101,7 +101,7 @@ public class ResourcePersister implements ScanPersister { } batchResource.setSnapshot(s); if (ResourceUtils.isPersistable(batchResource.resource())) { - graph.addComponent(batchResource.resource(), batchResource.snapshotId()); + scanGraph.completeComponent(batchResource.key(), batchResource.resource().getId(), s.getId()); } } diff --git a/sonar-batch/src/main/java/org/sonar/batch/mediumtest/TaskResult.java b/sonar-batch/src/main/java/org/sonar/batch/mediumtest/TaskResult.java index f2f7b379759..43cb60c251a 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/mediumtest/TaskResult.java +++ b/sonar-batch/src/main/java/org/sonar/batch/mediumtest/TaskResult.java @@ -264,6 +264,38 @@ public class TaskResult implements org.sonar.batch.mediumtest.ScanTaskObserver { return null; } + public BatchReport.Test testExecutionFor(InputFile testFile, String testName) { + int ref = reportComponents.get(((DefaultInputFile) testFile).key()).getRef(); + try (InputStream inputStream = FileUtils.openInputStream(getReportReader().readTests(ref))) { + BatchReport.Test test = BatchReport.Test.PARSER.parseDelimitedFrom(inputStream); + while (test != null) { + if (test.getName().equals(testName)) { + return test; + } + test = BatchReport.Test.PARSER.parseDelimitedFrom(inputStream); + } + } catch (Exception e) { + throw new IllegalStateException(e); + } + return null; + } + + public BatchReport.CoverageDetail coveragePerTestFor(InputFile testFile, String testName) { + int ref = reportComponents.get(((DefaultInputFile) testFile).key()).getRef(); + try (InputStream inputStream = FileUtils.openInputStream(getReportReader().readCoverageDetails(ref))) { + BatchReport.CoverageDetail details = BatchReport.CoverageDetail.PARSER.parseDelimitedFrom(inputStream); + while (details != null) { + if (details.getTestName().equals(testName)) { + return details; + } + details = BatchReport.CoverageDetail.PARSER.parseDelimitedFrom(inputStream); + } + } catch (Exception e) { + throw new IllegalStateException(e); + } + return null; + } + /** * @return null if no dependency else return dependency weight. */ diff --git a/sonar-batch/src/main/java/org/sonar/batch/report/TestExecutionAndCoveragePublisher.java b/sonar-batch/src/main/java/org/sonar/batch/report/TestExecutionAndCoveragePublisher.java new file mode 100644 index 00000000000..53c86c345a4 --- /dev/null +++ b/sonar-batch/src/main/java/org/sonar/batch/report/TestExecutionAndCoveragePublisher.java @@ -0,0 +1,133 @@ +/* + * 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.batch.report; + +import com.google.common.base.Function; +import com.google.common.collect.Iterables; +import org.sonar.api.batch.fs.InputFile.Type; +import org.sonar.api.batch.fs.internal.DefaultInputFile; +import org.sonar.api.test.CoverageBlock; +import org.sonar.api.test.MutableTestCase; +import org.sonar.api.test.MutableTestPlan; +import org.sonar.api.test.TestCase; +import org.sonar.batch.index.BatchResource; +import org.sonar.batch.index.ResourceCache; +import org.sonar.batch.protocol.Constants.TestStatus; +import org.sonar.batch.protocol.output.BatchReport; +import org.sonar.batch.protocol.output.BatchReport.CoverageDetail; +import org.sonar.batch.protocol.output.BatchReport.Test; +import org.sonar.batch.protocol.output.BatchReportWriter; +import org.sonar.core.test.TestPlanBuilder; + +import java.util.HashSet; +import java.util.Set; + +public class TestExecutionAndCoveragePublisher implements ReportPublisherStep { + + private final class FunctionImplementation implements Function { + private final MutableTestPlan testPlan; + private BatchReport.CoverageDetail.Builder builder = BatchReport.CoverageDetail.newBuilder(); + private BatchReport.CoverageDetail.CoveredFile.Builder coveredBuilder = BatchReport.CoverageDetail.CoveredFile.newBuilder(); + + private FunctionImplementation(MutableTestPlan testPlan) { + this.testPlan = testPlan; + } + + @Override + public CoverageDetail apply(String testName) { + // Take first test with provided name + MutableTestCase testCase = testPlan.testCasesByName(testName).iterator().next(); + builder.clear(); + builder.setTestName(testName); + for (CoverageBlock block : testCase.coverageBlocks()) { + coveredBuilder.clear(); + coveredBuilder.setFileRef(resourceCache.get(block.testable().component().key()).batchId()); + for (int line : block.lines()) { + coveredBuilder.addCoveredLine(line); + } + builder.addCoveredFile(coveredBuilder.build()); + } + return builder.build(); + } + } + + private final ResourceCache resourceCache; + private final TestPlanBuilder testPlanBuilder; + + public TestExecutionAndCoveragePublisher(ResourceCache resourceCache, TestPlanBuilder testPlanBuilder) { + this.resourceCache = resourceCache; + this.testPlanBuilder = testPlanBuilder; + } + + @Override + public void publish(BatchReportWriter writer) { + for (final BatchResource resource : resourceCache.all()) { + if (!resource.isFile()) { + continue; + } + + DefaultInputFile inputFile = (DefaultInputFile) resource.inputPath(); + if (inputFile.type() != Type.TEST) { + continue; + } + + final MutableTestPlan testPlan = testPlanBuilder.get(MutableTestPlan.class, inputFile.key()); + if (testPlan == null || Iterables.isEmpty(testPlan.testCases())) { + continue; + } + + final Set testNamesWithCoverage = new HashSet<>(); + + writer.writeTests(resource.batchId(), Iterables.transform(testPlan.testCases(), new Function() { + + private BatchReport.Test.Builder builder = BatchReport.Test.newBuilder(); + + @Override + public Test apply(MutableTestCase testCase) { + builder.clear(); + builder.setName(testCase.name()); + if (testCase.doesCover()) { + testNamesWithCoverage.add(testCase.name()); + } + Long durationInMs = testCase.durationInMs(); + if (durationInMs != null) { + builder.setDurationInMs(durationInMs); + } + String msg = testCase.message(); + if (msg != null) { + builder.setMsg(msg); + } + String stack = testCase.stackTrace(); + if (stack != null) { + builder.setStacktrace(stack); + } + TestCase.Status status = testCase.status(); + if (status != null) { + builder.setStatus(TestStatus.valueOf(status.name())); + } + return builder.build(); + } + + })); + + writer.writeCoverageDetails(resource.batchId(), Iterables.transform(testNamesWithCoverage, new FunctionImplementation(testPlan))); + } + } +} diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectScanContainer.java b/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectScanContainer.java index e510aae33a6..8e074792365 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectScanContainer.java +++ b/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectScanContainer.java @@ -188,6 +188,7 @@ public class ProjectScanContainer extends ComponentContainer { DuplicationsPublisher.class, CoveragePublisher.class, SourcePublisher.class, + TestExecutionAndCoveragePublisher.class, ScanTaskObservers.class); } diff --git a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/coverage/CoverageMediumTest.java b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/coverage/CoverageMediumTest.java new file mode 100644 index 00000000000..b3e786841a0 --- /dev/null +++ b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/coverage/CoverageMediumTest.java @@ -0,0 +1,114 @@ +/* + * 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.batch.mediumtest.coverage; + +import com.google.common.collect.ImmutableMap; +import org.apache.commons.io.FileUtils; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; +import org.sonar.api.batch.fs.InputFile; +import org.sonar.api.batch.fs.internal.DefaultInputFile; +import org.sonar.api.batch.sensor.measure.internal.DefaultMeasure; +import org.sonar.api.measures.CoreMetrics; +import org.sonar.batch.mediumtest.BatchMediumTester; +import org.sonar.batch.mediumtest.TaskResult; +import org.sonar.xoo.XooPlugin; + +import java.io.File; +import java.io.IOException; + +import static org.assertj.core.api.Assertions.assertThat; + +public class CoverageMediumTest { + + @org.junit.Rule + public TemporaryFolder temp = new TemporaryFolder(); + + public BatchMediumTester tester = BatchMediumTester.builder() + .registerPlugin("xoo", new XooPlugin()) + .addDefaultQProfile("xoo", "Sonar Way") + .build(); + + @Before + public void prepare() { + tester.start(); + } + + @After + public void stop() { + tester.stop(); + } + + @Test + public void unitTests() throws IOException { + + File baseDir = temp.newFolder(); + File srcDir = new File(baseDir, "src"); + srcDir.mkdir(); + + File xooFile = new File(srcDir, "sample.xoo"); + File xooUtCoverageFile = new File(srcDir, "sample.xoo.coverage"); + FileUtils.write(xooFile, "function foo() {\n if (a && b) {\nalert('hello');\n}\n}"); + FileUtils.write(xooUtCoverageFile, "2:2:2:1\n3:1"); + + TaskResult result = tester.newTask() + .properties(ImmutableMap.builder() + .put("sonar.task", "scan") + .put("sonar.projectBaseDir", baseDir.getAbsolutePath()) + .put("sonar.projectKey", "com.foo.project") + .put("sonar.projectName", "Foo Project") + .put("sonar.projectVersion", "1.0-SNAPSHOT") + .put("sonar.projectDescription", "Description of Foo Project") + .put("sonar.sources", "src") + .build()) + .start(); + + InputFile file = result.inputFile("src/sample.xoo"); + assertThat(result.coverageFor(file, 2).getUtHits()).isTrue(); + assertThat(result.coverageFor(file, 2).getItHits()).isFalse(); + assertThat(result.coverageFor(file, 2).getConditions()).isEqualTo(2); + assertThat(result.coverageFor(file, 2).getUtCoveredConditions()).isEqualTo(1); + assertThat(result.coverageFor(file, 2).getItCoveredConditions()).isEqualTo(0); + assertThat(result.coverageFor(file, 2).getOverallCoveredConditions()).isEqualTo(0); + + assertThat(result.measures()).contains(new DefaultMeasure() + .forMetric(CoreMetrics.LINES_TO_COVER) + .onFile(new DefaultInputFile("com.foo.project", "src/sample.xoo")) + .withValue(2)); + + assertThat(result.measures()).contains(new DefaultMeasure() + .forMetric(CoreMetrics.UNCOVERED_LINES) + .onFile(new DefaultInputFile("com.foo.project", "src/sample.xoo")) + .withValue(0)); + + assertThat(result.measures()).contains(new DefaultMeasure() + .forMetric(CoreMetrics.CONDITIONS_TO_COVER) + .onFile(new DefaultInputFile("com.foo.project", "src/sample.xoo")) + .withValue(2)); + + assertThat(result.measures()).contains(new DefaultMeasure() + .forMetric(CoreMetrics.COVERED_CONDITIONS_BY_LINE) + .onFile(new DefaultInputFile("com.foo.project", "src/sample.xoo")) + .withValue("2=1")); + } + +} diff --git a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/coverage/CoverageTest.java b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/coverage/CoverageTest.java deleted file mode 100644 index 6a10da86b37..00000000000 --- a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/coverage/CoverageTest.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.batch.mediumtest.coverage; - -import com.google.common.collect.ImmutableMap; -import org.apache.commons.io.FileUtils; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; -import org.sonar.api.batch.fs.InputFile; -import org.sonar.api.batch.fs.internal.DefaultInputFile; -import org.sonar.api.batch.sensor.measure.internal.DefaultMeasure; -import org.sonar.api.measures.CoreMetrics; -import org.sonar.batch.mediumtest.BatchMediumTester; -import org.sonar.batch.mediumtest.TaskResult; -import org.sonar.xoo.XooPlugin; - -import java.io.File; -import java.io.IOException; - -import static org.assertj.core.api.Assertions.assertThat; - -public class CoverageTest { - - @org.junit.Rule - public TemporaryFolder temp = new TemporaryFolder(); - - public BatchMediumTester tester = BatchMediumTester.builder() - .registerPlugin("xoo", new XooPlugin()) - .addDefaultQProfile("xoo", "Sonar Way") - .build(); - - @Before - public void prepare() { - tester.start(); - } - - @After - public void stop() { - tester.stop(); - } - - @Test - public void unitTests() throws IOException { - - File baseDir = temp.newFolder(); - File srcDir = new File(baseDir, "src"); - srcDir.mkdir(); - - File xooFile = new File(srcDir, "sample.xoo"); - File xooUtCoverageFile = new File(srcDir, "sample.xoo.coverage"); - FileUtils.write(xooFile, "function foo() {\n if (a && b) {\nalert('hello');\n}\n}"); - FileUtils.write(xooUtCoverageFile, "2:2:2:1\n3:1"); - - TaskResult result = tester.newTask() - .properties(ImmutableMap.builder() - .put("sonar.task", "scan") - .put("sonar.projectBaseDir", baseDir.getAbsolutePath()) - .put("sonar.projectKey", "com.foo.project") - .put("sonar.projectName", "Foo Project") - .put("sonar.projectVersion", "1.0-SNAPSHOT") - .put("sonar.projectDescription", "Description of Foo Project") - .put("sonar.sources", "src") - .build()) - .start(); - - InputFile file = result.inputFile("src/sample.xoo"); - assertThat(result.coverageFor(file, 2).getUtHits()).isTrue(); - assertThat(result.coverageFor(file, 2).getItHits()).isFalse(); - assertThat(result.coverageFor(file, 2).getConditions()).isEqualTo(2); - assertThat(result.coverageFor(file, 2).getUtCoveredConditions()).isEqualTo(1); - assertThat(result.coverageFor(file, 2).getItCoveredConditions()).isEqualTo(0); - assertThat(result.coverageFor(file, 2).getOverallCoveredConditions()).isEqualTo(0); - - assertThat(result.measures()).contains(new DefaultMeasure() - .forMetric(CoreMetrics.LINES_TO_COVER) - .onFile(new DefaultInputFile("com.foo.project", "src/sample.xoo")) - .withValue(2)); - - assertThat(result.measures()).contains(new DefaultMeasure() - .forMetric(CoreMetrics.UNCOVERED_LINES) - .onFile(new DefaultInputFile("com.foo.project", "src/sample.xoo")) - .withValue(0)); - - assertThat(result.measures()).contains(new DefaultMeasure() - .forMetric(CoreMetrics.CONDITIONS_TO_COVER) - .onFile(new DefaultInputFile("com.foo.project", "src/sample.xoo")) - .withValue(2)); - - assertThat(result.measures()).contains(new DefaultMeasure() - .forMetric(CoreMetrics.COVERED_CONDITIONS_BY_LINE) - .onFile(new DefaultInputFile("com.foo.project", "src/sample.xoo")) - .withValue("2=1")); - } - -} diff --git a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/tests/CoveragePerTestMediumTest.java b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/tests/CoveragePerTestMediumTest.java new file mode 100644 index 00000000000..be0ba5e9207 --- /dev/null +++ b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/tests/CoveragePerTestMediumTest.java @@ -0,0 +1,115 @@ +/* + * 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.batch.mediumtest.tests; + +import com.google.common.collect.ImmutableMap; +import org.apache.commons.io.FileUtils; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; +import org.sonar.api.batch.fs.InputFile; +import org.sonar.batch.mediumtest.BatchMediumTester; +import org.sonar.batch.mediumtest.TaskResult; +import org.sonar.xoo.XooPlugin; + +import java.io.File; +import java.io.IOException; + +import static org.assertj.core.api.Assertions.assertThat; + +public class CoveragePerTestMediumTest { + + @org.junit.Rule + public TemporaryFolder temp = new TemporaryFolder(); + + public BatchMediumTester tester = BatchMediumTester.builder() + .registerPlugin("xoo", new XooPlugin()) + .addDefaultQProfile("xoo", "Sonar Way") + .build(); + + @Before + public void prepare() { + tester.start(); + } + + @After + public void stop() { + tester.stop(); + } + + @Test + public void coveragePerTestInReport() throws IOException { + + File baseDir = temp.newFolder(); + File srcDir = new File(baseDir, "src"); + srcDir.mkdir(); + File testDir = new File(baseDir, "test"); + testDir.mkdir(); + + File xooFile = new File(srcDir, "sample.xoo"); + FileUtils.write(xooFile, "foo"); + + File xooFile2 = new File(srcDir, "sample2.xoo"); + FileUtils.write(xooFile2, "foo"); + + File xooTestFile = new File(testDir, "sampleTest.xoo"); + FileUtils.write(xooTestFile, "failure\nerror\nok\nskipped"); + + File xooTestFile2 = new File(testDir, "sample2Test.xoo"); + FileUtils.write(xooTestFile2, "test file tests"); + + File xooTestExecutionFile = new File(testDir, "sampleTest.xoo.test"); + FileUtils.write(xooTestExecutionFile, "some test:4:::OK:UNIT\n" + + "another test:10:::OK:UNIT\n" + + "test without coverage:10:::OK:UNIT\n"); + + File xooCoveragePerTestFile = new File(testDir, "sampleTest.xoo.testcoverage"); + FileUtils.write(xooCoveragePerTestFile, "some test;src/sample.xoo,10,11;src/sample2.xoo,1,2\n" + + "another test;src/sample.xoo,10,20\n"); + + TaskResult result = tester.newTask() + .properties(ImmutableMap.builder() + .put("sonar.task", "scan") + .put("sonar.projectBaseDir", baseDir.getAbsolutePath()) + .put("sonar.projectKey", "com.foo.project") + .put("sonar.projectName", "Foo Project") + .put("sonar.projectVersion", "1.0-SNAPSHOT") + .put("sonar.projectDescription", "Description of Foo Project") + .put("sonar.sources", "src") + .put("sonar.tests", "test") + .build()) + .start(); + + InputFile file = result.inputFile("test/sampleTest.xoo"); + org.sonar.batch.protocol.output.BatchReport.CoverageDetail someTest = result.coveragePerTestFor(file, "some test"); + assertThat(someTest.getCoveredFileList()).hasSize(2); + assertThat(someTest.getCoveredFile(0).getFileRef()).isGreaterThan(0); + assertThat(someTest.getCoveredFile(0).getCoveredLineList()).containsExactly(10, 11); + assertThat(someTest.getCoveredFile(1).getFileRef()).isGreaterThan(0); + assertThat(someTest.getCoveredFile(1).getCoveredLineList()).containsExactly(1, 2); + + org.sonar.batch.protocol.output.BatchReport.CoverageDetail anotherTest = result.coveragePerTestFor(file, "another test"); + assertThat(anotherTest.getCoveredFileList()).hasSize(1); + assertThat(anotherTest.getCoveredFile(0).getFileRef()).isGreaterThan(0); + assertThat(anotherTest.getCoveredFile(0).getCoveredLineList()).containsExactly(10, 20); + } + +} diff --git a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/tests/TestExecutionMediumTest.java b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/tests/TestExecutionMediumTest.java new file mode 100644 index 00000000000..2e96cd42156 --- /dev/null +++ b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/tests/TestExecutionMediumTest.java @@ -0,0 +1,105 @@ +/* + * 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.batch.mediumtest.tests; + +import com.google.common.collect.ImmutableMap; +import org.apache.commons.io.FileUtils; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; +import org.sonar.api.batch.fs.InputFile; +import org.sonar.batch.mediumtest.BatchMediumTester; +import org.sonar.batch.mediumtest.TaskResult; +import org.sonar.batch.protocol.Constants.TestStatus; +import org.sonar.xoo.XooPlugin; + +import java.io.File; +import java.io.IOException; + +import static org.assertj.core.api.Assertions.assertThat; + +public class TestExecutionMediumTest { + + @org.junit.Rule + public TemporaryFolder temp = new TemporaryFolder(); + + public BatchMediumTester tester = BatchMediumTester.builder() + .registerPlugin("xoo", new XooPlugin()) + .addDefaultQProfile("xoo", "Sonar Way") + .build(); + + @Before + public void prepare() { + tester.start(); + } + + @After + public void stop() { + tester.stop(); + } + + @Test + public void unitTests() throws IOException { + + File baseDir = temp.newFolder(); + File srcDir = new File(baseDir, "src"); + srcDir.mkdir(); + File testDir = new File(baseDir, "test"); + testDir.mkdir(); + + File xooFile = new File(srcDir, "sample.xoo"); + FileUtils.write(xooFile, "foo"); + + File xooTestFile = new File(testDir, "sampleTest.xoo"); + FileUtils.write(xooTestFile, "failure\nerror\nok\nskipped"); + + File xooTestExecutionFile = new File(testDir, "sampleTest.xoo.test"); + FileUtils.write(xooTestExecutionFile, "skipped::::SKIPPED:UNIT\n" + + "failure:2:Failure::FAILURE:UNIT\n" + + "error:2:Error:The stack:ERROR:UNIT\n" + + "success:4:::OK:INTEGRATION"); + + TaskResult result = tester.newTask() + .properties(ImmutableMap.builder() + .put("sonar.task", "scan") + .put("sonar.projectBaseDir", baseDir.getAbsolutePath()) + .put("sonar.projectKey", "com.foo.project") + .put("sonar.projectName", "Foo Project") + .put("sonar.projectVersion", "1.0-SNAPSHOT") + .put("sonar.projectDescription", "Description of Foo Project") + .put("sonar.sources", "src") + .put("sonar.tests", "test") + .build()) + .start(); + + InputFile file = result.inputFile("test/sampleTest.xoo"); + org.sonar.batch.protocol.output.BatchReport.Test success = result.testExecutionFor(file, "success"); + assertThat(success.getDurationInMs()).isEqualTo(4); + assertThat(success.getStatus()).isEqualTo(TestStatus.OK); + + org.sonar.batch.protocol.output.BatchReport.Test error = result.testExecutionFor(file, "error"); + assertThat(error.getDurationInMs()).isEqualTo(2); + assertThat(error.getStatus()).isEqualTo(TestStatus.ERROR); + assertThat(error.getMsg()).isEqualTo("Error"); + assertThat(error.getStacktrace()).isEqualTo("The stack"); + } + +} diff --git a/sonar-core/src/main/java/org/sonar/core/component/ComponentVertex.java b/sonar-core/src/main/java/org/sonar/core/component/ComponentVertex.java index 7767a6372db..6be36ff6e65 100644 --- a/sonar-core/src/main/java/org/sonar/core/component/ComponentVertex.java +++ b/sonar-core/src/main/java/org/sonar/core/component/ComponentVertex.java @@ -55,10 +55,6 @@ public class ComponentVertex extends BeanVertex implements Component { setProperty("name", component.name()); setProperty("longName", component.longName()); setProperty("qualifier", component.qualifier()); - if (component instanceof ResourceComponent) { - setProperty("sid", ((ResourceComponent) component).snapshotId()); - setProperty("rid", ((ResourceComponent) component).resourceId()); - } } @Override diff --git a/sonar-core/src/main/java/org/sonar/core/component/GraphPerspectiveBuilder.java b/sonar-core/src/main/java/org/sonar/core/component/GraphPerspectiveBuilder.java index 5668a840d69..8e0f64e3c57 100644 --- a/sonar-core/src/main/java/org/sonar/core/component/GraphPerspectiveBuilder.java +++ b/sonar-core/src/main/java/org/sonar/core/component/GraphPerspectiveBuilder.java @@ -68,4 +68,15 @@ public abstract class GraphPerspectiveBuilder extends Per } return null; } + + public T get(Class perspectiveClass, String componentKey) { + ComponentVertex vertex = graph.getComponent(componentKey); + if (vertex != null) { + T perspective = perspectiveLoader.load(vertex); + if (perspective != null) { + return perspective; + } + } + return null; + } } diff --git a/sonar-core/src/main/java/org/sonar/core/component/ResourceComponent.java b/sonar-core/src/main/java/org/sonar/core/component/ResourceComponent.java index cb19d408d47..9680a0fc301 100644 --- a/sonar-core/src/main/java/org/sonar/core/component/ResourceComponent.java +++ b/sonar-core/src/main/java/org/sonar/core/component/ResourceComponent.java @@ -21,11 +21,8 @@ package org.sonar.core.component; import com.google.common.base.Strings; import org.sonar.api.component.Component; -import org.sonar.api.database.model.Snapshot; import org.sonar.api.resources.Resource; -import javax.annotation.Nullable; - public class ResourceComponent implements Component { private String key; private String path; @@ -33,14 +30,8 @@ public class ResourceComponent implements Component { private String longName; private String qualifier; private String scope; - private Long snapshotId; - private Long resourceId; - - public ResourceComponent(Resource resource, @Nullable Snapshot snapshot) { - this(resource, snapshot != null ? snapshot.getId() : null); - } - public ResourceComponent(Resource resource, @Nullable Integer snapshotId) { + public ResourceComponent(Resource resource) { this.key = resource.getEffectiveKey(); this.path = resource.getPath(); if (Strings.isNullOrEmpty(key)) { @@ -50,14 +41,6 @@ public class ResourceComponent implements Component { this.longName = resource.getLongName(); this.qualifier = resource.getQualifier(); this.scope = resource.getScope(); - if (snapshotId != null) { - this.snapshotId = snapshotId.longValue(); - this.resourceId = resource.getId().longValue(); - } - } - - public ResourceComponent(Resource resource) { - this(resource, (Integer) null); } @Override @@ -89,14 +72,6 @@ public class ResourceComponent implements Component { return scope; } - public Long snapshotId() { - return snapshotId; - } - - public Long resourceId() { - return resourceId; - } - @Override public String toString() { return key; diff --git a/sonar-core/src/main/java/org/sonar/core/component/ScanGraph.java b/sonar-core/src/main/java/org/sonar/core/component/ScanGraph.java index bdc7bc2142f..6d89d0b9824 100644 --- a/sonar-core/src/main/java/org/sonar/core/component/ScanGraph.java +++ b/sonar-core/src/main/java/org/sonar/core/component/ScanGraph.java @@ -30,8 +30,6 @@ import org.sonar.core.graph.BeanGraph; import org.sonar.core.graph.BeanIterable; import org.sonar.core.graph.GraphUtil; -import javax.annotation.Nullable; - public class ScanGraph extends BeanGraph implements BatchComponent { private static final String COMPONENT = "component"; @@ -58,8 +56,14 @@ public class ScanGraph extends BeanGraph implements BatchComponent { return vertex != null ? wrapComponent(vertex) : null; } - public ComponentVertex addComponent(Resource resource, @Nullable Integer snapshotId) { - return addComponent(new ResourceComponent(resource, snapshotId)); + public ComponentVertex addComponent(Resource resource) { + return addComponent(new ResourceComponent(resource)); + } + + public void completeComponent(String key, long resourceId, long snapshotId) { + ComponentVertex component = getComponent(key); + component.setProperty("sid", snapshotId); + component.setProperty("rid", resourceId); } public Iterable getComponents() { diff --git a/sonar-core/src/main/java/org/sonar/core/graph/BeanElement.java b/sonar-core/src/main/java/org/sonar/core/graph/BeanElement.java index 97eafd3a2fd..6a5ecbaec9d 100644 --- a/sonar-core/src/main/java/org/sonar/core/graph/BeanElement.java +++ b/sonar-core/src/main/java/org/sonar/core/graph/BeanElement.java @@ -53,7 +53,7 @@ public abstract class BeanElement return element.getPropertyKeys(); } - protected final C setProperty(String key, @Nullable Object value) { + public final C setProperty(String key, @Nullable Object value) { if (value != null) { element.setProperty(key, value); } else { diff --git a/sonar-core/src/test/java/org/sonar/core/component/ComponentVertexTest.java b/sonar-core/src/test/java/org/sonar/core/component/ComponentVertexTest.java index 39f24e8a805..ac0c157d6a0 100644 --- a/sonar-core/src/test/java/org/sonar/core/component/ComponentVertexTest.java +++ b/sonar-core/src/test/java/org/sonar/core/component/ComponentVertexTest.java @@ -27,8 +27,6 @@ import org.sonar.api.resources.Qualifiers; import org.sonar.core.graph.BeanGraph; import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; public class ComponentVertexTest { @Test @@ -45,18 +43,4 @@ public class ComponentVertexTest { assertThat(vertex.qualifier()).isEqualTo(Qualifiers.FILE); assertThat(vertex.path()).isEqualTo("src/org/Foo.java"); } - - @Test - public void should_copy_db_ids() { - BeanGraph beanGraph = new BeanGraph(new TinkerGraph()); - ComponentVertex vertex = beanGraph.createVertex(ComponentVertex.class); - ResourceComponent component = mock(ResourceComponent.class); - when(component.resourceId()).thenReturn(123L); - when(component.snapshotId()).thenReturn(456L); - - vertex.copyFrom(component); - - assertThat(vertex.element().getProperty("rid")).isEqualTo(123L); - assertThat(vertex.element().getProperty("sid")).isEqualTo(456L); - } } diff --git a/sonar-core/src/test/java/org/sonar/core/component/ResourceComponentTest.java b/sonar-core/src/test/java/org/sonar/core/component/ResourceComponentTest.java index ef2644a5b86..f8723d8730f 100644 --- a/sonar-core/src/test/java/org/sonar/core/component/ResourceComponentTest.java +++ b/sonar-core/src/test/java/org/sonar/core/component/ResourceComponentTest.java @@ -21,7 +21,6 @@ package org.sonar.core.component; import org.junit.Before; import org.junit.Test; -import org.sonar.api.database.model.Snapshot; import org.sonar.api.resources.File; import org.sonar.api.resources.Resource; @@ -38,26 +37,6 @@ public class ResourceComponentTest { file.setKey("path/to/foo.c"); } - @Test - public void db_ids_should_be_optional() { - ResourceComponent component = new ResourceComponent(file, new Snapshot()); - - assertThat(component.snapshotId()).isNull(); - assertThat(component.resourceId()).isNull(); - } - - @Test - public void db_ids_should_be_set() { - Snapshot snapshot = new Snapshot(); - snapshot.setId(123); - file.setId(456); - snapshot.setResourceId(456); - ResourceComponent component = new ResourceComponent(file, snapshot); - - assertThat(component.snapshotId()).isEqualTo(123); - assertThat(component.resourceId()).isEqualTo(456); - } - @Test public void should_use_effective_key() { ResourceComponent component = new ResourceComponent(file); diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/test/MutableTestPlan.java b/sonar-plugin-api/src/main/java/org/sonar/api/test/MutableTestPlan.java index 22bccb8d9fb..4659917f0ee 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/test/MutableTestPlan.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/test/MutableTestPlan.java @@ -23,6 +23,14 @@ import org.sonar.api.component.MutablePerspective; public interface MutableTestPlan extends TestPlan, MutablePerspective { + /** + * Add a {@link TestCase} to this test file. + * Note that a same physical test (for example in Java a single method annotated with @Test) + * can be executed several times (parameterized tests, different test suites, ...). As a result it is perfectly valid to register several + * tests with the same name. Anyway in this situation the coverage per test. + * @param name + * @return + */ MutableTestCase addTestCase(String name); } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/test/TestCase.java b/sonar-plugin-api/src/main/java/org/sonar/api/test/TestCase.java index a01fa7ae2de..301d347f9af 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/test/TestCase.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/test/TestCase.java @@ -19,8 +19,12 @@ */ package org.sonar.api.test; +import javax.annotation.CheckForNull; import javax.annotation.Nullable; +/** + * Represents a simple test execution result. + */ public interface TestCase { enum Status { OK, FAILURE, ERROR, SKIPPED; @@ -44,16 +48,23 @@ public interface TestCase { /** * Duration in milliseconds */ + @CheckForNull Long durationInMs(); + /** + * @deprecated since 5.2 not used + */ + @Deprecated String type(); Status status(); String name(); + @CheckForNull String message(); + @CheckForNull String stackTrace(); TestPlan testPlan(); diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/test/TestPlan.java b/sonar-plugin-api/src/main/java/org/sonar/api/test/TestPlan.java index dbb864426f5..74b4291598e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/test/TestPlan.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/test/TestPlan.java @@ -21,6 +21,9 @@ package org.sonar.api.test; import org.sonar.api.component.Perspective; +/** + * A {@link TestPlan} is + */ public interface TestPlan extends Perspective { Iterable testCases();