From c613bf937e87f7c97b5a04690d8045bac1259af8 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Wed, 11 Mar 2015 08:31:47 +0100 Subject: [PATCH] SONAR-6262 Persist links in compute stack --- .../server/component/db/ComponentLinkDao.java | 49 + .../computation/step/ComputationSteps.java | 1 + .../step/PersistComponentLinksStep.java | 147 + .../java/org/sonar/server/db/DbClient.java | 7 + .../component/db/ComponentLinkDaoTest.java | 117 + .../step/ComputationStepsTest.java | 7 +- .../step/PersistComponentLinksStepTest.java | 224 + .../db/ComponentLinkDaoTest/delete.xml | 5 + .../db/ComponentLinkDaoTest/empty.xml | 3 + .../db/ComponentLinkDaoTest/insert.xml | 5 + .../db/ComponentLinkDaoTest/shared.xml | 7 + .../db/ComponentLinkDaoTest/update-result.xml | 5 + .../db/ComponentLinkDaoTest/update.xml | 5 + ...add_links_on_project_and_module-result.xml | 11 + .../delete_link.xml | 5 + .../PersistComponentLinksStepTest/empty.xml | 3 + ...nothing_to_do_when_link_already_exists.xml | 5 + .../update_link-result.xml | 5 + .../update_link.xml | 5 + .../org/sonar/batch/protocol/Constants.java | 253 +- .../batch/protocol/input/BatchInput.java | 909 ++-- .../batch/protocol/output/BatchReport.java | 3903 ++++++++++++----- .../sonar/server/source/db/FileSourceDb.java | 1004 +++-- .../src/main/protobuf/batch_report.proto | 6 + .../src/main/protobuf/constants.proto | 8 + .../core/component/ComponentLinkDto.java | 79 + .../component/db/ComponentLinkMapper.java | 37 + .../org/sonar/core/persistence/MyBatis.java | 9 +- .../core/component/db/ComponentLinkMapper.xml | 37 + 29 files changed, 4857 insertions(+), 2004 deletions(-) create mode 100644 server/sonar-server/src/main/java/org/sonar/server/component/db/ComponentLinkDao.java create mode 100644 server/sonar-server/src/main/java/org/sonar/server/computation/step/PersistComponentLinksStep.java create mode 100644 server/sonar-server/src/test/java/org/sonar/server/component/db/ComponentLinkDaoTest.java create mode 100644 server/sonar-server/src/test/java/org/sonar/server/computation/step/PersistComponentLinksStepTest.java create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/delete.xml create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/empty.xml create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/insert.xml create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/shared.xml create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/update-result.xml create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/update.xml create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/add_links_on_project_and_module-result.xml create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/delete_link.xml create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/empty.xml create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/nothing_to_do_when_link_already_exists.xml create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/update_link-result.xml create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/update_link.xml create mode 100644 sonar-core/src/main/java/org/sonar/core/component/ComponentLinkDto.java create mode 100644 sonar-core/src/main/java/org/sonar/core/component/db/ComponentLinkMapper.java create mode 100644 sonar-core/src/main/resources/org/sonar/core/component/db/ComponentLinkMapper.xml diff --git a/server/sonar-server/src/main/java/org/sonar/server/component/db/ComponentLinkDao.java b/server/sonar-server/src/main/java/org/sonar/server/component/db/ComponentLinkDao.java new file mode 100644 index 00000000000..eec3060f567 --- /dev/null +++ b/server/sonar-server/src/main/java/org/sonar/server/component/db/ComponentLinkDao.java @@ -0,0 +1,49 @@ +/* + * 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.server.component.db; + +import org.sonar.api.ServerComponent; +import org.sonar.core.component.ComponentLinkDto; +import org.sonar.core.component.db.ComponentLinkMapper; +import org.sonar.core.persistence.DaoComponent; +import org.sonar.core.persistence.DbSession; + +import java.util.List; + +public class ComponentLinkDao implements ServerComponent, DaoComponent { + + public List selectByComponentUuid(DbSession session, String componentUuid) { + return session.getMapper(ComponentLinkMapper.class).selectByComponentUuid(componentUuid); + } + + public void insert(DbSession session, ComponentLinkDto item) { + session.getMapper(ComponentLinkMapper.class).insert(item); + } + + public void update(DbSession session, ComponentLinkDto item) { + session.getMapper(ComponentLinkMapper.class).update(item); + } + + public void delete(DbSession session, long id) { + session.getMapper(ComponentLinkMapper.class).delete(id); + } + +} diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/step/ComputationSteps.java b/server/sonar-server/src/main/java/org/sonar/server/computation/step/ComputationSteps.java index 973c5dadf55..32c5a202112 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/step/ComputationSteps.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/step/ComputationSteps.java @@ -42,6 +42,7 @@ public class ComputationSteps { SwitchSnapshotStep.class, IndexComponentsStep.class, PurgeDatastoresStep.class, + PersistComponentLinksStep.class, // ES indexing is done after all db changes ApplyPermissionsStep.class, diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/step/PersistComponentLinksStep.java b/server/sonar-server/src/main/java/org/sonar/server/computation/step/PersistComponentLinksStep.java new file mode 100644 index 00000000000..ab8af0dee3b --- /dev/null +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/step/PersistComponentLinksStep.java @@ -0,0 +1,147 @@ +/* + * 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.server.computation.step; + +import com.google.common.base.Predicate; +import com.google.common.collect.Iterables; +import org.sonar.api.i18n.I18n; +import org.sonar.api.resources.Qualifiers; +import org.sonar.batch.protocol.Constants; +import org.sonar.batch.protocol.output.BatchReport; +import org.sonar.batch.protocol.output.BatchReportReader; +import org.sonar.core.component.ComponentLinkDto; +import org.sonar.core.persistence.DbSession; +import org.sonar.core.persistence.MyBatis; +import org.sonar.server.computation.ComputationContext; +import org.sonar.server.db.DbClient; + +import javax.annotation.Nullable; + +import java.util.List; +import java.util.Locale; +import java.util.Set; + +import static com.google.common.collect.Sets.newHashSet; + +public class PersistComponentLinksStep implements ComputationStep { + + private final DbClient dbClient; + private final I18n i18n; + + public PersistComponentLinksStep(DbClient dbClient, I18n i18n) { + this.dbClient = dbClient; + this.i18n = i18n; + } + + @Override + public String[] supportedProjectQualifiers() { + return new String[] {Qualifiers.PROJECT}; + } + + @Override + public void execute(ComputationContext context) { + DbSession session = dbClient.openSession(false); + try { + int rootComponentRef = context.getReportMetadata().getRootComponentRef(); + recursivelyProcessComponent(session, context, rootComponentRef); + session.commit(); + } finally { + MyBatis.closeQuietly(session); + } + } + + private void recursivelyProcessComponent(DbSession session, ComputationContext context, int componentRef) { + BatchReportReader reportReader = context.getReportReader(); + BatchReport.Component component = reportReader.readComponent(componentRef); + processLinks(session, component); + + for (Integer childRef : component.getChildRefsList()) { + recursivelyProcessComponent(session, context, childRef); + } + } + + private void processLinks(DbSession session, BatchReport.Component component) { + if (component.getType().equals(Constants.ComponentType.PROJECT) || component.getType().equals(Constants.ComponentType.MODULE)) { + List links = component.getLinksList(); + List previousLinks = dbClient.componentLinkDao().selectByComponentUuid(session, component.getUuid()); + mergeLinks(session, component.getUuid(), links, previousLinks); + } + } + + private void mergeLinks(DbSession session, String componentUuid, List links, List previousLinks) { + Set linkType = newHashSet(); + for (final BatchReport.ComponentLink link : links) { + String type = convertType(link.getType()); + if (!linkType.contains(type)) { + linkType.add(type); + } else { + throw new IllegalArgumentException(String.format("Link of type '%s' has already been declared on component '%s'", type, componentUuid)); + } + + ComponentLinkDto previousLink = Iterables.find(previousLinks, new Predicate() { + @Override + public boolean apply(@Nullable ComponentLinkDto input) { + return input != null && input.getType().equals(convertType(link.getType())); + } + }, null); + if (previousLink == null) { + dbClient.componentLinkDao().insert(session, + new ComponentLinkDto() + .setComponentUuid(componentUuid) + .setType(type) + .setName(i18n.message(Locale.ENGLISH, "project_links." + type, null)) + .setHref(link.getHref()) + ); + } else { + previousLink.setHref(link.getHref()); + dbClient.componentLinkDao().update(session, previousLink); + } + } + + for (ComponentLinkDto dto : previousLinks) { + if (!linkType.contains(dto.getType())) { + dbClient.componentLinkDao().delete(session, dto.getId()); + } + } + } + + private static String convertType(Constants.ComponentLinkType type) { + switch (type) { + case HOME: + return "homepage"; + case SCM: + return "scm"; + case SCM_DEV: + return "scm_dev"; + case CI: + return "ci"; + case ISSUE: + return "issue"; + default: + throw new IllegalArgumentException(String.format("Unsupported type %s", type.name())); + } + } + + @Override + public String getDescription() { + return "Persist component links"; + } +} diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/DbClient.java b/server/sonar-server/src/main/java/org/sonar/server/db/DbClient.java index 3c34603fe53..77cc92e3c27 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/db/DbClient.java +++ b/server/sonar-server/src/main/java/org/sonar/server/db/DbClient.java @@ -37,6 +37,7 @@ import org.sonar.core.user.AuthorizationDao; import org.sonar.server.activity.db.ActivityDao; import org.sonar.server.component.db.ComponentDao; import org.sonar.server.component.db.ComponentIndexDao; +import org.sonar.server.component.db.ComponentLinkDao; import org.sonar.server.component.db.SnapshotDao; import org.sonar.server.computation.db.AnalysisReportDao; import org.sonar.server.dashboard.db.DashboardDao; @@ -89,6 +90,7 @@ public class DbClient implements ServerComponent { private final FileSourceDao fileSourceDao; private final AuthorDao authorDao; private final ComponentIndexDao componentIndexDao; + private final ComponentLinkDao componentLinkDao; public DbClient(Database db, MyBatis myBatis, DaoComponent... daoComponents) { this.db = db; @@ -123,6 +125,7 @@ public class DbClient implements ServerComponent { fileSourceDao = getDao(map, FileSourceDao.class); authorDao = getDao(map, AuthorDao.class); componentIndexDao = getDao(map, ComponentIndexDao.class); + componentLinkDao = getDao(map, ComponentLinkDao.class); } public Database database() { @@ -233,6 +236,10 @@ public class DbClient implements ServerComponent { return componentIndexDao; } + public ComponentLinkDao componentLinkDao() { + return componentLinkDao; + } + private K getDao(Map map, Class clazz) { return (K) map.get(clazz); } diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/db/ComponentLinkDaoTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/db/ComponentLinkDaoTest.java new file mode 100644 index 00000000000..9c0c4b21fe6 --- /dev/null +++ b/server/sonar-server/src/test/java/org/sonar/server/component/db/ComponentLinkDaoTest.java @@ -0,0 +1,117 @@ +/* + * 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.server.component.db; + +import org.junit.After; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; +import org.junit.experimental.categories.Category; +import org.sonar.core.component.ComponentLinkDto; +import org.sonar.core.persistence.DbSession; +import org.sonar.core.persistence.DbTester; +import org.sonar.test.DbTests; + +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; + +@Category(DbTests.class) +public class ComponentLinkDaoTest { + + @ClassRule + public static DbTester dbTester = new DbTester(); + + DbSession session; + + ComponentLinkDao dao; + + @Before + public void createDao() throws Exception { + session = dbTester.myBatis().openSession(false); + dao = new ComponentLinkDao(); + } + + @After + public void tearDown() throws Exception { + session.close(); + } + + @Test + public void select_by_component_uuid() throws Exception { + dbTester.prepareDbUnit(getClass(), "shared.xml"); + + List links = dao.selectByComponentUuid(session, "ABCD"); + assertThat(links).hasSize(2); + + links = dao.selectByComponentUuid(session, "BCDE"); + assertThat(links).hasSize(1); + + ComponentLinkDto link = links.get(0); + assertThat(link.getId()).isEqualTo(3L); + assertThat(link.getComponentUuid()).isEqualTo("BCDE"); + assertThat(link.getType()).isEqualTo("homepage"); + assertThat(link.getName()).isEqualTo("Home"); + assertThat(link.getHref()).isEqualTo("http://www.struts.org"); + } + + @Test + public void insert() throws Exception { + dbTester.prepareDbUnit(getClass(), "empty.xml"); + + dao.insert(session, new ComponentLinkDto() + .setComponentUuid("ABCD") + .setType("homepage") + .setName("Home") + .setHref("http://www.sonarqube.org") + ); + session.commit(); + + dbTester.assertDbUnit(getClass(), "insert.xml", "project_links"); + } + + @Test + public void update() throws Exception { + dbTester.prepareDbUnit(getClass(), "update.xml"); + + dao.update(session, new ComponentLinkDto() + .setId(1L) + .setComponentUuid("ABCD") + .setType("homepage") + .setName("Home") + .setHref("http://www.sonarqube.org") + ); + session.commit(); + + dbTester.assertDbUnit(getClass(), "update-result.xml", "project_links"); + } + + @Test + public void delete() throws Exception { + dbTester.prepareDbUnit(getClass(), "delete.xml"); + + dao.delete(session, 1L); + session.commit(); + + assertThat(dbTester.countRowsOfTable("project_links")).isEqualTo(0); + } + +} diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/step/ComputationStepsTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/step/ComputationStepsTest.java index ae1e8ee85c7..e10a1481099 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/step/ComputationStepsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/step/ComputationStepsTest.java @@ -42,11 +42,12 @@ public class ComputationStepsTest { mock(SwitchSnapshotStep.class), mock(PurgeDatastoresStep.class), mock(SendIssueNotificationsStep.class), - mock(IndexComponentsStep.class)); + mock(IndexComponentsStep.class), + mock(PersistComponentLinksStep.class)); - assertThat(registry.orderedSteps()).hasSize(11); + assertThat(registry.orderedSteps()).hasSize(12); assertThat(registry.orderedSteps().get(0)).isInstanceOf(ParseReportStep.class); - assertThat(registry.orderedSteps().get(10)).isInstanceOf(SendIssueNotificationsStep.class); + assertThat(registry.orderedSteps().get(11)).isInstanceOf(SendIssueNotificationsStep.class); } @Test diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/step/PersistComponentLinksStepTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/step/PersistComponentLinksStepTest.java new file mode 100644 index 00000000000..1e5ef844846 --- /dev/null +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/step/PersistComponentLinksStepTest.java @@ -0,0 +1,224 @@ +/* + * 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.server.computation.step; + +import org.junit.*; +import org.junit.experimental.categories.Category; +import org.junit.rules.TemporaryFolder; +import org.sonar.api.i18n.I18n; +import org.sonar.batch.protocol.Constants; +import org.sonar.batch.protocol.output.BatchReport; +import org.sonar.batch.protocol.output.BatchReportReader; +import org.sonar.batch.protocol.output.BatchReportWriter; +import org.sonar.core.component.ComponentDto; +import org.sonar.core.persistence.DbSession; +import org.sonar.core.persistence.DbTester; +import org.sonar.server.component.db.ComponentLinkDao; +import org.sonar.server.computation.ComputationContext; +import org.sonar.server.db.DbClient; +import org.sonar.test.DbTests; + +import java.io.File; +import java.util.Locale; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.failBecauseExceptionWasNotThrown; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +@Category(DbTests.class) +public class PersistComponentLinksStepTest { + + @Rule + public TemporaryFolder temp = new TemporaryFolder(); + + @ClassRule + public static DbTester dbTester = new DbTester(); + + DbSession session; + + ComponentLinkDao dao; + + I18n i18n; + + PersistComponentLinksStep step; + + @Before + public void setup() throws Exception { + session = dbTester.myBatis().openSession(false); + dao = new ComponentLinkDao(); + DbClient dbClient = new DbClient(dbTester.database(), dbTester.myBatis(), dao); + + i18n = mock(I18n.class); + when(i18n.message(Locale.ENGLISH, "project_links.homepage", null)).thenReturn("Home"); + when(i18n.message(Locale.ENGLISH, "project_links.scm", null)).thenReturn("Sources"); + when(i18n.message(Locale.ENGLISH, "project_links.scm_dev", null)).thenReturn("Developer connection"); + when(i18n.message(Locale.ENGLISH, "project_links.ci", null)).thenReturn("Continuous integration"); + when(i18n.message(Locale.ENGLISH, "project_links.issue", null)).thenReturn("Issues"); + + step = new PersistComponentLinksStep(dbClient, i18n); + } + + @After + public void tearDown() throws Exception { + session.close(); + } + + @Test + public void execute_only_on_projects() throws Exception { + assertThat(step.supportedProjectQualifiers()).containsOnly("TRK"); + } + + @Test + public void add_links_on_project_and_module() throws Exception { + dbTester.prepareDbUnit(getClass(), "empty.xml"); + + File reportDir = temp.newFolder(); + // project and 1 module + BatchReportWriter writer = new BatchReportWriter(reportDir); + writer.writeMetadata(BatchReport.Metadata.newBuilder() + .setRootComponentRef(1) + .setProjectKey("PROJECT_KEY") + .setAnalysisDate(150000000L) + .build()); + + writer.writeComponent(BatchReport.Component.newBuilder() + .setRef(1) + .setType(Constants.ComponentType.PROJECT) + .setUuid("ABCD") + .addChildRefs(2) + .addLinks(BatchReport.ComponentLink.newBuilder().setType(Constants.ComponentLinkType.HOME).setHref("http://www.sonarqube.org").build()) + .addLinks(BatchReport.ComponentLink.newBuilder().setType(Constants.ComponentLinkType.SCM).setHref("https://github.com/SonarSource/sonar").build()) + .addLinks(BatchReport.ComponentLink.newBuilder().setType(Constants.ComponentLinkType.SCM_DEV).setHref("scm:git:git@github.com:SonarSource/sonar.git/sonar").build()) + .addLinks(BatchReport.ComponentLink.newBuilder().setType(Constants.ComponentLinkType.ISSUE).setHref("http://jira.sonarsource.com/").build()) + .addLinks(BatchReport.ComponentLink.newBuilder().setType(Constants.ComponentLinkType.CI).setHref("http://bamboo.ci.codehaus.org/browse/SONAR").build()) + .build()); + writer.writeComponent(BatchReport.Component.newBuilder() + .setRef(2) + .setType(Constants.ComponentType.MODULE) + .setUuid("BCDE") + .addLinks(BatchReport.ComponentLink.newBuilder().setType(Constants.ComponentLinkType.SCM).setHref("https://github.com/SonarSource/sonar/server").build()) + .build()); + + step.execute(new ComputationContext(new BatchReportReader(reportDir), mock(ComponentDto.class))); + + dbTester.assertDbUnit(getClass(), "add_links_on_project_and_module-result.xml", "project_links"); + } + + @Test + public void nothing_to_do_when_link_already_exists() throws Exception { + dbTester.prepareDbUnit(getClass(), "nothing_to_do_when_link_already_exists.xml"); + + File reportDir = temp.newFolder(); + BatchReportWriter writer = new BatchReportWriter(reportDir); + writer.writeMetadata(BatchReport.Metadata.newBuilder() + .setRootComponentRef(1) + .setProjectKey("PROJECT_KEY") + .setAnalysisDate(150000000L) + .build()); + + writer.writeComponent(BatchReport.Component.newBuilder() + .setRef(1) + .setType(Constants.ComponentType.PROJECT) + .setUuid("ABCD") + .addLinks(BatchReport.ComponentLink.newBuilder().setType(Constants.ComponentLinkType.HOME).setHref("http://www.sonarqube.org").build()) + .build()); + + step.execute(new ComputationContext(new BatchReportReader(reportDir), mock(ComponentDto.class))); + + dbTester.assertDbUnit(getClass(), "nothing_to_do_when_link_already_exists.xml", "project_links"); + } + + @Test + public void update_link() throws Exception { + dbTester.prepareDbUnit(getClass(), "update_link.xml"); + + File reportDir = temp.newFolder(); + BatchReportWriter writer = new BatchReportWriter(reportDir); + writer.writeMetadata(BatchReport.Metadata.newBuilder() + .setRootComponentRef(1) + .setProjectKey("PROJECT_KEY") + .setAnalysisDate(150000000L) + .build()); + + writer.writeComponent(BatchReport.Component.newBuilder() + .setRef(1) + .setType(Constants.ComponentType.PROJECT) + .setUuid("ABCD") + .addLinks(BatchReport.ComponentLink.newBuilder().setType(Constants.ComponentLinkType.HOME).setHref("http://www.sonarqube.org").build()) + .build()); + + step.execute(new ComputationContext(new BatchReportReader(reportDir), mock(ComponentDto.class))); + + dbTester.assertDbUnit(getClass(), "update_link-result.xml", "project_links"); + } + + @Test + public void delete_link() throws Exception { + dbTester.prepareDbUnit(getClass(), "delete_link.xml"); + + File reportDir = temp.newFolder(); + BatchReportWriter writer = new BatchReportWriter(reportDir); + writer.writeMetadata(BatchReport.Metadata.newBuilder() + .setRootComponentRef(1) + .setProjectKey("PROJECT_KEY") + .setAnalysisDate(150000000L) + .build()); + + writer.writeComponent(BatchReport.Component.newBuilder() + .setRef(1) + .setType(Constants.ComponentType.PROJECT) + .setUuid("ABCD") + .build()); + + step.execute(new ComputationContext(new BatchReportReader(reportDir), mock(ComponentDto.class))); + + assertThat(dbTester.countRowsOfTable("project_links")).isEqualTo(0); + } + + @Test + public void fail_when_trying_to_add_same_link_type_multiple_times() throws Exception { + dbTester.prepareDbUnit(getClass(), "empty.xml"); + + File reportDir = temp.newFolder(); + BatchReportWriter writer = new BatchReportWriter(reportDir); + writer.writeMetadata(BatchReport.Metadata.newBuilder() + .setRootComponentRef(1) + .setProjectKey("PROJECT_KEY") + .setAnalysisDate(150000000L) + .build()); + + writer.writeComponent(BatchReport.Component.newBuilder() + .setRef(1) + .setType(Constants.ComponentType.PROJECT) + .setUuid("ABCD") + .addLinks(BatchReport.ComponentLink.newBuilder().setType(Constants.ComponentLinkType.HOME).setHref("http://www.sonarqube.org").build()) + .addLinks(BatchReport.ComponentLink.newBuilder().setType(Constants.ComponentLinkType.HOME).setHref("http://www.sonarqube.org").build()) + .build()); + + try { + step.execute(new ComputationContext(new BatchReportReader(reportDir), mock(ComponentDto.class))); + failBecauseExceptionWasNotThrown(IllegalArgumentException.class); + } catch (IllegalArgumentException e) { + assertThat(e).hasMessage("Link of type 'homepage' has already been declared on component 'ABCD'"); + } + } +} diff --git a/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/delete.xml b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/delete.xml new file mode 100644 index 00000000000..8b89e7223ec --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/delete.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/empty.xml b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/empty.xml new file mode 100644 index 00000000000..871dedcb5e9 --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/empty.xml @@ -0,0 +1,3 @@ + + + diff --git a/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/insert.xml b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/insert.xml new file mode 100644 index 00000000000..8b89e7223ec --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/insert.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/shared.xml b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/shared.xml new file mode 100644 index 00000000000..33e9449d1dd --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/shared.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/update-result.xml b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/update-result.xml new file mode 100644 index 00000000000..8b89e7223ec --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/update-result.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/update.xml b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/update.xml new file mode 100644 index 00000000000..6b80fc9d01c --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/component/db/ComponentLinkDaoTest/update.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/add_links_on_project_and_module-result.xml b/server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/add_links_on_project_and_module-result.xml new file mode 100644 index 00000000000..008f804103e --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/add_links_on_project_and_module-result.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/delete_link.xml b/server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/delete_link.xml new file mode 100644 index 00000000000..8b89e7223ec --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/delete_link.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/empty.xml b/server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/empty.xml new file mode 100644 index 00000000000..871dedcb5e9 --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/empty.xml @@ -0,0 +1,3 @@ + + + diff --git a/server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/nothing_to_do_when_link_already_exists.xml b/server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/nothing_to_do_when_link_already_exists.xml new file mode 100644 index 00000000000..8b89e7223ec --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/nothing_to_do_when_link_already_exists.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/update_link-result.xml b/server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/update_link-result.xml new file mode 100644 index 00000000000..8b89e7223ec --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/update_link-result.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/update_link.xml b/server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/update_link.xml new file mode 100644 index 00000000000..d40281088f3 --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistComponentLinksStepTest/update_link.xml @@ -0,0 +1,5 @@ + + + + + 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 bc9d704a4f2..91df158ede1 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 @@ -4,15 +4,18 @@ package org.sonar.batch.protocol; public final class Constants { - private Constants() {} + private Constants() { + } + public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { + com.google.protobuf.ExtensionRegistry registry) { } + /** * Protobuf enum {@code Severity} */ public enum Severity - implements com.google.protobuf.ProtocolMessageEnum { + implements com.google.protobuf.ProtocolMessageEnum { /** * INFO = 0; */ @@ -32,8 +35,7 @@ public final class Constants { /** * BLOCKER = 4; */ - BLOCKER(4, 4), - ; + BLOCKER(4, 4), ; /** * INFO = 0; @@ -56,49 +58,58 @@ public final class Constants { */ public static final int BLOCKER_VALUE = 4; - - public final int getNumber() { return value; } + public final int getNumber() { + return value; + } public static Severity valueOf(int value) { switch (value) { - case 0: return INFO; - case 1: return MINOR; - case 2: return MAJOR; - case 3: return CRITICAL; - case 4: return BLOCKER; - default: return null; + case 0: + return INFO; + case 1: + return MINOR; + case 2: + return MAJOR; + case 3: + return CRITICAL; + case 4: + return BLOCKER; + default: + return null; } } public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { + internalGetValueMap() { return internalValueMap; } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Severity findValueByNumber(int number) { - return Severity.valueOf(number); - } - }; + + private static com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Severity findValueByNumber(int number) { + return Severity.valueOf(number); + } + }; public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { + getValueDescriptor() { return getDescriptor().getValues().get(index); } + public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { + getDescriptorForType() { return getDescriptor(); } + public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { + getDescriptor() { return org.sonar.batch.protocol.Constants.getDescriptor().getEnumTypes().get(0); } private static final Severity[] VALUES = values(); public static Severity valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); @@ -121,7 +132,7 @@ public final class Constants { * Protobuf enum {@code ComponentType} */ public enum ComponentType - implements com.google.protobuf.ProtocolMessageEnum { + implements com.google.protobuf.ProtocolMessageEnum { /** * PROJECT = 0; */ @@ -145,8 +156,7 @@ public final class Constants { /** * SUBVIEW = 5; */ - SUBVIEW(5, 5), - ; + SUBVIEW(5, 5), ; /** * PROJECT = 0; @@ -173,50 +183,60 @@ public final class Constants { */ public static final int SUBVIEW_VALUE = 5; - - public final int getNumber() { return value; } + public final int getNumber() { + return value; + } public static ComponentType valueOf(int value) { switch (value) { - case 0: return PROJECT; - case 1: return MODULE; - case 2: return DIRECTORY; - case 3: return FILE; - case 4: return VIEW; - case 5: return SUBVIEW; - default: return null; + case 0: + return PROJECT; + case 1: + return MODULE; + case 2: + return DIRECTORY; + case 3: + return FILE; + case 4: + return VIEW; + case 5: + return SUBVIEW; + default: + return null; } } public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { + internalGetValueMap() { return internalValueMap; } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ComponentType findValueByNumber(int number) { - return ComponentType.valueOf(number); - } - }; + + private static com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ComponentType findValueByNumber(int number) { + return ComponentType.valueOf(number); + } + }; public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { + getValueDescriptor() { return getDescriptor().getValues().get(index); } + public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { + getDescriptorForType() { return getDescriptor(); } + public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { + getDescriptor() { return org.sonar.batch.protocol.Constants.getDescriptor().getEnumTypes().get(1); } private static final ComponentType[] VALUES = values(); public static ComponentType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); @@ -235,26 +255,143 @@ public final class Constants { // @@protoc_insertion_point(enum_scope:ComponentType) } + /** + * Protobuf enum {@code ComponentLinkType} + */ + public enum ComponentLinkType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * HOME = 0; + */ + HOME(0, 0), + /** + * SCM = 1; + */ + SCM(1, 1), + /** + * SCM_DEV = 2; + */ + SCM_DEV(2, 2), + /** + * ISSUE = 3; + */ + ISSUE(3, 3), + /** + * CI = 4; + */ + CI(4, 4), ; - public static com.google.protobuf.Descriptors.FileDescriptor + /** + * HOME = 0; + */ + public static final int HOME_VALUE = 0; + /** + * SCM = 1; + */ + public static final int SCM_VALUE = 1; + /** + * SCM_DEV = 2; + */ + public static final int SCM_DEV_VALUE = 2; + /** + * ISSUE = 3; + */ + public static final int ISSUE_VALUE = 3; + /** + * CI = 4; + */ + public static final int CI_VALUE = 4; + + public final int getNumber() { + return value; + } + + public static ComponentLinkType valueOf(int value) { + switch (value) { + case 0: + return HOME; + case 1: + return SCM; + case 2: + return SCM_DEV; + case 3: + return ISSUE; + case 4: + return CI; + 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 ComponentLinkType findValueByNumber(int number) { + return ComponentLinkType.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(2); + } + + private static final ComponentLinkType[] VALUES = values(); + + public static ComponentLinkType 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 ComponentLinkType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:ComponentLinkType) + } + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { return descriptor; } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n\017constants.proto*E\n\010Severity\022\010\n\004INFO\020\000\022" + - "\t\n\005MINOR\020\001\022\t\n\005MAJOR\020\002\022\014\n\010CRITICAL\020\003\022\013\n\007B" + - "LOCKER\020\004*X\n\rComponentType\022\013\n\007PROJECT\020\000\022\n" + - "\n\006MODULE\020\001\022\r\n\tDIRECTORY\020\002\022\010\n\004FILE\020\003\022\010\n\004V" + - "IEW\020\004\022\013\n\007SUBVIEW\020\005B\034\n\030org.sonar.batch.pr" + - "otocolH\001" + "\t\n\005MINOR\020\001\022\t\n\005MAJOR\020\002\022\014\n\010CRITICAL\020\003\022\013\n\007B" + + "LOCKER\020\004*X\n\rComponentType\022\013\n\007PROJECT\020\000\022\n" + + "\n\006MODULE\020\001\022\r\n\tDIRECTORY\020\002\022\010\n\004FILE\020\003\022\010\n\004V" + + "IEW\020\004\022\013\n\007SUBVIEW\020\005*F\n\021ComponentLinkType\022" + + "\010\n\004HOME\020\000\022\007\n\003SCM\020\001\022\013\n\007SCM_DEV\020\002\022\t\n\005ISSUE" + + "\020\003\022\006\n\002CI\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) { + com.google.protobuf.Descriptors.FileDescriptor root) { descriptor = root; return null; } 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 6ecbcc83d31..5e35e980038 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 @@ -4,198 +4,212 @@ package org.sonar.batch.protocol.input; public final class BatchInput { - private BatchInput() {} + private BatchInput() { + } + public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { + com.google.protobuf.ExtensionRegistry registry) { } - public interface ServerIssueOrBuilder - extends com.google.protobuf.MessageOrBuilder { - // optional string key = 1; + public interface ServerIssueOrBuilder extends + // @@protoc_insertion_point(interface_extends:ServerIssue) + com.google.protobuf.MessageOrBuilder { + /** * optional string key = 1; */ boolean hasKey(); + /** * optional string key = 1; */ java.lang.String getKey(); + /** * optional string key = 1; */ com.google.protobuf.ByteString - getKeyBytes(); + getKeyBytes(); - // optional string module_key = 2; /** * optional string module_key = 2; */ boolean hasModuleKey(); + /** * optional string module_key = 2; */ java.lang.String getModuleKey(); + /** * optional string module_key = 2; */ com.google.protobuf.ByteString - getModuleKeyBytes(); + getModuleKeyBytes(); - // optional string path = 3; /** * optional string path = 3; */ boolean hasPath(); + /** * optional string path = 3; */ java.lang.String getPath(); + /** * optional string path = 3; */ com.google.protobuf.ByteString - getPathBytes(); + getPathBytes(); - // optional string rule_repository = 4; /** * optional string rule_repository = 4; */ boolean hasRuleRepository(); + /** * optional string rule_repository = 4; */ java.lang.String getRuleRepository(); + /** * optional string rule_repository = 4; */ com.google.protobuf.ByteString - getRuleRepositoryBytes(); + getRuleRepositoryBytes(); - // optional string rule_key = 5; /** * optional string rule_key = 5; */ boolean hasRuleKey(); + /** * optional string rule_key = 5; */ java.lang.String getRuleKey(); + /** * optional string rule_key = 5; */ com.google.protobuf.ByteString - getRuleKeyBytes(); + getRuleKeyBytes(); - // optional int32 line = 6; /** * optional int32 line = 6; */ boolean hasLine(); + /** * optional int32 line = 6; */ int getLine(); - // optional string msg = 7; /** * optional string msg = 7; */ boolean hasMsg(); + /** * optional string msg = 7; */ java.lang.String getMsg(); + /** * optional string msg = 7; */ com.google.protobuf.ByteString - getMsgBytes(); + getMsgBytes(); - // optional .Severity severity = 8; /** * optional .Severity severity = 8; */ boolean hasSeverity(); + /** * optional .Severity severity = 8; */ org.sonar.batch.protocol.Constants.Severity getSeverity(); - // optional bool manual_severity = 9; /** * optional bool manual_severity = 9; */ boolean hasManualSeverity(); + /** * optional bool manual_severity = 9; */ boolean getManualSeverity(); - // optional string resolution = 10; /** * optional string resolution = 10; */ boolean hasResolution(); + /** * optional string resolution = 10; */ java.lang.String getResolution(); + /** * optional string resolution = 10; */ com.google.protobuf.ByteString - getResolutionBytes(); + getResolutionBytes(); - // optional string status = 11; /** * optional string status = 11; */ boolean hasStatus(); + /** * optional string status = 11; */ java.lang.String getStatus(); + /** * optional string status = 11; */ com.google.protobuf.ByteString - getStatusBytes(); + getStatusBytes(); - // optional string checksum = 12; /** * optional string checksum = 12; */ boolean hasChecksum(); + /** * optional string checksum = 12; */ java.lang.String getChecksum(); + /** * optional string checksum = 12; */ com.google.protobuf.ByteString - getChecksumBytes(); + getChecksumBytes(); - // optional string assignee_login = 13; /** * optional string assignee_login = 13; */ boolean hasAssigneeLogin(); + /** * optional string assignee_login = 13; */ java.lang.String getAssigneeLogin(); + /** * optional string assignee_login = 13; */ com.google.protobuf.ByteString - getAssigneeLoginBytes(); + getAssigneeLoginBytes(); - // optional int64 creation_date = 14; /** * optional int64 creation_date = 14; */ boolean hasCreationDate(); + /** * optional int64 creation_date = 14; */ @@ -205,16 +219,21 @@ public final class BatchInput { * Protobuf type {@code ServerIssue} */ public static final class ServerIssue extends - com.google.protobuf.GeneratedMessage - implements ServerIssueOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:ServerIssue) + ServerIssueOrBuilder { // Use ServerIssue.newBuilder() to construct. private ServerIssue(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private ServerIssue(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private ServerIssue(boolean noInit) { + this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final ServerIssue defaultInstance; + public static ServerIssue getDefaultInstance() { return defaultInstance; } @@ -224,19 +243,21 @@ public final class BatchInput { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } + private ServerIssue( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -247,34 +268,39 @@ public final class BatchInput { break; default: { if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + extensionRegistry, tag)) { done = true; } break; } case 10: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; - key_ = input.readBytes(); + key_ = bs; break; } case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - moduleKey_ = input.readBytes(); + moduleKey_ = bs; break; } case 26: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000004; - path_ = input.readBytes(); + path_ = bs; break; } case 34: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000008; - ruleRepository_ = input.readBytes(); + ruleRepository_ = bs; break; } case 42: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000010; - ruleKey_ = input.readBytes(); + ruleKey_ = bs; break; } case 48: { @@ -283,8 +309,9 @@ public final class BatchInput { break; } case 58: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000040; - msg_ = input.readBytes(); + msg_ = bs; break; } case 64: { @@ -304,23 +331,27 @@ public final class BatchInput { break; } case 82: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000200; - resolution_ = input.readBytes(); + resolution_ = bs; break; } case 90: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000400; - status_ = input.readBytes(); + status_ = bs; break; } case 98: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000800; - checksum_ = input.readBytes(); + checksum_ = bs; break; } case 106: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00001000; - assigneeLogin_ = input.readBytes(); + assigneeLogin_ = bs; break; } case 112: { @@ -334,33 +365,34 @@ public final class BatchInput { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return org.sonar.batch.protocol.input.BatchInput.internal_static_ServerIssue_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return org.sonar.batch.protocol.input.BatchInput.internal_static_ServerIssue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.input.BatchInput.ServerIssue.class, org.sonar.batch.protocol.input.BatchInput.ServerIssue.Builder.class); + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.input.BatchInput.ServerIssue.class, org.sonar.batch.protocol.input.BatchInput.ServerIssue.Builder.class); } public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public ServerIssue parsePartialFrom( + new com.google.protobuf.AbstractParser() { + public ServerIssue parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServerIssue(input, extensionRegistry); - } - }; + return new ServerIssue(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { @@ -368,15 +400,16 @@ public final class BatchInput { } private int bitField0_; - // optional string key = 1; public static final int KEY_FIELD_NUMBER = 1; private java.lang.Object key_; + /** * optional string key = 1; */ public boolean hasKey() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * optional string key = 1; */ @@ -385,8 +418,8 @@ public final class BatchInput { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { key_ = s; @@ -394,16 +427,17 @@ public final class BatchInput { return s; } } + /** * optional string key = 1; */ public com.google.protobuf.ByteString - getKeyBytes() { + getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); key_ = b; return b; } else { @@ -411,15 +445,16 @@ public final class BatchInput { } } - // optional string module_key = 2; public static final int MODULE_KEY_FIELD_NUMBER = 2; private java.lang.Object moduleKey_; + /** * optional string module_key = 2; */ public boolean hasModuleKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** * optional string module_key = 2; */ @@ -428,8 +463,8 @@ public final class BatchInput { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { moduleKey_ = s; @@ -437,16 +472,17 @@ public final class BatchInput { return s; } } + /** * optional string module_key = 2; */ public com.google.protobuf.ByteString - getModuleKeyBytes() { + getModuleKeyBytes() { java.lang.Object ref = moduleKey_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); moduleKey_ = b; return b; } else { @@ -454,15 +490,16 @@ public final class BatchInput { } } - // optional string path = 3; public static final int PATH_FIELD_NUMBER = 3; private java.lang.Object path_; + /** * optional string path = 3; */ public boolean hasPath() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** * optional string path = 3; */ @@ -471,8 +508,8 @@ public final class BatchInput { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { path_ = s; @@ -480,16 +517,17 @@ public final class BatchInput { return s; } } + /** * optional string path = 3; */ public com.google.protobuf.ByteString - getPathBytes() { + getPathBytes() { java.lang.Object ref = path_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); path_ = b; return b; } else { @@ -497,15 +535,16 @@ public final class BatchInput { } } - // optional string rule_repository = 4; public static final int RULE_REPOSITORY_FIELD_NUMBER = 4; private java.lang.Object ruleRepository_; + /** * optional string rule_repository = 4; */ public boolean hasRuleRepository() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** * optional string rule_repository = 4; */ @@ -514,8 +553,8 @@ public final class BatchInput { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { ruleRepository_ = s; @@ -523,16 +562,17 @@ public final class BatchInput { return s; } } + /** * optional string rule_repository = 4; */ public com.google.protobuf.ByteString - getRuleRepositoryBytes() { + getRuleRepositoryBytes() { java.lang.Object ref = ruleRepository_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); ruleRepository_ = b; return b; } else { @@ -540,15 +580,16 @@ public final class BatchInput { } } - // optional string rule_key = 5; public static final int RULE_KEY_FIELD_NUMBER = 5; private java.lang.Object ruleKey_; + /** * optional string rule_key = 5; */ public boolean hasRuleKey() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** * optional string rule_key = 5; */ @@ -557,8 +598,8 @@ public final class BatchInput { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { ruleKey_ = s; @@ -566,16 +607,17 @@ public final class BatchInput { return s; } } + /** * optional string rule_key = 5; */ public com.google.protobuf.ByteString - getRuleKeyBytes() { + getRuleKeyBytes() { java.lang.Object ref = ruleKey_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); ruleKey_ = b; return b; } else { @@ -583,15 +625,16 @@ public final class BatchInput { } } - // optional int32 line = 6; public static final int LINE_FIELD_NUMBER = 6; private int line_; + /** * optional int32 line = 6; */ public boolean hasLine() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** * optional int32 line = 6; */ @@ -599,15 +642,16 @@ public final class BatchInput { return line_; } - // optional string msg = 7; public static final int MSG_FIELD_NUMBER = 7; private java.lang.Object msg_; + /** * optional string msg = 7; */ public boolean hasMsg() { return ((bitField0_ & 0x00000040) == 0x00000040); } + /** * optional string msg = 7; */ @@ -616,8 +660,8 @@ public final class BatchInput { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { msg_ = s; @@ -625,16 +669,17 @@ public final class BatchInput { return s; } } + /** * optional string msg = 7; */ public com.google.protobuf.ByteString - getMsgBytes() { + getMsgBytes() { java.lang.Object ref = msg_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); msg_ = b; return b; } else { @@ -642,15 +687,16 @@ public final class BatchInput { } } - // optional .Severity severity = 8; public static final int SEVERITY_FIELD_NUMBER = 8; private org.sonar.batch.protocol.Constants.Severity severity_; + /** * optional .Severity severity = 8; */ public boolean hasSeverity() { return ((bitField0_ & 0x00000080) == 0x00000080); } + /** * optional .Severity severity = 8; */ @@ -658,15 +704,16 @@ public final class BatchInput { return severity_; } - // optional bool manual_severity = 9; public static final int MANUAL_SEVERITY_FIELD_NUMBER = 9; private boolean manualSeverity_; + /** * optional bool manual_severity = 9; */ public boolean hasManualSeverity() { return ((bitField0_ & 0x00000100) == 0x00000100); } + /** * optional bool manual_severity = 9; */ @@ -674,15 +721,16 @@ public final class BatchInput { return manualSeverity_; } - // optional string resolution = 10; public static final int RESOLUTION_FIELD_NUMBER = 10; private java.lang.Object resolution_; + /** * optional string resolution = 10; */ public boolean hasResolution() { return ((bitField0_ & 0x00000200) == 0x00000200); } + /** * optional string resolution = 10; */ @@ -691,8 +739,8 @@ public final class BatchInput { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { resolution_ = s; @@ -700,16 +748,17 @@ public final class BatchInput { return s; } } + /** * optional string resolution = 10; */ public com.google.protobuf.ByteString - getResolutionBytes() { + getResolutionBytes() { java.lang.Object ref = resolution_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); resolution_ = b; return b; } else { @@ -717,15 +766,16 @@ public final class BatchInput { } } - // optional string status = 11; public static final int STATUS_FIELD_NUMBER = 11; private java.lang.Object status_; + /** * optional string status = 11; */ public boolean hasStatus() { return ((bitField0_ & 0x00000400) == 0x00000400); } + /** * optional string status = 11; */ @@ -734,8 +784,8 @@ public final class BatchInput { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { status_ = s; @@ -743,16 +793,17 @@ public final class BatchInput { return s; } } + /** * optional string status = 11; */ public com.google.protobuf.ByteString - getStatusBytes() { + getStatusBytes() { java.lang.Object ref = status_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); status_ = b; return b; } else { @@ -760,15 +811,16 @@ public final class BatchInput { } } - // optional string checksum = 12; public static final int CHECKSUM_FIELD_NUMBER = 12; private java.lang.Object checksum_; + /** * optional string checksum = 12; */ public boolean hasChecksum() { return ((bitField0_ & 0x00000800) == 0x00000800); } + /** * optional string checksum = 12; */ @@ -777,8 +829,8 @@ public final class BatchInput { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { checksum_ = s; @@ -786,16 +838,17 @@ public final class BatchInput { return s; } } + /** * optional string checksum = 12; */ public com.google.protobuf.ByteString - getChecksumBytes() { + getChecksumBytes() { java.lang.Object ref = checksum_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); checksum_ = b; return b; } else { @@ -803,15 +856,16 @@ public final class BatchInput { } } - // optional string assignee_login = 13; public static final int ASSIGNEE_LOGIN_FIELD_NUMBER = 13; private java.lang.Object assigneeLogin_; + /** * optional string assignee_login = 13; */ public boolean hasAssigneeLogin() { return ((bitField0_ & 0x00001000) == 0x00001000); } + /** * optional string assignee_login = 13; */ @@ -820,8 +874,8 @@ public final class BatchInput { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { assigneeLogin_ = s; @@ -829,16 +883,17 @@ public final class BatchInput { return s; } } + /** * optional string assignee_login = 13; */ public com.google.protobuf.ByteString - getAssigneeLoginBytes() { + getAssigneeLoginBytes() { java.lang.Object ref = assigneeLogin_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); assigneeLogin_ = b; return b; } else { @@ -846,15 +901,16 @@ public final class BatchInput { } } - // optional int64 creation_date = 14; public static final int CREATION_DATE_FIELD_NUMBER = 14; private long creationDate_; + /** * optional int64 creation_date = 14; */ public boolean hasCreationDate() { return ((bitField0_ & 0x00002000) == 0x00002000); } + /** * optional int64 creation_date = 14; */ @@ -878,17 +934,22 @@ public final class BatchInput { assigneeLogin_ = ""; creationDate_ = 0L; } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getKeyBytes()); @@ -936,9 +997,11 @@ public final class BatchInput { } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { @@ -1003,94 +1066,115 @@ public final class BatchInput { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.sonar.batch.protocol.input.BatchInput.ServerIssue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.sonar.batch.protocol.input.BatchInput.ServerIssue parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static org.sonar.batch.protocol.input.BatchInput.ServerIssue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.sonar.batch.protocol.input.BatchInput.ServerIssue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static org.sonar.batch.protocol.input.BatchInput.ServerIssue parseFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.sonar.batch.protocol.input.BatchInput.ServerIssue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } + public static org.sonar.batch.protocol.input.BatchInput.ServerIssue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.sonar.batch.protocol.input.BatchInput.ServerIssue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.sonar.batch.protocol.input.BatchInput.ServerIssue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.sonar.batch.protocol.input.BatchInput.ServerIssue parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder(org.sonar.batch.protocol.input.BatchInput.ServerIssue prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code ServerIssue} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.sonar.batch.protocol.input.BatchInput.ServerIssueOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:ServerIssue) + org.sonar.batch.protocol.input.BatchInput.ServerIssueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return org.sonar.batch.protocol.input.BatchInput.internal_static_ServerIssue_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return org.sonar.batch.protocol.input.BatchInput.internal_static_ServerIssue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.input.BatchInput.ServerIssue.class, org.sonar.batch.protocol.input.BatchInput.ServerIssue.Builder.class); + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.input.BatchInput.ServerIssue.class, org.sonar.batch.protocol.input.BatchInput.ServerIssue.Builder.class); } // Construct using org.sonar.batch.protocol.input.BatchInput.ServerIssue.newBuilder() @@ -1099,14 +1183,16 @@ public final class BatchInput { } private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -1149,7 +1235,7 @@ public final class BatchInput { } public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + getDescriptorForType() { return org.sonar.batch.protocol.input.BatchInput.internal_static_ServerIssue_descriptor; } @@ -1232,7 +1318,7 @@ public final class BatchInput { public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.sonar.batch.protocol.input.BatchInput.ServerIssue) { - return mergeFrom((org.sonar.batch.protocol.input.BatchInput.ServerIssue)other); + return mergeFrom((org.sonar.batch.protocol.input.BatchInput.ServerIssue) other); } else { super.mergeFrom(other); return this; @@ -1240,7 +1326,8 @@ public final class BatchInput { } public Builder mergeFrom(org.sonar.batch.protocol.input.BatchInput.ServerIssue other) { - if (other == org.sonar.batch.protocol.input.BatchInput.ServerIssue.getDefaultInstance()) return this; + if (other == org.sonar.batch.protocol.input.BatchInput.ServerIssue.getDefaultInstance()) + return this; if (other.hasKey()) { bitField0_ |= 0x00000001; key_ = other.key_; @@ -1312,9 +1399,9 @@ public final class BatchInput { } public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { org.sonar.batch.protocol.input.BatchInput.ServerIssue parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); @@ -1328,59 +1415,67 @@ public final class BatchInput { } return this; } + private int bitField0_; - // optional string key = 1; private java.lang.Object key_ = ""; + /** * optional string key = 1; */ public boolean hasKey() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * optional string key = 1; */ public java.lang.String getKey() { java.lang.Object ref = key_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - key_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + key_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string key = 1; */ public com.google.protobuf.ByteString - getKeyBytes() { + getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string key = 1; */ public Builder setKey( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; key_ = value; onChanged(); return this; } + /** * optional string key = 1; */ @@ -1390,71 +1485,79 @@ public final class BatchInput { onChanged(); return this; } + /** * optional string key = 1; */ public Builder setKeyBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; key_ = value; onChanged(); return this; } - // optional string module_key = 2; private java.lang.Object moduleKey_ = ""; + /** * optional string module_key = 2; */ public boolean hasModuleKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** * optional string module_key = 2; */ public java.lang.String getModuleKey() { java.lang.Object ref = moduleKey_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - moduleKey_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + moduleKey_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string module_key = 2; */ public com.google.protobuf.ByteString - getModuleKeyBytes() { + getModuleKeyBytes() { java.lang.Object ref = moduleKey_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); moduleKey_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string module_key = 2; */ public Builder setModuleKey( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; moduleKey_ = value; onChanged(); return this; } + /** * optional string module_key = 2; */ @@ -1464,71 +1567,79 @@ public final class BatchInput { onChanged(); return this; } + /** * optional string module_key = 2; */ public Builder setModuleKeyBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; moduleKey_ = value; onChanged(); return this; } - // optional string path = 3; private java.lang.Object path_ = ""; + /** * optional string path = 3; */ public boolean hasPath() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** * optional string path = 3; */ public java.lang.String getPath() { java.lang.Object ref = path_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - path_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + path_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string path = 3; */ public com.google.protobuf.ByteString - getPathBytes() { + getPathBytes() { java.lang.Object ref = path_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); path_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string path = 3; */ public Builder setPath( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; path_ = value; onChanged(); return this; } + /** * optional string path = 3; */ @@ -1538,71 +1649,79 @@ public final class BatchInput { onChanged(); return this; } + /** * optional string path = 3; */ public Builder setPathBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; path_ = value; onChanged(); return this; } - // optional string rule_repository = 4; private java.lang.Object ruleRepository_ = ""; + /** * optional string rule_repository = 4; */ public boolean hasRuleRepository() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** * optional string rule_repository = 4; */ public java.lang.String getRuleRepository() { java.lang.Object ref = ruleRepository_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - ruleRepository_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + ruleRepository_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string rule_repository = 4; */ public com.google.protobuf.ByteString - getRuleRepositoryBytes() { + getRuleRepositoryBytes() { java.lang.Object ref = ruleRepository_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); ruleRepository_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string rule_repository = 4; */ public Builder setRuleRepository( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; ruleRepository_ = value; onChanged(); return this; } + /** * optional string rule_repository = 4; */ @@ -1612,71 +1731,79 @@ public final class BatchInput { onChanged(); return this; } + /** * optional string rule_repository = 4; */ public Builder setRuleRepositoryBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; ruleRepository_ = value; onChanged(); return this; } - // optional string rule_key = 5; private java.lang.Object ruleKey_ = ""; + /** * optional string rule_key = 5; */ public boolean hasRuleKey() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** * optional string rule_key = 5; */ public java.lang.String getRuleKey() { java.lang.Object ref = ruleKey_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - ruleKey_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + ruleKey_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string rule_key = 5; */ public com.google.protobuf.ByteString - getRuleKeyBytes() { + getRuleKeyBytes() { java.lang.Object ref = ruleKey_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); ruleKey_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string rule_key = 5; */ public Builder setRuleKey( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; ruleKey_ = value; onChanged(); return this; } + /** * optional string rule_key = 5; */ @@ -1686,34 +1813,37 @@ public final class BatchInput { onChanged(); return this; } + /** * optional string rule_key = 5; */ public Builder setRuleKeyBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; ruleKey_ = value; onChanged(); return this; } - // optional int32 line = 6; - private int line_ ; + private int line_; + /** * optional int32 line = 6; */ public boolean hasLine() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** * optional int32 line = 6; */ public int getLine() { return line_; } + /** * optional int32 line = 6; */ @@ -1723,6 +1853,7 @@ public final class BatchInput { onChanged(); return this; } + /** * optional int32 line = 6; */ @@ -1733,57 +1864,64 @@ public final class BatchInput { return this; } - // optional string msg = 7; private java.lang.Object msg_ = ""; + /** * optional string msg = 7; */ public boolean hasMsg() { return ((bitField0_ & 0x00000040) == 0x00000040); } + /** * optional string msg = 7; */ public java.lang.String getMsg() { java.lang.Object ref = msg_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - msg_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + msg_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string msg = 7; */ public com.google.protobuf.ByteString - getMsgBytes() { + getMsgBytes() { java.lang.Object ref = msg_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); msg_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string msg = 7; */ public Builder setMsg( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; msg_ = value; onChanged(); return this; } + /** * optional string msg = 7; */ @@ -1793,34 +1931,37 @@ public final class BatchInput { onChanged(); return this; } + /** * optional string msg = 7; */ public Builder setMsgBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; msg_ = value; onChanged(); 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; */ public boolean hasSeverity() { return ((bitField0_ & 0x00000080) == 0x00000080); } + /** * optional .Severity severity = 8; */ public org.sonar.batch.protocol.Constants.Severity getSeverity() { return severity_; } + /** * optional .Severity severity = 8; */ @@ -1833,6 +1974,7 @@ public final class BatchInput { onChanged(); return this; } + /** * optional .Severity severity = 8; */ @@ -1843,20 +1985,22 @@ public final class BatchInput { return this; } - // optional bool manual_severity = 9; - private boolean manualSeverity_ ; + private boolean manualSeverity_; + /** * optional bool manual_severity = 9; */ public boolean hasManualSeverity() { return ((bitField0_ & 0x00000100) == 0x00000100); } + /** * optional bool manual_severity = 9; */ public boolean getManualSeverity() { return manualSeverity_; } + /** * optional bool manual_severity = 9; */ @@ -1866,6 +2010,7 @@ public final class BatchInput { onChanged(); return this; } + /** * optional bool manual_severity = 9; */ @@ -1876,57 +2021,64 @@ public final class BatchInput { return this; } - // optional string resolution = 10; private java.lang.Object resolution_ = ""; + /** * optional string resolution = 10; */ public boolean hasResolution() { return ((bitField0_ & 0x00000200) == 0x00000200); } + /** * optional string resolution = 10; */ public java.lang.String getResolution() { java.lang.Object ref = resolution_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - resolution_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + resolution_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string resolution = 10; */ public com.google.protobuf.ByteString - getResolutionBytes() { + getResolutionBytes() { java.lang.Object ref = resolution_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); resolution_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string resolution = 10; */ public Builder setResolution( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; resolution_ = value; onChanged(); return this; } + /** * optional string resolution = 10; */ @@ -1936,71 +2088,79 @@ public final class BatchInput { onChanged(); return this; } + /** * optional string resolution = 10; */ public Builder setResolutionBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; resolution_ = value; onChanged(); return this; } - // optional string status = 11; private java.lang.Object status_ = ""; + /** * optional string status = 11; */ public boolean hasStatus() { return ((bitField0_ & 0x00000400) == 0x00000400); } + /** * optional string status = 11; */ public java.lang.String getStatus() { java.lang.Object ref = status_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - status_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + status_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string status = 11; */ public com.google.protobuf.ByteString - getStatusBytes() { + getStatusBytes() { java.lang.Object ref = status_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); status_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string status = 11; */ public Builder setStatus( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; status_ = value; onChanged(); return this; } + /** * optional string status = 11; */ @@ -2010,71 +2170,79 @@ public final class BatchInput { onChanged(); return this; } + /** * optional string status = 11; */ public Builder setStatusBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; status_ = value; onChanged(); return this; } - // optional string checksum = 12; private java.lang.Object checksum_ = ""; + /** * optional string checksum = 12; */ public boolean hasChecksum() { return ((bitField0_ & 0x00000800) == 0x00000800); } + /** * optional string checksum = 12; */ public java.lang.String getChecksum() { java.lang.Object ref = checksum_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - checksum_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + checksum_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string checksum = 12; */ public com.google.protobuf.ByteString - getChecksumBytes() { + getChecksumBytes() { java.lang.Object ref = checksum_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); checksum_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string checksum = 12; */ public Builder setChecksum( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000800; + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; checksum_ = value; onChanged(); return this; } + /** * optional string checksum = 12; */ @@ -2084,71 +2252,79 @@ public final class BatchInput { onChanged(); return this; } + /** * optional string checksum = 12; */ public Builder setChecksumBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000800; + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; checksum_ = value; onChanged(); return this; } - // optional string assignee_login = 13; private java.lang.Object assigneeLogin_ = ""; + /** * optional string assignee_login = 13; */ public boolean hasAssigneeLogin() { return ((bitField0_ & 0x00001000) == 0x00001000); } + /** * optional string assignee_login = 13; */ public java.lang.String getAssigneeLogin() { java.lang.Object ref = assigneeLogin_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - assigneeLogin_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + assigneeLogin_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string assignee_login = 13; */ public com.google.protobuf.ByteString - getAssigneeLoginBytes() { + getAssigneeLoginBytes() { java.lang.Object ref = assigneeLogin_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); assigneeLogin_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string assignee_login = 13; */ public Builder setAssigneeLogin( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00001000; + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; assigneeLogin_ = value; onChanged(); return this; } + /** * optional string assignee_login = 13; */ @@ -2158,34 +2334,37 @@ public final class BatchInput { onChanged(); return this; } + /** * optional string assignee_login = 13; */ public Builder setAssigneeLoginBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00001000; + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; assigneeLogin_ = value; onChanged(); return this; } - // optional int64 creation_date = 14; - private long creationDate_ ; + private long creationDate_; + /** * optional int64 creation_date = 14; */ public boolean hasCreationDate() { return ((bitField0_ & 0x00002000) == 0x00002000); } + /** * optional int64 creation_date = 14; */ public long getCreationDate() { return creationDate_; } + /** * optional int64 creation_date = 14; */ @@ -2195,6 +2374,7 @@ public final class BatchInput { onChanged(); return this; } + /** * optional int64 creation_date = 14; */ @@ -2216,49 +2396,48 @@ public final class BatchInput { // @@protoc_insertion_point(class_scope:ServerIssue) } - private static com.google.protobuf.Descriptors.Descriptor - internal_static_ServerIssue_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_ServerIssue_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_ServerIssue_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_ServerIssue_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { + getDescriptor() { return descriptor; } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n\021batch_input.proto\032\017constants.proto\"\235\002\n" + - "\013ServerIssue\022\013\n\003key\030\001 \001(\t\022\022\n\nmodule_key\030" + - "\002 \001(\t\022\014\n\004path\030\003 \001(\t\022\027\n\017rule_repository\030\004" + - " \001(\t\022\020\n\010rule_key\030\005 \001(\t\022\014\n\004line\030\006 \001(\005\022\013\n\003" + - "msg\030\007 \001(\t\022\033\n\010severity\030\010 \001(\0162\t.Severity\022\027" + - "\n\017manual_severity\030\t \001(\010\022\022\n\nresolution\030\n " + - "\001(\t\022\016\n\006status\030\013 \001(\t\022\020\n\010checksum\030\014 \001(\t\022\026\n" + - "\016assignee_login\030\r \001(\t\022\025\n\rcreation_date\030\016" + - " \001(\003B\"\n\036org.sonar.batch.protocol.inputH\001" + "\013ServerIssue\022\013\n\003key\030\001 \001(\t\022\022\n\nmodule_key\030" + + "\002 \001(\t\022\014\n\004path\030\003 \001(\t\022\027\n\017rule_repository\030\004" + + " \001(\t\022\020\n\010rule_key\030\005 \001(\t\022\014\n\004line\030\006 \001(\005\022\013\n\003" + + "msg\030\007 \001(\t\022\033\n\010severity\030\010 \001(\0162\t.Severity\022\027" + + "\n\017manual_severity\030\t \001(\010\022\022\n\nresolution\030\n " + + "\001(\t\022\016\n\006status\030\013 \001(\t\022\020\n\010checksum\030\014 \001(\t\022\026\n" + + "\016assignee_login\030\r \001(\t\022\025\n\rcreation_date\030\016" + + " \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) { + 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(), + 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 c2d7821b918..7a41c5dbbc3 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 @@ -4,49 +4,53 @@ package org.sonar.batch.protocol.output; public final class BatchReport { - private BatchReport() {} + private BatchReport() { + } + public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { + com.google.protobuf.ExtensionRegistry registry) { } - public interface MetadataOrBuilder - extends com.google.protobuf.MessageOrBuilder { - // optional int64 analysis_date = 1; + public interface MetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:Metadata) + com.google.protobuf.MessageOrBuilder { + /** * optional int64 analysis_date = 1; */ boolean hasAnalysisDate(); + /** * optional int64 analysis_date = 1; */ long getAnalysisDate(); - // optional string project_key = 2; /** * optional string project_key = 2; */ boolean hasProjectKey(); + /** * optional string project_key = 2; */ java.lang.String getProjectKey(); + /** * optional string project_key = 2; */ com.google.protobuf.ByteString - getProjectKeyBytes(); + getProjectKeyBytes(); - // optional int32 root_component_ref = 3; /** * optional int32 root_component_ref = 3; */ boolean hasRootComponentRef(); + /** * optional int32 root_component_ref = 3; */ int getRootComponentRef(); - // optional int64 snapshot_id = 4; /** * optional int64 snapshot_id = 4; * @@ -55,6 +59,7 @@ public final class BatchReport { * */ boolean hasSnapshotId(); + /** * optional int64 snapshot_id = 4; * @@ -64,11 +69,11 @@ public final class BatchReport { */ long getSnapshotId(); - // optional int32 deleted_components_count = 5; /** * optional int32 deleted_components_count = 5; */ boolean hasDeletedComponentsCount(); + /** * optional int32 deleted_components_count = 5; */ @@ -78,16 +83,21 @@ public final class BatchReport { * Protobuf type {@code Metadata} */ public static final class Metadata extends - com.google.protobuf.GeneratedMessage - implements MetadataOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Metadata) + MetadataOrBuilder { // Use Metadata.newBuilder() to construct. private Metadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private Metadata(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private Metadata(boolean noInit) { + this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final Metadata defaultInstance; + public static Metadata getDefaultInstance() { return defaultInstance; } @@ -97,19 +107,21 @@ public final class BatchReport { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } + private Metadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -120,7 +132,7 @@ public final class BatchReport { break; default: { if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + extensionRegistry, tag)) { done = true; } break; @@ -131,8 +143,9 @@ public final class BatchReport { break; } case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - projectKey_ = input.readBytes(); + projectKey_ = bs; break; } case 24: { @@ -156,33 +169,34 @@ public final class BatchReport { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Metadata_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Metadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Metadata.class, org.sonar.batch.protocol.output.BatchReport.Metadata.Builder.class); + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.Metadata.class, org.sonar.batch.protocol.output.BatchReport.Metadata.Builder.class); } public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Metadata parsePartialFrom( + new com.google.protobuf.AbstractParser() { + public Metadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Metadata(input, extensionRegistry); - } - }; + return new Metadata(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { @@ -190,15 +204,16 @@ public final class BatchReport { } private int bitField0_; - // optional int64 analysis_date = 1; public static final int ANALYSIS_DATE_FIELD_NUMBER = 1; private long analysisDate_; + /** * optional int64 analysis_date = 1; */ public boolean hasAnalysisDate() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * optional int64 analysis_date = 1; */ @@ -206,15 +221,16 @@ 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_; + /** * optional string project_key = 2; */ public boolean hasProjectKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** * optional string project_key = 2; */ @@ -223,8 +239,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { projectKey_ = s; @@ -232,16 +248,17 @@ public final class BatchReport { return s; } } + /** * optional string project_key = 2; */ public com.google.protobuf.ByteString - getProjectKeyBytes() { + getProjectKeyBytes() { java.lang.Object ref = projectKey_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); projectKey_ = b; return b; } else { @@ -249,15 +266,16 @@ public final class BatchReport { } } - // optional int32 root_component_ref = 3; public static final int ROOT_COMPONENT_REF_FIELD_NUMBER = 3; private int rootComponentRef_; + /** * optional int32 root_component_ref = 3; */ public boolean hasRootComponentRef() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** * optional int32 root_component_ref = 3; */ @@ -265,9 +283,9 @@ public final class BatchReport { return rootComponentRef_; } - // optional int64 snapshot_id = 4; public static final int SNAPSHOT_ID_FIELD_NUMBER = 4; private long snapshotId_; + /** * optional int64 snapshot_id = 4; * @@ -278,6 +296,7 @@ public final class BatchReport { public boolean hasSnapshotId() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** * optional int64 snapshot_id = 4; * @@ -289,15 +308,16 @@ 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_; + /** * optional int32 deleted_components_count = 5; */ public boolean hasDeletedComponentsCount() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** * optional int32 deleted_components_count = 5; */ @@ -312,17 +332,22 @@ public final class BatchReport { snapshotId_ = 0L; deletedComponentsCount_ = 0; } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt64(1, analysisDate_); @@ -343,9 +368,11 @@ public final class BatchReport { } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { @@ -374,94 +401,115 @@ public final class BatchReport { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.sonar.batch.protocol.output.BatchReport.Metadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.sonar.batch.protocol.output.BatchReport.Metadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static org.sonar.batch.protocol.output.BatchReport.Metadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.sonar.batch.protocol.output.BatchReport.Metadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static org.sonar.batch.protocol.output.BatchReport.Metadata parseFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.sonar.batch.protocol.output.BatchReport.Metadata parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } + public static org.sonar.batch.protocol.output.BatchReport.Metadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.sonar.batch.protocol.output.BatchReport.Metadata parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.sonar.batch.protocol.output.BatchReport.Metadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.sonar.batch.protocol.output.BatchReport.Metadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Metadata prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code Metadata} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.sonar.batch.protocol.output.BatchReport.MetadataOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:Metadata) + org.sonar.batch.protocol.output.BatchReport.MetadataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Metadata_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Metadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Metadata.class, org.sonar.batch.protocol.output.BatchReport.Metadata.Builder.class); + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.Metadata.class, org.sonar.batch.protocol.output.BatchReport.Metadata.Builder.class); } // Construct using org.sonar.batch.protocol.output.BatchReport.Metadata.newBuilder() @@ -470,14 +518,16 @@ public final class BatchReport { } private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -502,7 +552,7 @@ public final class BatchReport { } public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + getDescriptorForType() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Metadata_descriptor; } @@ -549,7 +599,7 @@ public final class BatchReport { public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.sonar.batch.protocol.output.BatchReport.Metadata) { - return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Metadata)other); + return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Metadata) other); } else { super.mergeFrom(other); return this; @@ -557,7 +607,8 @@ public final class BatchReport { } public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Metadata other) { - if (other == org.sonar.batch.protocol.output.BatchReport.Metadata.getDefaultInstance()) return this; + if (other == org.sonar.batch.protocol.output.BatchReport.Metadata.getDefaultInstance()) + return this; if (other.hasAnalysisDate()) { setAnalysisDate(other.getAnalysisDate()); } @@ -584,9 +635,9 @@ public final class BatchReport { } public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { org.sonar.batch.protocol.output.BatchReport.Metadata parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); @@ -600,22 +651,25 @@ public final class BatchReport { } return this; } + private int bitField0_; - // optional int64 analysis_date = 1; - private long analysisDate_ ; + private long analysisDate_; + /** * optional int64 analysis_date = 1; */ public boolean hasAnalysisDate() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * optional int64 analysis_date = 1; */ public long getAnalysisDate() { return analysisDate_; } + /** * optional int64 analysis_date = 1; */ @@ -625,6 +679,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional int64 analysis_date = 1; */ @@ -635,57 +690,64 @@ public final class BatchReport { return this; } - // optional string project_key = 2; private java.lang.Object projectKey_ = ""; + /** * optional string project_key = 2; */ public boolean hasProjectKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** * optional string project_key = 2; */ public java.lang.String getProjectKey() { java.lang.Object ref = projectKey_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - projectKey_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + projectKey_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string project_key = 2; */ public com.google.protobuf.ByteString - getProjectKeyBytes() { + getProjectKeyBytes() { java.lang.Object ref = projectKey_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); projectKey_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string project_key = 2; */ public Builder setProjectKey( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; projectKey_ = value; onChanged(); return this; } + /** * optional string project_key = 2; */ @@ -695,34 +757,37 @@ public final class BatchReport { onChanged(); return this; } + /** * optional string project_key = 2; */ public Builder setProjectKeyBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; projectKey_ = value; onChanged(); return this; } - // optional int32 root_component_ref = 3; - private int rootComponentRef_ ; + private int rootComponentRef_; + /** * optional int32 root_component_ref = 3; */ public boolean hasRootComponentRef() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** * optional int32 root_component_ref = 3; */ public int getRootComponentRef() { return rootComponentRef_; } + /** * optional int32 root_component_ref = 3; */ @@ -732,6 +797,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional int32 root_component_ref = 3; */ @@ -742,8 +808,8 @@ public final class BatchReport { return this; } - // optional int64 snapshot_id = 4; - private long snapshotId_ ; + private long snapshotId_; + /** * optional int64 snapshot_id = 4; * @@ -754,6 +820,7 @@ public final class BatchReport { public boolean hasSnapshotId() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** * optional int64 snapshot_id = 4; * @@ -764,6 +831,7 @@ public final class BatchReport { public long getSnapshotId() { return snapshotId_; } + /** * optional int64 snapshot_id = 4; * @@ -777,6 +845,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional int64 snapshot_id = 4; * @@ -791,20 +860,22 @@ public final class BatchReport { return this; } - // optional int32 deleted_components_count = 5; - private int deletedComponentsCount_ ; + private int deletedComponentsCount_; + /** * optional int32 deleted_components_count = 5; */ public boolean hasDeletedComponentsCount() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** * optional int32 deleted_components_count = 5; */ public int getDeletedComponentsCount() { return deletedComponentsCount_; } + /** * optional int32 deleted_components_count = 5; */ @@ -814,6 +885,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional int32 deleted_components_count = 5; */ @@ -835,167 +907,79 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Metadata) } - public interface ComponentOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional int32 ref = 1; - /** - * optional int32 ref = 1; - */ - boolean hasRef(); - /** - * optional int32 ref = 1; - */ - int getRef(); - - // optional string path = 2; - /** - * optional string path = 2; - */ - boolean hasPath(); - /** - * optional string path = 2; - */ - java.lang.String getPath(); - /** - * optional string path = 2; - */ - com.google.protobuf.ByteString - getPathBytes(); - - // optional string name = 3; - /** - * optional string name = 3; - */ - boolean hasName(); - /** - * optional string name = 3; - */ - java.lang.String getName(); - /** - * optional string name = 3; - */ - com.google.protobuf.ByteString - getNameBytes(); + public interface ComponentLinkOrBuilder extends + // @@protoc_insertion_point(interface_extends:ComponentLink) + com.google.protobuf.MessageOrBuilder { - // optional .ComponentType type = 4; /** - * optional .ComponentType type = 4; + * optional .ComponentLinkType type = 1; */ boolean hasType(); - /** - * optional .ComponentType type = 4; - */ - org.sonar.batch.protocol.Constants.ComponentType getType(); - - // optional bool is_test = 5; - /** - * optional bool is_test = 5; - */ - boolean hasIsTest(); - /** - * optional bool is_test = 5; - */ - boolean getIsTest(); - // optional string language = 6; - /** - * optional string language = 6; - */ - boolean hasLanguage(); - /** - * optional string language = 6; - */ - java.lang.String getLanguage(); /** - * optional string language = 6; + * optional .ComponentLinkType type = 1; */ - com.google.protobuf.ByteString - getLanguageBytes(); + org.sonar.batch.protocol.Constants.ComponentLinkType getType(); - // repeated int32 child_refs = 7 [packed = true]; - /** - * repeated int32 child_refs = 7 [packed = true]; - */ - java.util.List getChildRefsList(); - /** - * repeated int32 child_refs = 7 [packed = true]; - */ - int getChildRefsCount(); /** - * repeated int32 child_refs = 7 [packed = true]; + * optional string href = 2; */ - int getChildRefs(int index); + boolean hasHref(); - // optional int32 snapshot_id = 8; - /** - * optional int32 snapshot_id = 8; - * - *
-     * temporary fields during development of computation stack
-     * 
- */ - boolean hasSnapshotId(); /** - * optional int32 snapshot_id = 8; - * - *
-     * temporary fields during development of computation stack
-     * 
+ * optional string href = 2; */ - int getSnapshotId(); + java.lang.String getHref(); - // optional string uuid = 9; - /** - * optional string uuid = 9; - */ - boolean hasUuid(); - /** - * optional string uuid = 9; - */ - java.lang.String getUuid(); /** - * optional string uuid = 9; + * optional string href = 2; */ com.google.protobuf.ByteString - getUuidBytes(); + getHrefBytes(); } /** - * Protobuf type {@code Component} + * Protobuf type {@code ComponentLink} */ - public static final class Component extends - com.google.protobuf.GeneratedMessage - implements ComponentOrBuilder { - // Use Component.newBuilder() to construct. - private Component(com.google.protobuf.GeneratedMessage.Builder builder) { + public static final class ComponentLink extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:ComponentLink) + ComponentLinkOrBuilder { + // Use ComponentLink.newBuilder() to construct. + private ComponentLink(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private Component(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final Component defaultInstance; - public static Component getDefaultInstance() { + private ComponentLink(boolean noInit) { + this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + + private static final ComponentLink defaultInstance; + + public static ComponentLink getDefaultInstance() { return defaultInstance; } - public Component getDefaultInstanceForType() { + public ComponentLink getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } - private Component( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + + private ComponentLink( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -1006,52 +990,802 @@ public final class BatchReport { break; default: { if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + extensionRegistry, tag)) { done = true; } break; } case 8: { - bitField0_ |= 0x00000001; - ref_ = input.readInt32(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - path_ = input.readBytes(); - break; - } - case 26: { - bitField0_ |= 0x00000004; - name_ = input.readBytes(); - break; - } - case 32: { int rawValue = input.readEnum(); - org.sonar.batch.protocol.Constants.ComponentType value = org.sonar.batch.protocol.Constants.ComponentType.valueOf(rawValue); + org.sonar.batch.protocol.Constants.ComponentLinkType value = org.sonar.batch.protocol.Constants.ComponentLinkType.valueOf(rawValue); if (value == null) { - unknownFields.mergeVarintField(4, rawValue); + unknownFields.mergeVarintField(1, rawValue); } else { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000001; type_ = value; } break; } - case 40: { - bitField0_ |= 0x00000010; - isTest_ = input.readBool(); - break; - } - case 50: { - bitField0_ |= 0x00000020; - language_ = input.readBytes(); + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + href_ = bs; break; } - case 56: { - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - childRefs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_ComponentLink_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_ComponentLink_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.ComponentLink.class, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ComponentLink parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ComponentLink(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private org.sonar.batch.protocol.Constants.ComponentLinkType type_; + + /** + * optional .ComponentLinkType type = 1; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + + /** + * optional .ComponentLinkType type = 1; + */ + public org.sonar.batch.protocol.Constants.ComponentLinkType getType() { + return type_; + } + + public static final int HREF_FIELD_NUMBER = 2; + private java.lang.Object href_; + + /** + * optional string href = 2; + */ + public boolean hasHref() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + + /** + * optional string href = 2; + */ + public java.lang.String getHref() { + java.lang.Object ref = href_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + href_ = s; + } + return s; + } + } + + /** + * optional string href = 2; + */ + public com.google.protobuf.ByteString + getHrefBytes() { + java.lang.Object ref = href_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + href_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + type_ = org.sonar.batch.protocol.Constants.ComponentLinkType.HOME; + href_ = ""; + } + + private byte memoizedIsInitialized = -1; + + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getHrefBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) + return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getHrefBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.ComponentLink prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * 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 { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_ComponentLink_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_ComponentLink_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.ComponentLink.class, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder.class); + } + + // Construct using org.sonar.batch.protocol.output.BatchReport.ComponentLink.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + type_ = org.sonar.batch.protocol.Constants.ComponentLinkType.HOME; + bitField0_ = (bitField0_ & ~0x00000001); + href_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_ComponentLink_descriptor; + } + + public org.sonar.batch.protocol.output.BatchReport.ComponentLink getDefaultInstanceForType() { + return org.sonar.batch.protocol.output.BatchReport.ComponentLink.getDefaultInstance(); + } + + public org.sonar.batch.protocol.output.BatchReport.ComponentLink build() { + org.sonar.batch.protocol.output.BatchReport.ComponentLink result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.sonar.batch.protocol.output.BatchReport.ComponentLink buildPartial() { + org.sonar.batch.protocol.output.BatchReport.ComponentLink result = new org.sonar.batch.protocol.output.BatchReport.ComponentLink(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.href_ = href_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.sonar.batch.protocol.output.BatchReport.ComponentLink) { + return mergeFrom((org.sonar.batch.protocol.output.BatchReport.ComponentLink) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.ComponentLink other) { + if (other == org.sonar.batch.protocol.output.BatchReport.ComponentLink.getDefaultInstance()) + return this; + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasHref()) { + bitField0_ |= 0x00000002; + href_ = other.href_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.sonar.batch.protocol.output.BatchReport.ComponentLink parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.sonar.batch.protocol.output.BatchReport.ComponentLink) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private org.sonar.batch.protocol.Constants.ComponentLinkType type_ = org.sonar.batch.protocol.Constants.ComponentLinkType.HOME; + + /** + * optional .ComponentLinkType type = 1; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + + /** + * optional .ComponentLinkType type = 1; + */ + public org.sonar.batch.protocol.Constants.ComponentLinkType getType() { + return type_; + } + + /** + * optional .ComponentLinkType type = 1; + */ + public Builder setType(org.sonar.batch.protocol.Constants.ComponentLinkType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value; + onChanged(); + return this; + } + + /** + * optional .ComponentLinkType type = 1; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = org.sonar.batch.protocol.Constants.ComponentLinkType.HOME; + onChanged(); + return this; + } + + private java.lang.Object href_ = ""; + + /** + * optional string href = 2; + */ + public boolean hasHref() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + + /** + * optional string href = 2; + */ + 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; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * optional string href = 2; + */ + public com.google.protobuf.ByteString + getHrefBytes() { + java.lang.Object ref = href_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + href_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * optional string href = 2; + */ + public Builder setHref( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + href_ = value; + onChanged(); + return this; + } + + /** + * optional string href = 2; + */ + public Builder clearHref() { + bitField0_ = (bitField0_ & ~0x00000002); + href_ = getDefaultInstance().getHref(); + onChanged(); + return this; + } + + /** + * optional string href = 2; + */ + public Builder setHrefBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + href_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:ComponentLink) + } + + static { + defaultInstance = new ComponentLink(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:ComponentLink) + } + + public interface ComponentOrBuilder extends + // @@protoc_insertion_point(interface_extends:Component) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 ref = 1; + */ + boolean hasRef(); + + /** + * optional int32 ref = 1; + */ + int getRef(); + + /** + * optional string path = 2; + */ + boolean hasPath(); + + /** + * optional string path = 2; + */ + java.lang.String getPath(); + + /** + * optional string path = 2; + */ + com.google.protobuf.ByteString + getPathBytes(); + + /** + * optional string name = 3; + */ + boolean hasName(); + + /** + * optional string name = 3; + */ + java.lang.String getName(); + + /** + * optional string name = 3; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional .ComponentType type = 4; + */ + boolean hasType(); + + /** + * optional .ComponentType type = 4; + */ + org.sonar.batch.protocol.Constants.ComponentType getType(); + + /** + * optional bool is_test = 5; + */ + boolean hasIsTest(); + + /** + * optional bool is_test = 5; + */ + boolean getIsTest(); + + /** + * optional string language = 6; + */ + boolean hasLanguage(); + + /** + * optional string language = 6; + */ + java.lang.String getLanguage(); + + /** + * optional string language = 6; + */ + com.google.protobuf.ByteString + getLanguageBytes(); + + /** + * repeated int32 child_refs = 7 [packed = true]; + */ + java.util.List getChildRefsList(); + + /** + * repeated int32 child_refs = 7 [packed = true]; + */ + int getChildRefsCount(); + + /** + * repeated int32 child_refs = 7 [packed = true]; + */ + int getChildRefs(int index); + + /** + * repeated .ComponentLink links = 10; + */ + java.util.List + getLinksList(); + + /** + * repeated .ComponentLink links = 10; + */ + org.sonar.batch.protocol.output.BatchReport.ComponentLink getLinks(int index); + + /** + * repeated .ComponentLink links = 10; + */ + int getLinksCount(); + + /** + * repeated .ComponentLink links = 10; + */ + java.util.List + getLinksOrBuilderList(); + + /** + * repeated .ComponentLink links = 10; + */ + org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder getLinksOrBuilder( + int index); + + /** + * optional int32 snapshot_id = 8; + * + *
+     * temporary fields during development of computation stack
+     * 
+ */ + boolean hasSnapshotId(); + + /** + * optional int32 snapshot_id = 8; + * + *
+     * temporary fields during development of computation stack
+     * 
+ */ + int getSnapshotId(); + + /** + * optional string uuid = 9; + */ + boolean hasUuid(); + + /** + * optional string uuid = 9; + */ + java.lang.String getUuid(); + + /** + * optional string uuid = 9; + */ + com.google.protobuf.ByteString + getUuidBytes(); + } + /** + * Protobuf type {@code Component} + */ + public static final class Component extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Component) + ComponentOrBuilder { + // Use Component.newBuilder() to construct. + private Component(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + + private Component(boolean noInit) { + this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + + private static final Component defaultInstance; + + public static Component getDefaultInstance() { + return defaultInstance; + } + + public Component getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + + private Component( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + ref_ = input.readInt32(); + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + path_ = bs; + break; + } + case 26: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000004; + name_ = bs; + break; + } + case 32: { + int rawValue = input.readEnum(); + org.sonar.batch.protocol.Constants.ComponentType value = org.sonar.batch.protocol.Constants.ComponentType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(4, rawValue); + } else { + bitField0_ |= 0x00000008; + type_ = value; + } + break; + } + case 40: { + bitField0_ |= 0x00000010; + isTest_ = input.readBool(); + break; + } + case 50: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000020; + language_ = bs; + break; + } + case 56: { + if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + childRefs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000040; + } childRefs_.add(input.readInt32()); break; } @@ -1074,8 +1808,17 @@ public final class BatchReport { break; } case 74: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000080; - uuid_ = input.readBytes(); + uuid_ = bs; + break; + } + case 82: { + if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + links_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000080; + } + links_.add(input.readMessage(org.sonar.batch.protocol.output.BatchReport.ComponentLink.PARSER, extensionRegistry)); break; } } @@ -1084,36 +1827,40 @@ public final class BatchReport { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { childRefs_ = java.util.Collections.unmodifiableList(childRefs_); } + if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + links_ = java.util.Collections.unmodifiableList(links_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Component_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Component_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Component.class, org.sonar.batch.protocol.output.BatchReport.Component.Builder.class); + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.Component.class, org.sonar.batch.protocol.output.BatchReport.Component.Builder.class); } public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Component parsePartialFrom( + new com.google.protobuf.AbstractParser() { + public Component parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Component(input, extensionRegistry); - } - }; + return new Component(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { @@ -1121,15 +1868,16 @@ public final class BatchReport { } private int bitField0_; - // optional int32 ref = 1; public static final int REF_FIELD_NUMBER = 1; private int ref_; + /** * optional int32 ref = 1; */ public boolean hasRef() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * optional int32 ref = 1; */ @@ -1137,15 +1885,16 @@ public final class BatchReport { return ref_; } - // optional string path = 2; public static final int PATH_FIELD_NUMBER = 2; private java.lang.Object path_; + /** * optional string path = 2; */ public boolean hasPath() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** * optional string path = 2; */ @@ -1154,8 +1903,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { path_ = s; @@ -1163,16 +1912,17 @@ public final class BatchReport { return s; } } + /** * optional string path = 2; */ public com.google.protobuf.ByteString - getPathBytes() { + getPathBytes() { java.lang.Object ref = path_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); path_ = b; return b; } else { @@ -1180,15 +1930,16 @@ public final class BatchReport { } } - // optional string name = 3; public static final int NAME_FIELD_NUMBER = 3; private java.lang.Object name_; + /** * optional string name = 3; */ public boolean hasName() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** * optional string name = 3; */ @@ -1197,8 +1948,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { name_ = s; @@ -1206,16 +1957,17 @@ public final class BatchReport { return s; } } + /** * optional string name = 3; */ public com.google.protobuf.ByteString - getNameBytes() { + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -1223,15 +1975,16 @@ public final class BatchReport { } } - // optional .ComponentType type = 4; public static final int TYPE_FIELD_NUMBER = 4; private org.sonar.batch.protocol.Constants.ComponentType type_; + /** * optional .ComponentType type = 4; */ public boolean hasType() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** * optional .ComponentType type = 4; */ @@ -1239,15 +1992,16 @@ public final class BatchReport { return type_; } - // optional bool is_test = 5; public static final int IS_TEST_FIELD_NUMBER = 5; private boolean isTest_; + /** * optional bool is_test = 5; */ public boolean hasIsTest() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** * optional bool is_test = 5; */ @@ -1255,15 +2009,16 @@ public final class BatchReport { return isTest_; } - // optional string language = 6; public static final int LANGUAGE_FIELD_NUMBER = 6; private java.lang.Object language_; + /** * optional string language = 6; */ public boolean hasLanguage() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** * optional string language = 6; */ @@ -1272,8 +2027,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { language_ = s; @@ -1281,16 +2036,17 @@ public final class BatchReport { return s; } } + /** * optional string language = 6; */ public com.google.protobuf.ByteString - getLanguageBytes() { + getLanguageBytes() { java.lang.Object ref = language_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); language_ = b; return b; } else { @@ -1298,33 +2054,76 @@ public final class BatchReport { } } - // repeated int32 child_refs = 7 [packed = true]; public static final int CHILD_REFS_FIELD_NUMBER = 7; private java.util.List childRefs_; + /** * repeated int32 child_refs = 7 [packed = true]; */ public java.util.List - getChildRefsList() { + getChildRefsList() { return childRefs_; } + /** * repeated int32 child_refs = 7 [packed = true]; */ public int getChildRefsCount() { return childRefs_.size(); } + /** * repeated int32 child_refs = 7 [packed = true]; */ public int getChildRefs(int index) { return childRefs_.get(index); } + private int childRefsMemoizedSerializedSize = -1; - // optional int32 snapshot_id = 8; + public static final int LINKS_FIELD_NUMBER = 10; + private java.util.List links_; + + /** + * repeated .ComponentLink links = 10; + */ + public java.util.List getLinksList() { + return links_; + } + + /** + * repeated .ComponentLink links = 10; + */ + public java.util.List + getLinksOrBuilderList() { + return links_; + } + + /** + * repeated .ComponentLink links = 10; + */ + public int getLinksCount() { + return links_.size(); + } + + /** + * repeated .ComponentLink links = 10; + */ + public org.sonar.batch.protocol.output.BatchReport.ComponentLink getLinks(int index) { + return links_.get(index); + } + + /** + * repeated .ComponentLink links = 10; + */ + public org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder getLinksOrBuilder( + int index) { + return links_.get(index); + } + public static final int SNAPSHOT_ID_FIELD_NUMBER = 8; private int snapshotId_; + /** * optional int32 snapshot_id = 8; * @@ -1335,6 +2134,7 @@ public final class BatchReport { public boolean hasSnapshotId() { return ((bitField0_ & 0x00000040) == 0x00000040); } + /** * optional int32 snapshot_id = 8; * @@ -1346,15 +2146,16 @@ public final class BatchReport { return snapshotId_; } - // optional string uuid = 9; public static final int UUID_FIELD_NUMBER = 9; private java.lang.Object uuid_; + /** * optional string uuid = 9; */ public boolean hasUuid() { return ((bitField0_ & 0x00000080) == 0x00000080); } + /** * optional string uuid = 9; */ @@ -1363,8 +2164,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { uuid_ = s; @@ -1372,16 +2173,17 @@ public final class BatchReport { return s; } } + /** * optional string uuid = 9; */ public com.google.protobuf.ByteString - getUuidBytes() { + getUuidBytes() { java.lang.Object ref = uuid_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); uuid_ = b; return b; } else { @@ -1397,20 +2199,26 @@ public final class BatchReport { isTest_ = false; language_ = ""; childRefs_ = java.util.Collections.emptyList(); + links_ = java.util.Collections.emptyList(); snapshotId_ = 0; uuid_ = ""; } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt32(1, ref_); @@ -1443,13 +2251,18 @@ public final class BatchReport { if (((bitField0_ & 0x00000080) == 0x00000080)) { output.writeBytes(9, getUuidBytes()); } + for (int i = 0; i < links_.size(); i++) { + output.writeMessage(10, links_.get(i)); + } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { @@ -1486,7 +2299,7 @@ public final class BatchReport { if (!getChildRefsList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); + .computeInt32SizeNoTag(dataSize); } childRefsMemoizedSerializedSize = dataSize; } @@ -1498,100 +2311,125 @@ public final class BatchReport { size += com.google.protobuf.CodedOutputStream .computeBytesSize(9, getUuidBytes()); } + for (int i = 0; i < links_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, links_.get(i)); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } + public static org.sonar.batch.protocol.output.BatchReport.Component parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.sonar.batch.protocol.output.BatchReport.Component parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Component prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code Component} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.sonar.batch.protocol.output.BatchReport.ComponentOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:Component) + org.sonar.batch.protocol.output.BatchReport.ComponentOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Component_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Component_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Component.class, org.sonar.batch.protocol.output.BatchReport.Component.Builder.class); + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.Component.class, org.sonar.batch.protocol.output.BatchReport.Component.Builder.class); } // Construct using org.sonar.batch.protocol.output.BatchReport.Component.newBuilder() @@ -1600,14 +2438,17 @@ public final class BatchReport { } private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getLinksFieldBuilder(); } } + private static Builder create() { return new Builder(); } @@ -1628,10 +2469,16 @@ public final class BatchReport { bitField0_ = (bitField0_ & ~0x00000020); childRefs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000040); + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + } else { + linksBuilder_.clear(); + } snapshotId_ = 0; - bitField0_ = (bitField0_ & ~0x00000080); - uuid_ = ""; bitField0_ = (bitField0_ & ~0x00000100); + uuid_ = ""; + bitField0_ = (bitField0_ & ~0x00000200); return this; } @@ -1640,7 +2487,7 @@ public final class BatchReport { } public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + getDescriptorForType() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Component_descriptor; } @@ -1688,12 +2535,21 @@ public final class BatchReport { childRefs_ = java.util.Collections.unmodifiableList(childRefs_); bitField0_ = (bitField0_ & ~0x00000040); } - result.childRefs_ = childRefs_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + result.childRefs_ = childRefs_; + if (linksBuilder_ == null) { + if (((bitField0_ & 0x00000080) == 0x00000080)) { + links_ = java.util.Collections.unmodifiableList(links_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.links_ = links_; + } else { + result.links_ = linksBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { to_bitField0_ |= 0x00000040; } result.snapshotId_ = snapshotId_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { to_bitField0_ |= 0x00000080; } result.uuid_ = uuid_; @@ -1704,7 +2560,7 @@ public final class BatchReport { public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.sonar.batch.protocol.output.BatchReport.Component) { - return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Component)other); + return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Component) other); } else { super.mergeFrom(other); return this; @@ -1712,7 +2568,8 @@ public final class BatchReport { } public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Component other) { - if (other == org.sonar.batch.protocol.output.BatchReport.Component.getDefaultInstance()) return this; + if (other == org.sonar.batch.protocol.output.BatchReport.Component.getDefaultInstance()) + return this; if (other.hasRef()) { setRef(other.getRef()); } @@ -1747,11 +2604,37 @@ public final class BatchReport { } onChanged(); } + if (linksBuilder_ == null) { + if (!other.links_.isEmpty()) { + if (links_.isEmpty()) { + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureLinksIsMutable(); + links_.addAll(other.links_); + } + onChanged(); + } + } else { + if (!other.links_.isEmpty()) { + if (linksBuilder_.isEmpty()) { + linksBuilder_.dispose(); + linksBuilder_ = null; + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000080); + linksBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLinksFieldBuilder() : null; + } else { + linksBuilder_.addAllMessages(other.links_); + } + } + } if (other.hasSnapshotId()) { setSnapshotId(other.getSnapshotId()); } if (other.hasUuid()) { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; uuid_ = other.uuid_; onChanged(); } @@ -1764,9 +2647,9 @@ public final class BatchReport { } public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { org.sonar.batch.protocol.output.BatchReport.Component parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); @@ -1780,22 +2663,25 @@ public final class BatchReport { } return this; } + private int bitField0_; - // optional int32 ref = 1; - private int ref_ ; + private int ref_; + /** * optional int32 ref = 1; */ public boolean hasRef() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * optional int32 ref = 1; */ public int getRef() { return ref_; } + /** * optional int32 ref = 1; */ @@ -1805,6 +2691,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional int32 ref = 1; */ @@ -1815,57 +2702,64 @@ public final class BatchReport { return this; } - // optional string path = 2; private java.lang.Object path_ = ""; + /** * optional string path = 2; */ public boolean hasPath() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** * optional string path = 2; */ public java.lang.String getPath() { java.lang.Object ref = path_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - path_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + path_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string path = 2; */ public com.google.protobuf.ByteString - getPathBytes() { + getPathBytes() { java.lang.Object ref = path_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); path_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string path = 2; */ public Builder setPath( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; path_ = value; onChanged(); return this; } + /** * optional string path = 2; */ @@ -1875,71 +2769,79 @@ public final class BatchReport { onChanged(); return this; } + /** * optional string path = 2; */ public Builder setPathBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; path_ = value; onChanged(); return this; } - // optional string name = 3; private java.lang.Object name_ = ""; + /** * optional string name = 3; */ public boolean hasName() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** * optional string name = 3; */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - name_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string name = 3; */ public com.google.protobuf.ByteString - getNameBytes() { + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string name = 3; */ public Builder setName( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; name_ = value; onChanged(); return this; } + /** * optional string name = 3; */ @@ -1949,34 +2851,37 @@ public final class BatchReport { onChanged(); return this; } + /** * optional string name = 3; */ public Builder setNameBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; name_ = value; onChanged(); 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; */ public boolean hasType() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** * optional .ComponentType type = 4; */ public org.sonar.batch.protocol.Constants.ComponentType getType() { return type_; } + /** * optional .ComponentType type = 4; */ @@ -1989,6 +2894,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional .ComponentType type = 4; */ @@ -1999,20 +2905,22 @@ public final class BatchReport { return this; } - // optional bool is_test = 5; - private boolean isTest_ ; + private boolean isTest_; + /** * optional bool is_test = 5; */ public boolean hasIsTest() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** * optional bool is_test = 5; */ public boolean getIsTest() { return isTest_; } + /** * optional bool is_test = 5; */ @@ -2022,6 +2930,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional bool is_test = 5; */ @@ -2032,148 +2941,423 @@ public final class BatchReport { return this; } - // optional string language = 6; private java.lang.Object language_ = ""; + /** * optional string language = 6; */ public boolean hasLanguage() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** * optional string language = 6; */ public java.lang.String getLanguage() { java.lang.Object ref = language_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - language_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + language_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string language = 6; */ public com.google.protobuf.ByteString - getLanguageBytes() { + getLanguageBytes() { java.lang.Object ref = language_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); language_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + + /** + * optional string language = 6; + */ + public Builder setLanguage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + language_ = value; + onChanged(); + return this; + } + + /** + * optional string language = 6; + */ + public Builder clearLanguage() { + bitField0_ = (bitField0_ & ~0x00000020); + language_ = getDefaultInstance().getLanguage(); + onChanged(); + return this; + } + + /** + * optional string language = 6; + */ + public Builder setLanguageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + language_ = value; + onChanged(); + return this; + } + + private java.util.List childRefs_ = java.util.Collections.emptyList(); + + private void ensureChildRefsIsMutable() { + if (!((bitField0_ & 0x00000040) == 0x00000040)) { + childRefs_ = new java.util.ArrayList(childRefs_); + bitField0_ |= 0x00000040; + } + } + + /** + * repeated int32 child_refs = 7 [packed = true]; + */ + public java.util.List + getChildRefsList() { + return java.util.Collections.unmodifiableList(childRefs_); + } + + /** + * repeated int32 child_refs = 7 [packed = true]; + */ + public int getChildRefsCount() { + return childRefs_.size(); + } + + /** + * repeated int32 child_refs = 7 [packed = true]; + */ + public int getChildRefs(int index) { + return childRefs_.get(index); + } + + /** + * repeated int32 child_refs = 7 [packed = true]; + */ + public Builder setChildRefs( + int index, int value) { + ensureChildRefsIsMutable(); + childRefs_.set(index, value); + onChanged(); + return this; + } + + /** + * repeated int32 child_refs = 7 [packed = true]; + */ + public Builder addChildRefs(int value) { + ensureChildRefsIsMutable(); + childRefs_.add(value); + onChanged(); + return this; + } + + /** + * repeated int32 child_refs = 7 [packed = true]; + */ + public Builder addAllChildRefs( + java.lang.Iterable values) { + ensureChildRefsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, childRefs_); + onChanged(); + return this; + } + + /** + * repeated int32 child_refs = 7 [packed = true]; + */ + public Builder clearChildRefs() { + childRefs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + private java.util.List links_ = + java.util.Collections.emptyList(); + + private void ensureLinksIsMutable() { + if (!((bitField0_ & 0x00000080) == 0x00000080)) { + links_ = new java.util.ArrayList(links_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilder linksBuilder_; + + /** + * repeated .ComponentLink links = 10; + */ + public java.util.List getLinksList() { + if (linksBuilder_ == null) { + return java.util.Collections.unmodifiableList(links_); + } else { + return linksBuilder_.getMessageList(); + } + } + + /** + * repeated .ComponentLink links = 10; + */ + public int getLinksCount() { + if (linksBuilder_ == null) { + return links_.size(); + } else { + return linksBuilder_.getCount(); + } + } + + /** + * repeated .ComponentLink links = 10; + */ + public org.sonar.batch.protocol.output.BatchReport.ComponentLink getLinks(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessage(index); + } + } + + /** + * repeated .ComponentLink links = 10; + */ + public Builder setLinks( + int index, org.sonar.batch.protocol.output.BatchReport.ComponentLink value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.set(index, value); + onChanged(); + } else { + linksBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .ComponentLink links = 10; + */ + public Builder setLinks( + int index, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.set(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .ComponentLink links = 10; + */ + public Builder addLinks(org.sonar.batch.protocol.output.BatchReport.ComponentLink value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(value); + onChanged(); + } else { + linksBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .ComponentLink links = 10; + */ + public Builder addLinks( + int index, org.sonar.batch.protocol.output.BatchReport.ComponentLink value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(index, value); + onChanged(); + } else { + linksBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .ComponentLink links = 10; + */ + public Builder addLinks( + org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** - * optional string language = 6; + * repeated .ComponentLink links = 10; */ - public Builder setLanguage( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - language_ = value; - onChanged(); + public Builder addLinks( + int index, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(index, builderForValue.build()); + } return this; } + /** - * optional string language = 6; + * repeated .ComponentLink links = 10; */ - public Builder clearLanguage() { - bitField0_ = (bitField0_ & ~0x00000020); - language_ = getDefaultInstance().getLanguage(); - onChanged(); + public Builder addAllLinks( + java.lang.Iterable values) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, links_); + onChanged(); + } else { + linksBuilder_.addAllMessages(values); + } return this; } + /** - * optional string language = 6; + * repeated .ComponentLink links = 10; */ - public Builder setLanguageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - language_ = value; - onChanged(); + public Builder clearLinks() { + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + linksBuilder_.clear(); + } return this; } - // repeated int32 child_refs = 7 [packed = true]; - private java.util.List childRefs_ = java.util.Collections.emptyList(); - private void ensureChildRefsIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { - childRefs_ = new java.util.ArrayList(childRefs_); - bitField0_ |= 0x00000040; - } - } /** - * repeated int32 child_refs = 7 [packed = true]; + * repeated .ComponentLink links = 10; */ - public java.util.List - getChildRefsList() { - return java.util.Collections.unmodifiableList(childRefs_); + public Builder removeLinks(int index) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.remove(index); + onChanged(); + } else { + linksBuilder_.remove(index); + } + return this; } + /** - * repeated int32 child_refs = 7 [packed = true]; + * repeated .ComponentLink links = 10; */ - public int getChildRefsCount() { - return childRefs_.size(); + public org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder getLinksBuilder( + int index) { + return getLinksFieldBuilder().getBuilder(index); } + /** - * repeated int32 child_refs = 7 [packed = true]; + * repeated .ComponentLink links = 10; */ - public int getChildRefs(int index) { - return childRefs_.get(index); + public org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder getLinksOrBuilder( + int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessageOrBuilder(index); + } } + /** - * repeated int32 child_refs = 7 [packed = true]; + * repeated .ComponentLink links = 10; */ - public Builder setChildRefs( - int index, int value) { - ensureChildRefsIsMutable(); - childRefs_.set(index, value); - onChanged(); - return this; + public java.util.List + getLinksOrBuilderList() { + if (linksBuilder_ != null) { + return linksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(links_); + } } + /** - * repeated int32 child_refs = 7 [packed = true]; + * repeated .ComponentLink links = 10; */ - public Builder addChildRefs(int value) { - ensureChildRefsIsMutable(); - childRefs_.add(value); - onChanged(); - return this; + public org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder addLinksBuilder() { + return getLinksFieldBuilder().addBuilder( + org.sonar.batch.protocol.output.BatchReport.ComponentLink.getDefaultInstance()); } + /** - * repeated int32 child_refs = 7 [packed = true]; + * repeated .ComponentLink links = 10; */ - public Builder addAllChildRefs( - java.lang.Iterable values) { - ensureChildRefsIsMutable(); - super.addAll(values, childRefs_); - onChanged(); - return this; + public org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder addLinksBuilder( + int index) { + return getLinksFieldBuilder().addBuilder( + index, org.sonar.batch.protocol.output.BatchReport.ComponentLink.getDefaultInstance()); } + /** - * repeated int32 child_refs = 7 [packed = true]; + * repeated .ComponentLink links = 10; */ - public Builder clearChildRefs() { - childRefs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; + public java.util.List + getLinksBuilderList() { + return getLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.ComponentLink, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder, org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder> + getLinksFieldBuilder() { + if (linksBuilder_ == null) { + linksBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.ComponentLink, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder, org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder>( + links_, + ((bitField0_ & 0x00000080) == 0x00000080), + getParentForChildren(), + isClean()); + links_ = null; + } + return linksBuilder_; } - // optional int32 snapshot_id = 8; - private int snapshotId_ ; + private int snapshotId_; + /** * optional int32 snapshot_id = 8; * @@ -2182,8 +3366,9 @@ public final class BatchReport { * */ public boolean hasSnapshotId() { - return ((bitField0_ & 0x00000080) == 0x00000080); + return ((bitField0_ & 0x00000100) == 0x00000100); } + /** * optional int32 snapshot_id = 8; * @@ -2194,6 +3379,7 @@ public final class BatchReport { public int getSnapshotId() { return snapshotId_; } + /** * optional int32 snapshot_id = 8; * @@ -2202,11 +3388,12 @@ public final class BatchReport { * */ public Builder setSnapshotId(int value) { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; snapshotId_ = value; onChanged(); return this; } + /** * optional int32 snapshot_id = 8; * @@ -2215,81 +3402,89 @@ public final class BatchReport { * */ public Builder clearSnapshotId() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); snapshotId_ = 0; onChanged(); return this; } - // optional string uuid = 9; private java.lang.Object uuid_ = ""; + /** * optional string uuid = 9; */ public boolean hasUuid() { - return ((bitField0_ & 0x00000100) == 0x00000100); + return ((bitField0_ & 0x00000200) == 0x00000200); } + /** * optional string uuid = 9; */ public java.lang.String getUuid() { java.lang.Object ref = uuid_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - uuid_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + uuid_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string uuid = 9; */ public com.google.protobuf.ByteString - getUuidBytes() { + getUuidBytes() { java.lang.Object ref = uuid_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); uuid_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string uuid = 9; */ public Builder setUuid( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; uuid_ = value; onChanged(); return this; } + /** * optional string uuid = 9; */ public Builder clearUuid() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); uuid_ = getDefaultInstance().getUuid(); onChanged(); return this; } + /** * optional string uuid = 9; */ public Builder setUuidBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; uuid_ = value; onChanged(); return this; @@ -2306,95 +3501,100 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Component) } - public interface IssueOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface IssueOrBuilder extends + // @@protoc_insertion_point(interface_extends:Issue) + com.google.protobuf.MessageOrBuilder { - // optional string rule_repository = 1; /** * optional string rule_repository = 1; */ boolean hasRuleRepository(); + /** * optional string rule_repository = 1; */ java.lang.String getRuleRepository(); + /** * optional string rule_repository = 1; */ com.google.protobuf.ByteString - getRuleRepositoryBytes(); + getRuleRepositoryBytes(); - // optional string rule_key = 2; /** * optional string rule_key = 2; */ boolean hasRuleKey(); + /** * optional string rule_key = 2; */ java.lang.String getRuleKey(); + /** * optional string rule_key = 2; */ com.google.protobuf.ByteString - getRuleKeyBytes(); + getRuleKeyBytes(); - // optional int32 line = 3; /** * optional int32 line = 3; */ boolean hasLine(); + /** * optional int32 line = 3; */ int getLine(); - // optional string msg = 4; /** * optional string msg = 4; */ boolean hasMsg(); + /** * optional string msg = 4; */ java.lang.String getMsg(); + /** * optional string msg = 4; */ com.google.protobuf.ByteString - getMsgBytes(); + getMsgBytes(); - // optional .Severity severity = 5; /** * optional .Severity severity = 5; */ boolean hasSeverity(); + /** * optional .Severity severity = 5; */ org.sonar.batch.protocol.Constants.Severity getSeverity(); - // repeated string tags = 6; /** * repeated string tags = 6; */ - java.util.List - getTagsList(); + com.google.protobuf.ProtocolStringList + getTagsList(); + /** * repeated string tags = 6; */ int getTagsCount(); + /** * repeated string tags = 6; */ java.lang.String getTags(int index); + /** * repeated string tags = 6; */ com.google.protobuf.ByteString - getTagsBytes(int index); + getTagsBytes(int index); - // optional double effort_to_fix = 7; /** * optional double effort_to_fix = 7; * @@ -2403,6 +3603,7 @@ public final class BatchReport { * */ boolean hasEffortToFix(); + /** * optional double effort_to_fix = 7; * @@ -2412,241 +3613,251 @@ public final class BatchReport { */ double getEffortToFix(); - // optional bool is_new = 8; /** * optional bool is_new = 8; */ boolean hasIsNew(); + /** * optional bool is_new = 8; */ boolean getIsNew(); - // optional string uuid = 9; /** * optional string uuid = 9; */ boolean hasUuid(); + /** * optional string uuid = 9; */ java.lang.String getUuid(); + /** * optional string uuid = 9; */ com.google.protobuf.ByteString - getUuidBytes(); + getUuidBytes(); - // optional int64 debt_in_minutes = 10; /** * optional int64 debt_in_minutes = 10; */ boolean hasDebtInMinutes(); + /** * optional int64 debt_in_minutes = 10; */ long getDebtInMinutes(); - // optional string resolution = 11; /** * optional string resolution = 11; */ boolean hasResolution(); + /** * optional string resolution = 11; */ java.lang.String getResolution(); + /** * optional string resolution = 11; */ com.google.protobuf.ByteString - getResolutionBytes(); + getResolutionBytes(); - // optional string status = 12; /** * optional string status = 12; */ boolean hasStatus(); + /** * optional string status = 12; */ java.lang.String getStatus(); + /** * optional string status = 12; */ com.google.protobuf.ByteString - getStatusBytes(); + getStatusBytes(); - // optional string checksum = 13; /** * optional string checksum = 13; */ boolean hasChecksum(); + /** * optional string checksum = 13; */ java.lang.String getChecksum(); + /** * optional string checksum = 13; */ com.google.protobuf.ByteString - getChecksumBytes(); + getChecksumBytes(); - // optional bool manual_severity = 14; /** * optional bool manual_severity = 14; */ boolean hasManualSeverity(); + /** * optional bool manual_severity = 14; */ boolean getManualSeverity(); - // optional string reporter = 15; /** * optional string reporter = 15; */ boolean hasReporter(); + /** * optional string reporter = 15; */ java.lang.String getReporter(); + /** * optional string reporter = 15; */ com.google.protobuf.ByteString - getReporterBytes(); + getReporterBytes(); - // optional string assignee = 16; /** * optional string assignee = 16; */ boolean hasAssignee(); + /** * optional string assignee = 16; */ java.lang.String getAssignee(); + /** * optional string assignee = 16; */ com.google.protobuf.ByteString - getAssigneeBytes(); + getAssigneeBytes(); - // optional string action_plan_key = 17; /** * optional string action_plan_key = 17; */ boolean hasActionPlanKey(); + /** * optional string action_plan_key = 17; */ java.lang.String getActionPlanKey(); + /** * optional string action_plan_key = 17; */ com.google.protobuf.ByteString - getActionPlanKeyBytes(); + getActionPlanKeyBytes(); - // optional string attributes = 18; /** * optional string attributes = 18; */ boolean hasAttributes(); + /** * optional string attributes = 18; */ java.lang.String getAttributes(); + /** * optional string attributes = 18; */ com.google.protobuf.ByteString - getAttributesBytes(); + getAttributesBytes(); - // optional string author_login = 19; /** * optional string author_login = 19; */ boolean hasAuthorLogin(); + /** * optional string author_login = 19; */ java.lang.String getAuthorLogin(); + /** * optional string author_login = 19; */ com.google.protobuf.ByteString - getAuthorLoginBytes(); + getAuthorLoginBytes(); - // optional int64 creation_date = 20; /** * optional int64 creation_date = 20; */ boolean hasCreationDate(); + /** * optional int64 creation_date = 20; */ long getCreationDate(); - // optional int64 close_date = 21; /** * optional int64 close_date = 21; */ boolean hasCloseDate(); + /** * optional int64 close_date = 21; */ long getCloseDate(); - // optional int64 update_date = 22; /** * optional int64 update_date = 22; */ boolean hasUpdateDate(); + /** * optional int64 update_date = 22; */ long getUpdateDate(); - // optional int64 selected_at = 23; /** * optional int64 selected_at = 23; */ boolean hasSelectedAt(); + /** * optional int64 selected_at = 23; */ long getSelectedAt(); - // optional string diff_fields = 24; /** * optional string diff_fields = 24; */ boolean hasDiffFields(); + /** * optional string diff_fields = 24; */ java.lang.String getDiffFields(); + /** * optional string diff_fields = 24; */ com.google.protobuf.ByteString - getDiffFieldsBytes(); + getDiffFieldsBytes(); - // optional bool is_changed = 25; /** * optional bool is_changed = 25; */ boolean hasIsChanged(); + /** * optional bool is_changed = 25; */ boolean getIsChanged(); - // optional bool must_send_notification = 26; /** * optional bool must_send_notification = 26; */ boolean hasMustSendNotification(); + /** * optional bool must_send_notification = 26; */ @@ -2656,16 +3867,21 @@ public final class BatchReport { * Protobuf type {@code Issue} */ public static final class Issue extends - com.google.protobuf.GeneratedMessage - implements IssueOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Issue) + IssueOrBuilder { // Use Issue.newBuilder() to construct. private Issue(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private Issue(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private Issue(boolean noInit) { + this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final Issue defaultInstance; + public static Issue getDefaultInstance() { return defaultInstance; } @@ -2675,19 +3891,21 @@ public final class BatchReport { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } + private Issue( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -2698,19 +3916,21 @@ public final class BatchReport { break; default: { if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + extensionRegistry, tag)) { done = true; } break; } case 10: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; - ruleRepository_ = input.readBytes(); + ruleRepository_ = bs; break; } case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - ruleKey_ = input.readBytes(); + ruleKey_ = bs; break; } case 24: { @@ -2719,8 +3939,9 @@ public final class BatchReport { break; } case 34: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000008; - msg_ = input.readBytes(); + msg_ = bs; break; } case 40: { @@ -2735,11 +3956,12 @@ public final class BatchReport { break; } case 50: { + com.google.protobuf.ByteString bs = input.readBytes(); if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { tags_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000020; } - tags_.add(input.readBytes()); + tags_.add(bs); break; } case 57: { @@ -2753,8 +3975,9 @@ public final class BatchReport { break; } case 74: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000080; - uuid_ = input.readBytes(); + uuid_ = bs; break; } case 80: { @@ -2763,18 +3986,21 @@ public final class BatchReport { break; } case 90: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000200; - resolution_ = input.readBytes(); + resolution_ = bs; break; } case 98: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000400; - status_ = input.readBytes(); + status_ = bs; break; } case 106: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000800; - checksum_ = input.readBytes(); + checksum_ = bs; break; } case 112: { @@ -2783,28 +4009,33 @@ public final class BatchReport { break; } case 122: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00002000; - reporter_ = input.readBytes(); + reporter_ = bs; break; } case 130: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00004000; - assignee_ = input.readBytes(); + assignee_ = bs; break; } case 138: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00008000; - actionPlanKey_ = input.readBytes(); + actionPlanKey_ = bs; break; } case 146: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00010000; - attributes_ = input.readBytes(); + attributes_ = bs; break; } case 154: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00020000; - authorLogin_ = input.readBytes(); + authorLogin_ = bs; break; } case 160: { @@ -2828,8 +4059,9 @@ public final class BatchReport { break; } case 194: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00400000; - diffFields_ = input.readBytes(); + diffFields_ = bs; break; } case 200: { @@ -2848,36 +4080,37 @@ public final class BatchReport { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - tags_ = new com.google.protobuf.UnmodifiableLazyStringList(tags_); + tags_ = tags_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Issue_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Issue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Issue.class, org.sonar.batch.protocol.output.BatchReport.Issue.Builder.class); + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.Issue.class, org.sonar.batch.protocol.output.BatchReport.Issue.Builder.class); } public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Issue parsePartialFrom( + new com.google.protobuf.AbstractParser() { + public Issue parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Issue(input, extensionRegistry); - } - }; + return new Issue(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { @@ -2885,15 +4118,16 @@ 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_; + /** * optional string rule_repository = 1; */ public boolean hasRuleRepository() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * optional string rule_repository = 1; */ @@ -2902,8 +4136,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { ruleRepository_ = s; @@ -2911,16 +4145,17 @@ public final class BatchReport { return s; } } + /** * optional string rule_repository = 1; */ public com.google.protobuf.ByteString - getRuleRepositoryBytes() { + getRuleRepositoryBytes() { java.lang.Object ref = ruleRepository_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); ruleRepository_ = b; return b; } else { @@ -2928,15 +4163,16 @@ public final class BatchReport { } } - // optional string rule_key = 2; public static final int RULE_KEY_FIELD_NUMBER = 2; private java.lang.Object ruleKey_; + /** * optional string rule_key = 2; */ public boolean hasRuleKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** * optional string rule_key = 2; */ @@ -2945,8 +4181,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { ruleKey_ = s; @@ -2954,16 +4190,17 @@ public final class BatchReport { return s; } } + /** * optional string rule_key = 2; */ public com.google.protobuf.ByteString - getRuleKeyBytes() { + getRuleKeyBytes() { java.lang.Object ref = ruleKey_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); ruleKey_ = b; return b; } else { @@ -2971,15 +4208,16 @@ public final class BatchReport { } } - // optional int32 line = 3; public static final int LINE_FIELD_NUMBER = 3; private int line_; + /** * optional int32 line = 3; */ public boolean hasLine() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** * optional int32 line = 3; */ @@ -2987,15 +4225,16 @@ public final class BatchReport { return line_; } - // optional string msg = 4; public static final int MSG_FIELD_NUMBER = 4; private java.lang.Object msg_; + /** * optional string msg = 4; */ public boolean hasMsg() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** * optional string msg = 4; */ @@ -3004,8 +4243,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { msg_ = s; @@ -3013,16 +4252,17 @@ public final class BatchReport { return s; } } + /** * optional string msg = 4; */ public com.google.protobuf.ByteString - getMsgBytes() { + getMsgBytes() { java.lang.Object ref = msg_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); msg_ = b; return b; } else { @@ -3030,15 +4270,16 @@ public final class BatchReport { } } - // optional .Severity severity = 5; public static final int SEVERITY_FIELD_NUMBER = 5; private org.sonar.batch.protocol.Constants.Severity severity_; + /** * optional .Severity severity = 5; */ public boolean hasSeverity() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** * optional .Severity severity = 5; */ @@ -3046,39 +4287,42 @@ public final class BatchReport { return severity_; } - // repeated string tags = 6; public static final int TAGS_FIELD_NUMBER = 6; private com.google.protobuf.LazyStringList tags_; + /** * repeated string tags = 6; */ - public java.util.List - getTagsList() { + public com.google.protobuf.ProtocolStringList + getTagsList() { return tags_; } + /** * repeated string tags = 6; */ public int getTagsCount() { return tags_.size(); } + /** * repeated string tags = 6; */ public java.lang.String getTags(int index) { return tags_.get(index); } + /** * repeated string tags = 6; */ public com.google.protobuf.ByteString - getTagsBytes(int index) { + getTagsBytes(int index) { return tags_.getByteString(index); } - // optional double effort_to_fix = 7; public static final int EFFORT_TO_FIX_FIELD_NUMBER = 7; private double effortToFix_; + /** * optional double effort_to_fix = 7; * @@ -3089,6 +4333,7 @@ public final class BatchReport { public boolean hasEffortToFix() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** * optional double effort_to_fix = 7; * @@ -3100,15 +4345,16 @@ public final class BatchReport { return effortToFix_; } - // optional bool is_new = 8; public static final int IS_NEW_FIELD_NUMBER = 8; private boolean isNew_; + /** * optional bool is_new = 8; */ public boolean hasIsNew() { return ((bitField0_ & 0x00000040) == 0x00000040); } + /** * optional bool is_new = 8; */ @@ -3116,15 +4362,16 @@ public final class BatchReport { return isNew_; } - // optional string uuid = 9; public static final int UUID_FIELD_NUMBER = 9; private java.lang.Object uuid_; + /** * optional string uuid = 9; */ public boolean hasUuid() { return ((bitField0_ & 0x00000080) == 0x00000080); } + /** * optional string uuid = 9; */ @@ -3133,8 +4380,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { uuid_ = s; @@ -3142,16 +4389,17 @@ public final class BatchReport { return s; } } + /** * optional string uuid = 9; */ public com.google.protobuf.ByteString - getUuidBytes() { + getUuidBytes() { java.lang.Object ref = uuid_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); uuid_ = b; return b; } else { @@ -3159,15 +4407,16 @@ public final class BatchReport { } } - // optional int64 debt_in_minutes = 10; public static final int DEBT_IN_MINUTES_FIELD_NUMBER = 10; private long debtInMinutes_; + /** * optional int64 debt_in_minutes = 10; */ public boolean hasDebtInMinutes() { return ((bitField0_ & 0x00000100) == 0x00000100); } + /** * optional int64 debt_in_minutes = 10; */ @@ -3175,15 +4424,16 @@ public final class BatchReport { return debtInMinutes_; } - // optional string resolution = 11; public static final int RESOLUTION_FIELD_NUMBER = 11; private java.lang.Object resolution_; + /** * optional string resolution = 11; */ public boolean hasResolution() { return ((bitField0_ & 0x00000200) == 0x00000200); } + /** * optional string resolution = 11; */ @@ -3192,8 +4442,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { resolution_ = s; @@ -3201,16 +4451,17 @@ public final class BatchReport { return s; } } + /** * optional string resolution = 11; */ public com.google.protobuf.ByteString - getResolutionBytes() { + getResolutionBytes() { java.lang.Object ref = resolution_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); resolution_ = b; return b; } else { @@ -3218,15 +4469,16 @@ public final class BatchReport { } } - // optional string status = 12; public static final int STATUS_FIELD_NUMBER = 12; private java.lang.Object status_; + /** * optional string status = 12; */ public boolean hasStatus() { return ((bitField0_ & 0x00000400) == 0x00000400); } + /** * optional string status = 12; */ @@ -3235,8 +4487,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { status_ = s; @@ -3244,16 +4496,17 @@ public final class BatchReport { return s; } } + /** * optional string status = 12; */ public com.google.protobuf.ByteString - getStatusBytes() { + getStatusBytes() { java.lang.Object ref = status_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); status_ = b; return b; } else { @@ -3261,15 +4514,16 @@ public final class BatchReport { } } - // optional string checksum = 13; public static final int CHECKSUM_FIELD_NUMBER = 13; private java.lang.Object checksum_; + /** * optional string checksum = 13; */ public boolean hasChecksum() { return ((bitField0_ & 0x00000800) == 0x00000800); } + /** * optional string checksum = 13; */ @@ -3278,8 +4532,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { checksum_ = s; @@ -3287,16 +4541,17 @@ public final class BatchReport { return s; } } + /** * optional string checksum = 13; */ public com.google.protobuf.ByteString - getChecksumBytes() { + getChecksumBytes() { java.lang.Object ref = checksum_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); checksum_ = b; return b; } else { @@ -3304,15 +4559,16 @@ public final class BatchReport { } } - // optional bool manual_severity = 14; public static final int MANUAL_SEVERITY_FIELD_NUMBER = 14; private boolean manualSeverity_; + /** * optional bool manual_severity = 14; */ public boolean hasManualSeverity() { return ((bitField0_ & 0x00001000) == 0x00001000); } + /** * optional bool manual_severity = 14; */ @@ -3320,15 +4576,16 @@ public final class BatchReport { return manualSeverity_; } - // optional string reporter = 15; public static final int REPORTER_FIELD_NUMBER = 15; private java.lang.Object reporter_; + /** * optional string reporter = 15; */ public boolean hasReporter() { return ((bitField0_ & 0x00002000) == 0x00002000); } + /** * optional string reporter = 15; */ @@ -3337,8 +4594,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { reporter_ = s; @@ -3346,16 +4603,17 @@ public final class BatchReport { return s; } } + /** * optional string reporter = 15; */ public com.google.protobuf.ByteString - getReporterBytes() { + getReporterBytes() { java.lang.Object ref = reporter_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); reporter_ = b; return b; } else { @@ -3363,15 +4621,16 @@ public final class BatchReport { } } - // optional string assignee = 16; public static final int ASSIGNEE_FIELD_NUMBER = 16; private java.lang.Object assignee_; + /** * optional string assignee = 16; */ public boolean hasAssignee() { return ((bitField0_ & 0x00004000) == 0x00004000); } + /** * optional string assignee = 16; */ @@ -3380,8 +4639,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { assignee_ = s; @@ -3389,16 +4648,17 @@ public final class BatchReport { return s; } } + /** * optional string assignee = 16; */ public com.google.protobuf.ByteString - getAssigneeBytes() { + getAssigneeBytes() { java.lang.Object ref = assignee_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); assignee_ = b; return b; } else { @@ -3406,15 +4666,16 @@ 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_; + /** * optional string action_plan_key = 17; */ public boolean hasActionPlanKey() { return ((bitField0_ & 0x00008000) == 0x00008000); } + /** * optional string action_plan_key = 17; */ @@ -3423,8 +4684,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { actionPlanKey_ = s; @@ -3432,16 +4693,17 @@ public final class BatchReport { return s; } } + /** * optional string action_plan_key = 17; */ public com.google.protobuf.ByteString - getActionPlanKeyBytes() { + getActionPlanKeyBytes() { java.lang.Object ref = actionPlanKey_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); actionPlanKey_ = b; return b; } else { @@ -3449,15 +4711,16 @@ public final class BatchReport { } } - // optional string attributes = 18; public static final int ATTRIBUTES_FIELD_NUMBER = 18; private java.lang.Object attributes_; + /** * optional string attributes = 18; */ public boolean hasAttributes() { return ((bitField0_ & 0x00010000) == 0x00010000); } + /** * optional string attributes = 18; */ @@ -3466,8 +4729,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { attributes_ = s; @@ -3475,16 +4738,17 @@ public final class BatchReport { return s; } } + /** * optional string attributes = 18; */ public com.google.protobuf.ByteString - getAttributesBytes() { + getAttributesBytes() { java.lang.Object ref = attributes_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); attributes_ = b; return b; } else { @@ -3492,15 +4756,16 @@ public final class BatchReport { } } - // optional string author_login = 19; public static final int AUTHOR_LOGIN_FIELD_NUMBER = 19; private java.lang.Object authorLogin_; + /** * optional string author_login = 19; */ public boolean hasAuthorLogin() { return ((bitField0_ & 0x00020000) == 0x00020000); } + /** * optional string author_login = 19; */ @@ -3509,8 +4774,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { authorLogin_ = s; @@ -3518,16 +4783,17 @@ public final class BatchReport { return s; } } + /** * optional string author_login = 19; */ public com.google.protobuf.ByteString - getAuthorLoginBytes() { + getAuthorLoginBytes() { java.lang.Object ref = authorLogin_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); authorLogin_ = b; return b; } else { @@ -3535,15 +4801,16 @@ public final class BatchReport { } } - // optional int64 creation_date = 20; public static final int CREATION_DATE_FIELD_NUMBER = 20; private long creationDate_; + /** * optional int64 creation_date = 20; */ public boolean hasCreationDate() { return ((bitField0_ & 0x00040000) == 0x00040000); } + /** * optional int64 creation_date = 20; */ @@ -3551,15 +4818,16 @@ public final class BatchReport { return creationDate_; } - // optional int64 close_date = 21; public static final int CLOSE_DATE_FIELD_NUMBER = 21; private long closeDate_; + /** * optional int64 close_date = 21; */ public boolean hasCloseDate() { return ((bitField0_ & 0x00080000) == 0x00080000); } + /** * optional int64 close_date = 21; */ @@ -3567,15 +4835,16 @@ public final class BatchReport { return closeDate_; } - // optional int64 update_date = 22; public static final int UPDATE_DATE_FIELD_NUMBER = 22; private long updateDate_; + /** * optional int64 update_date = 22; */ public boolean hasUpdateDate() { return ((bitField0_ & 0x00100000) == 0x00100000); } + /** * optional int64 update_date = 22; */ @@ -3583,15 +4852,16 @@ public final class BatchReport { return updateDate_; } - // optional int64 selected_at = 23; public static final int SELECTED_AT_FIELD_NUMBER = 23; private long selectedAt_; + /** * optional int64 selected_at = 23; */ public boolean hasSelectedAt() { return ((bitField0_ & 0x00200000) == 0x00200000); } + /** * optional int64 selected_at = 23; */ @@ -3599,15 +4869,16 @@ 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_; + /** * optional string diff_fields = 24; */ public boolean hasDiffFields() { return ((bitField0_ & 0x00400000) == 0x00400000); } + /** * optional string diff_fields = 24; */ @@ -3616,8 +4887,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { diffFields_ = s; @@ -3625,16 +4896,17 @@ public final class BatchReport { return s; } } + /** * optional string diff_fields = 24; */ public com.google.protobuf.ByteString - getDiffFieldsBytes() { + getDiffFieldsBytes() { java.lang.Object ref = diffFields_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); diffFields_ = b; return b; } else { @@ -3642,15 +4914,16 @@ public final class BatchReport { } } - // optional bool is_changed = 25; public static final int IS_CHANGED_FIELD_NUMBER = 25; private boolean isChanged_; + /** * optional bool is_changed = 25; */ public boolean hasIsChanged() { return ((bitField0_ & 0x00800000) == 0x00800000); } + /** * optional bool is_changed = 25; */ @@ -3658,15 +4931,16 @@ 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_; + /** * optional bool must_send_notification = 26; */ public boolean hasMustSendNotification() { return ((bitField0_ & 0x01000000) == 0x01000000); } + /** * optional bool must_send_notification = 26; */ @@ -3702,17 +4976,22 @@ public final class BatchReport { isChanged_ = false; mustSendNotification_ = false; } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getRuleRepositoryBytes()); @@ -3796,9 +5075,11 @@ public final class BatchReport { } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { @@ -3916,94 +5197,115 @@ public final class BatchReport { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } + public static org.sonar.batch.protocol.output.BatchReport.Issue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.sonar.batch.protocol.output.BatchReport.Issue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Issue prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code Issue} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:Issue) + org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Issue_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Issue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Issue.class, org.sonar.batch.protocol.output.BatchReport.Issue.Builder.class); + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.Issue.class, org.sonar.batch.protocol.output.BatchReport.Issue.Builder.class); } // Construct using org.sonar.batch.protocol.output.BatchReport.Issue.newBuilder() @@ -4012,14 +5314,16 @@ public final class BatchReport { } private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -4086,7 +5390,7 @@ public final class BatchReport { } public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + getDescriptorForType() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Issue_descriptor; } @@ -4127,8 +5431,7 @@ public final class BatchReport { } result.severity_ = severity_; if (((bitField0_ & 0x00000020) == 0x00000020)) { - tags_ = new com.google.protobuf.UnmodifiableLazyStringList( - tags_); + tags_ = tags_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000020); } result.tags_ = tags_; @@ -4219,7 +5522,7 @@ public final class BatchReport { public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.sonar.batch.protocol.output.BatchReport.Issue) { - return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Issue)other); + return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Issue) other); } else { super.mergeFrom(other); return this; @@ -4227,7 +5530,8 @@ public final class BatchReport { } public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Issue other) { - if (other == org.sonar.batch.protocol.output.BatchReport.Issue.getDefaultInstance()) return this; + if (other == org.sonar.batch.protocol.output.BatchReport.Issue.getDefaultInstance()) + return this; if (other.hasRuleRepository()) { bitField0_ |= 0x00000001; ruleRepository_ = other.ruleRepository_; @@ -4348,9 +5652,9 @@ public final class BatchReport { } public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { org.sonar.batch.protocol.output.BatchReport.Issue parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); @@ -4364,59 +5668,67 @@ public final class BatchReport { } return this; } + private int bitField0_; - // optional string rule_repository = 1; private java.lang.Object ruleRepository_ = ""; + /** * optional string rule_repository = 1; */ public boolean hasRuleRepository() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * optional string rule_repository = 1; */ public java.lang.String getRuleRepository() { java.lang.Object ref = ruleRepository_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - ruleRepository_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + ruleRepository_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string rule_repository = 1; */ public com.google.protobuf.ByteString - getRuleRepositoryBytes() { + getRuleRepositoryBytes() { java.lang.Object ref = ruleRepository_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); ruleRepository_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string rule_repository = 1; */ public Builder setRuleRepository( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; ruleRepository_ = value; onChanged(); return this; } + /** * optional string rule_repository = 1; */ @@ -4426,71 +5738,79 @@ public final class BatchReport { onChanged(); return this; } + /** * optional string rule_repository = 1; */ public Builder setRuleRepositoryBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; ruleRepository_ = value; onChanged(); return this; } - // optional string rule_key = 2; private java.lang.Object ruleKey_ = ""; + /** * optional string rule_key = 2; */ public boolean hasRuleKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** * optional string rule_key = 2; */ public java.lang.String getRuleKey() { java.lang.Object ref = ruleKey_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - ruleKey_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + ruleKey_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string rule_key = 2; */ public com.google.protobuf.ByteString - getRuleKeyBytes() { + getRuleKeyBytes() { java.lang.Object ref = ruleKey_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); ruleKey_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string rule_key = 2; */ public Builder setRuleKey( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; ruleKey_ = value; onChanged(); return this; } + /** * optional string rule_key = 2; */ @@ -4500,34 +5820,37 @@ public final class BatchReport { onChanged(); return this; } + /** * optional string rule_key = 2; */ public Builder setRuleKeyBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; ruleKey_ = value; onChanged(); return this; } - // optional int32 line = 3; - private int line_ ; + private int line_; + /** * optional int32 line = 3; */ public boolean hasLine() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** * optional int32 line = 3; */ public int getLine() { return line_; } + /** * optional int32 line = 3; */ @@ -4537,6 +5860,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional int32 line = 3; */ @@ -4547,57 +5871,64 @@ public final class BatchReport { return this; } - // optional string msg = 4; private java.lang.Object msg_ = ""; + /** * optional string msg = 4; */ public boolean hasMsg() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** * optional string msg = 4; */ public java.lang.String getMsg() { java.lang.Object ref = msg_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - msg_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + msg_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string msg = 4; */ public com.google.protobuf.ByteString - getMsgBytes() { + getMsgBytes() { java.lang.Object ref = msg_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); msg_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string msg = 4; */ public Builder setMsg( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; msg_ = value; onChanged(); return this; } + /** * optional string msg = 4; */ @@ -4607,34 +5938,37 @@ public final class BatchReport { onChanged(); return this; } + /** * optional string msg = 4; */ public Builder setMsgBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; msg_ = value; onChanged(); 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; */ public boolean hasSeverity() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** * optional .Severity severity = 5; */ public org.sonar.batch.protocol.Constants.Severity getSeverity() { return severity_; } + /** * optional .Severity severity = 5; */ @@ -4647,6 +5981,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional .Severity severity = 5; */ @@ -4657,76 +5992,85 @@ public final class BatchReport { return this; } - // repeated string tags = 6; private com.google.protobuf.LazyStringList tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTagsIsMutable() { if (!((bitField0_ & 0x00000020) == 0x00000020)) { tags_ = new com.google.protobuf.LazyStringArrayList(tags_); bitField0_ |= 0x00000020; - } + } } + /** * repeated string tags = 6; */ - public java.util.List - getTagsList() { - return java.util.Collections.unmodifiableList(tags_); + public com.google.protobuf.ProtocolStringList + getTagsList() { + return tags_.getUnmodifiableView(); } + /** * repeated string tags = 6; */ public int getTagsCount() { return tags_.size(); } + /** * repeated string tags = 6; */ public java.lang.String getTags(int index) { return tags_.get(index); } + /** * repeated string tags = 6; */ public com.google.protobuf.ByteString - getTagsBytes(int index) { + getTagsBytes(int index) { return tags_.getByteString(index); } + /** * repeated string tags = 6; */ public Builder setTags( - int index, java.lang.String value) { + int index, java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); + throw new NullPointerException(); + } + ensureTagsIsMutable(); tags_.set(index, value); onChanged(); return this; } + /** * repeated string tags = 6; */ public Builder addTags( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); + throw new NullPointerException(); + } + ensureTagsIsMutable(); tags_.add(value); onChanged(); return this; } + /** * repeated string tags = 6; */ public Builder addAllTags( - java.lang.Iterable values) { + java.lang.Iterable values) { ensureTagsIsMutable(); - super.addAll(values, tags_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tags_); onChanged(); return this; } + /** * repeated string tags = 6; */ @@ -4736,22 +6080,23 @@ public final class BatchReport { onChanged(); return this; } + /** * repeated string tags = 6; */ public Builder addTagsBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); + throw new NullPointerException(); + } + ensureTagsIsMutable(); tags_.add(value); onChanged(); return this; } - // optional double effort_to_fix = 7; - private double effortToFix_ ; + private double effortToFix_; + /** * optional double effort_to_fix = 7; * @@ -4762,6 +6107,7 @@ public final class BatchReport { public boolean hasEffortToFix() { return ((bitField0_ & 0x00000040) == 0x00000040); } + /** * optional double effort_to_fix = 7; * @@ -4772,6 +6118,7 @@ public final class BatchReport { public double getEffortToFix() { return effortToFix_; } + /** * optional double effort_to_fix = 7; * @@ -4785,6 +6132,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional double effort_to_fix = 7; * @@ -4799,20 +6147,22 @@ public final class BatchReport { return this; } - // optional bool is_new = 8; - private boolean isNew_ ; + private boolean isNew_; + /** * optional bool is_new = 8; */ public boolean hasIsNew() { return ((bitField0_ & 0x00000080) == 0x00000080); } + /** * optional bool is_new = 8; */ public boolean getIsNew() { return isNew_; } + /** * optional bool is_new = 8; */ @@ -4822,6 +6172,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional bool is_new = 8; */ @@ -4832,57 +6183,64 @@ public final class BatchReport { return this; } - // optional string uuid = 9; private java.lang.Object uuid_ = ""; + /** * optional string uuid = 9; */ public boolean hasUuid() { return ((bitField0_ & 0x00000100) == 0x00000100); } + /** * optional string uuid = 9; */ public java.lang.String getUuid() { java.lang.Object ref = uuid_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - uuid_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + uuid_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string uuid = 9; */ public com.google.protobuf.ByteString - getUuidBytes() { + getUuidBytes() { java.lang.Object ref = uuid_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); uuid_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string uuid = 9; */ public Builder setUuid( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; uuid_ = value; onChanged(); return this; } + /** * optional string uuid = 9; */ @@ -4892,34 +6250,37 @@ public final class BatchReport { onChanged(); return this; } + /** * optional string uuid = 9; */ public Builder setUuidBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; uuid_ = value; onChanged(); return this; } - // optional int64 debt_in_minutes = 10; - private long debtInMinutes_ ; + private long debtInMinutes_; + /** * optional int64 debt_in_minutes = 10; */ public boolean hasDebtInMinutes() { return ((bitField0_ & 0x00000200) == 0x00000200); } + /** * optional int64 debt_in_minutes = 10; */ public long getDebtInMinutes() { return debtInMinutes_; } + /** * optional int64 debt_in_minutes = 10; */ @@ -4929,6 +6290,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional int64 debt_in_minutes = 10; */ @@ -4939,57 +6301,64 @@ public final class BatchReport { return this; } - // optional string resolution = 11; private java.lang.Object resolution_ = ""; + /** * optional string resolution = 11; */ public boolean hasResolution() { return ((bitField0_ & 0x00000400) == 0x00000400); } + /** * optional string resolution = 11; */ public java.lang.String getResolution() { java.lang.Object ref = resolution_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - resolution_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + resolution_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string resolution = 11; */ public com.google.protobuf.ByteString - getResolutionBytes() { + getResolutionBytes() { java.lang.Object ref = resolution_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); resolution_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string resolution = 11; */ public Builder setResolution( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; resolution_ = value; onChanged(); return this; } + /** * optional string resolution = 11; */ @@ -4999,71 +6368,79 @@ public final class BatchReport { onChanged(); return this; } + /** * optional string resolution = 11; */ public Builder setResolutionBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; resolution_ = value; onChanged(); return this; } - // optional string status = 12; private java.lang.Object status_ = ""; + /** * optional string status = 12; */ public boolean hasStatus() { return ((bitField0_ & 0x00000800) == 0x00000800); } + /** * optional string status = 12; */ public java.lang.String getStatus() { java.lang.Object ref = status_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - status_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + status_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string status = 12; */ public com.google.protobuf.ByteString - getStatusBytes() { + getStatusBytes() { java.lang.Object ref = status_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); status_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string status = 12; */ public Builder setStatus( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000800; + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; status_ = value; onChanged(); return this; } + /** * optional string status = 12; */ @@ -5073,71 +6450,79 @@ public final class BatchReport { onChanged(); return this; } + /** * optional string status = 12; */ public Builder setStatusBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000800; + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; status_ = value; onChanged(); return this; } - // optional string checksum = 13; private java.lang.Object checksum_ = ""; + /** * optional string checksum = 13; */ public boolean hasChecksum() { return ((bitField0_ & 0x00001000) == 0x00001000); } + /** * optional string checksum = 13; */ public java.lang.String getChecksum() { java.lang.Object ref = checksum_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - checksum_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + checksum_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string checksum = 13; */ public com.google.protobuf.ByteString - getChecksumBytes() { + getChecksumBytes() { java.lang.Object ref = checksum_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); checksum_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string checksum = 13; */ public Builder setChecksum( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00001000; + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; checksum_ = value; onChanged(); return this; } + /** * optional string checksum = 13; */ @@ -5147,34 +6532,37 @@ public final class BatchReport { onChanged(); return this; } + /** * optional string checksum = 13; */ public Builder setChecksumBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00001000; + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; checksum_ = value; onChanged(); return this; } - // optional bool manual_severity = 14; - private boolean manualSeverity_ ; + private boolean manualSeverity_; + /** * optional bool manual_severity = 14; */ public boolean hasManualSeverity() { return ((bitField0_ & 0x00002000) == 0x00002000); } + /** * optional bool manual_severity = 14; */ public boolean getManualSeverity() { return manualSeverity_; } + /** * optional bool manual_severity = 14; */ @@ -5184,6 +6572,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional bool manual_severity = 14; */ @@ -5194,57 +6583,64 @@ public final class BatchReport { return this; } - // optional string reporter = 15; private java.lang.Object reporter_ = ""; + /** * optional string reporter = 15; */ public boolean hasReporter() { return ((bitField0_ & 0x00004000) == 0x00004000); } + /** * optional string reporter = 15; */ public java.lang.String getReporter() { java.lang.Object ref = reporter_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - reporter_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + reporter_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string reporter = 15; */ public com.google.protobuf.ByteString - getReporterBytes() { + getReporterBytes() { java.lang.Object ref = reporter_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); reporter_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string reporter = 15; */ public Builder setReporter( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00004000; + throw new NullPointerException(); + } + bitField0_ |= 0x00004000; reporter_ = value; onChanged(); return this; } + /** * optional string reporter = 15; */ @@ -5254,71 +6650,79 @@ public final class BatchReport { onChanged(); return this; } + /** * optional string reporter = 15; */ public Builder setReporterBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00004000; + throw new NullPointerException(); + } + bitField0_ |= 0x00004000; reporter_ = value; onChanged(); return this; } - // optional string assignee = 16; private java.lang.Object assignee_ = ""; + /** * optional string assignee = 16; */ public boolean hasAssignee() { return ((bitField0_ & 0x00008000) == 0x00008000); } + /** * optional string assignee = 16; */ public java.lang.String getAssignee() { java.lang.Object ref = assignee_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - assignee_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + assignee_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string assignee = 16; */ public com.google.protobuf.ByteString - getAssigneeBytes() { + getAssigneeBytes() { java.lang.Object ref = assignee_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); assignee_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string assignee = 16; */ public Builder setAssignee( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00008000; + throw new NullPointerException(); + } + bitField0_ |= 0x00008000; assignee_ = value; onChanged(); return this; } + /** * optional string assignee = 16; */ @@ -5328,71 +6732,79 @@ public final class BatchReport { onChanged(); return this; } + /** * optional string assignee = 16; */ public Builder setAssigneeBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00008000; + throw new NullPointerException(); + } + bitField0_ |= 0x00008000; assignee_ = value; onChanged(); return this; } - // optional string action_plan_key = 17; private java.lang.Object actionPlanKey_ = ""; + /** * optional string action_plan_key = 17; */ public boolean hasActionPlanKey() { return ((bitField0_ & 0x00010000) == 0x00010000); } + /** * optional string action_plan_key = 17; */ public java.lang.String getActionPlanKey() { java.lang.Object ref = actionPlanKey_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - actionPlanKey_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + actionPlanKey_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string action_plan_key = 17; */ public com.google.protobuf.ByteString - getActionPlanKeyBytes() { + getActionPlanKeyBytes() { java.lang.Object ref = actionPlanKey_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); actionPlanKey_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string action_plan_key = 17; */ public Builder setActionPlanKey( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00010000; + throw new NullPointerException(); + } + bitField0_ |= 0x00010000; actionPlanKey_ = value; onChanged(); return this; } + /** * optional string action_plan_key = 17; */ @@ -5402,71 +6814,79 @@ public final class BatchReport { onChanged(); return this; } + /** * optional string action_plan_key = 17; */ public Builder setActionPlanKeyBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00010000; + throw new NullPointerException(); + } + bitField0_ |= 0x00010000; actionPlanKey_ = value; onChanged(); return this; } - // optional string attributes = 18; private java.lang.Object attributes_ = ""; + /** * optional string attributes = 18; */ public boolean hasAttributes() { return ((bitField0_ & 0x00020000) == 0x00020000); } + /** * optional string attributes = 18; */ public java.lang.String getAttributes() { java.lang.Object ref = attributes_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - attributes_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + attributes_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string attributes = 18; */ public com.google.protobuf.ByteString - getAttributesBytes() { + getAttributesBytes() { java.lang.Object ref = attributes_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); attributes_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string attributes = 18; */ public Builder setAttributes( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00020000; + throw new NullPointerException(); + } + bitField0_ |= 0x00020000; attributes_ = value; onChanged(); return this; } + /** * optional string attributes = 18; */ @@ -5476,71 +6896,79 @@ public final class BatchReport { onChanged(); return this; } + /** * optional string attributes = 18; */ public Builder setAttributesBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00020000; + throw new NullPointerException(); + } + bitField0_ |= 0x00020000; attributes_ = value; onChanged(); return this; } - // optional string author_login = 19; private java.lang.Object authorLogin_ = ""; + /** * optional string author_login = 19; */ public boolean hasAuthorLogin() { return ((bitField0_ & 0x00040000) == 0x00040000); } + /** * optional string author_login = 19; */ public java.lang.String getAuthorLogin() { java.lang.Object ref = authorLogin_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - authorLogin_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + authorLogin_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string author_login = 19; */ public com.google.protobuf.ByteString - getAuthorLoginBytes() { + getAuthorLoginBytes() { java.lang.Object ref = authorLogin_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); authorLogin_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string author_login = 19; */ public Builder setAuthorLogin( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00040000; + throw new NullPointerException(); + } + bitField0_ |= 0x00040000; authorLogin_ = value; onChanged(); return this; } + /** * optional string author_login = 19; */ @@ -5550,34 +6978,37 @@ public final class BatchReport { onChanged(); return this; } + /** * optional string author_login = 19; */ public Builder setAuthorLoginBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00040000; + throw new NullPointerException(); + } + bitField0_ |= 0x00040000; authorLogin_ = value; onChanged(); return this; } - // optional int64 creation_date = 20; - private long creationDate_ ; + private long creationDate_; + /** * optional int64 creation_date = 20; */ public boolean hasCreationDate() { return ((bitField0_ & 0x00080000) == 0x00080000); } + /** * optional int64 creation_date = 20; */ public long getCreationDate() { return creationDate_; } + /** * optional int64 creation_date = 20; */ @@ -5587,6 +7018,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional int64 creation_date = 20; */ @@ -5597,20 +7029,22 @@ public final class BatchReport { return this; } - // optional int64 close_date = 21; - private long closeDate_ ; + private long closeDate_; + /** * optional int64 close_date = 21; */ public boolean hasCloseDate() { return ((bitField0_ & 0x00100000) == 0x00100000); } + /** * optional int64 close_date = 21; */ public long getCloseDate() { return closeDate_; } + /** * optional int64 close_date = 21; */ @@ -5620,6 +7054,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional int64 close_date = 21; */ @@ -5630,20 +7065,22 @@ public final class BatchReport { return this; } - // optional int64 update_date = 22; - private long updateDate_ ; + private long updateDate_; + /** * optional int64 update_date = 22; */ public boolean hasUpdateDate() { return ((bitField0_ & 0x00200000) == 0x00200000); } + /** * optional int64 update_date = 22; */ public long getUpdateDate() { return updateDate_; } + /** * optional int64 update_date = 22; */ @@ -5653,6 +7090,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional int64 update_date = 22; */ @@ -5663,20 +7101,22 @@ public final class BatchReport { return this; } - // optional int64 selected_at = 23; - private long selectedAt_ ; + private long selectedAt_; + /** * optional int64 selected_at = 23; */ public boolean hasSelectedAt() { return ((bitField0_ & 0x00400000) == 0x00400000); } + /** * optional int64 selected_at = 23; */ public long getSelectedAt() { return selectedAt_; } + /** * optional int64 selected_at = 23; */ @@ -5686,6 +7126,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional int64 selected_at = 23; */ @@ -5696,57 +7137,64 @@ public final class BatchReport { return this; } - // optional string diff_fields = 24; private java.lang.Object diffFields_ = ""; + /** * optional string diff_fields = 24; */ public boolean hasDiffFields() { return ((bitField0_ & 0x00800000) == 0x00800000); } + /** * optional string diff_fields = 24; */ public java.lang.String getDiffFields() { java.lang.Object ref = diffFields_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - diffFields_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + diffFields_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string diff_fields = 24; */ public com.google.protobuf.ByteString - getDiffFieldsBytes() { + getDiffFieldsBytes() { java.lang.Object ref = diffFields_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); diffFields_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string diff_fields = 24; */ public Builder setDiffFields( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00800000; + throw new NullPointerException(); + } + bitField0_ |= 0x00800000; diffFields_ = value; onChanged(); return this; } + /** * optional string diff_fields = 24; */ @@ -5756,34 +7204,37 @@ public final class BatchReport { onChanged(); return this; } + /** * optional string diff_fields = 24; */ public Builder setDiffFieldsBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00800000; + throw new NullPointerException(); + } + bitField0_ |= 0x00800000; diffFields_ = value; onChanged(); return this; } - // optional bool is_changed = 25; - private boolean isChanged_ ; + private boolean isChanged_; + /** * optional bool is_changed = 25; */ public boolean hasIsChanged() { return ((bitField0_ & 0x01000000) == 0x01000000); } + /** * optional bool is_changed = 25; */ public boolean getIsChanged() { return isChanged_; } + /** * optional bool is_changed = 25; */ @@ -5793,6 +7244,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional bool is_changed = 25; */ @@ -5803,20 +7255,22 @@ public final class BatchReport { return this; } - // optional bool must_send_notification = 26; - private boolean mustSendNotification_ ; + private boolean mustSendNotification_; + /** * optional bool must_send_notification = 26; */ public boolean hasMustSendNotification() { return ((bitField0_ & 0x02000000) == 0x02000000); } + /** * optional bool must_send_notification = 26; */ public boolean getMustSendNotification() { return mustSendNotification_; } + /** * optional bool must_send_notification = 26; */ @@ -5826,6 +7280,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional bool must_send_notification = 26; */ @@ -5847,45 +7302,48 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Issue) } - public interface IssuesOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface IssuesOrBuilder extends + // @@protoc_insertion_point(interface_extends:Issues) + com.google.protobuf.MessageOrBuilder { - // optional int32 component_ref = 1; /** * optional int32 component_ref = 1; */ boolean hasComponentRef(); + /** * optional int32 component_ref = 1; */ int getComponentRef(); - // repeated .Issue list = 2; /** * repeated .Issue list = 2; */ - java.util.List - getListList(); + java.util.List + getListList(); + /** * repeated .Issue list = 2; */ org.sonar.batch.protocol.output.BatchReport.Issue getList(int index); + /** * repeated .Issue list = 2; */ int getListCount(); + /** * repeated .Issue list = 2; */ - java.util.List - getListOrBuilderList(); + java.util.List + getListOrBuilderList(); + /** * repeated .Issue list = 2; */ org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder getListOrBuilder( - int index); + int index); - // optional string component_uuid = 3; /** * optional string component_uuid = 3; * @@ -5894,6 +7352,7 @@ public final class BatchReport { * */ boolean hasComponentUuid(); + /** * optional string component_uuid = 3; * @@ -5902,6 +7361,7 @@ public final class BatchReport { * */ java.lang.String getComponentUuid(); + /** * optional string component_uuid = 3; * @@ -5910,22 +7370,27 @@ public final class BatchReport { * */ com.google.protobuf.ByteString - getComponentUuidBytes(); + getComponentUuidBytes(); } /** * Protobuf type {@code Issues} */ public static final class Issues extends - com.google.protobuf.GeneratedMessage - implements IssuesOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Issues) + IssuesOrBuilder { // Use Issues.newBuilder() to construct. private Issues(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private Issues(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private Issues(boolean noInit) { + this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final Issues defaultInstance; + public static Issues getDefaultInstance() { return defaultInstance; } @@ -5935,19 +7400,21 @@ public final class BatchReport { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } + private Issues( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -5958,7 +7425,7 @@ public final class BatchReport { break; default: { if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + extensionRegistry, tag)) { done = true; } break; @@ -5977,8 +7444,9 @@ public final class BatchReport { break; } case 26: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - componentUuid_ = input.readBytes(); + componentUuid_ = bs; break; } } @@ -5987,7 +7455,7 @@ public final class BatchReport { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { list_ = java.util.Collections.unmodifiableList(list_); @@ -5996,27 +7464,28 @@ public final class BatchReport { makeExtensionsImmutable(); } } + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Issues_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Issues_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Issues.class, org.sonar.batch.protocol.output.BatchReport.Issues.Builder.class); + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.Issues.class, org.sonar.batch.protocol.output.BatchReport.Issues.Builder.class); } public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Issues parsePartialFrom( + new com.google.protobuf.AbstractParser() { + public Issues parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Issues(input, extensionRegistry); - } - }; + return new Issues(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { @@ -6024,15 +7493,16 @@ public final class BatchReport { } private int bitField0_; - // optional int32 component_ref = 1; public static final int COMPONENT_REF_FIELD_NUMBER = 1; private int componentRef_; + /** * optional int32 component_ref = 1; */ public boolean hasComponentRef() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * optional int32 component_ref = 1; */ @@ -6040,45 +7510,49 @@ public final class BatchReport { return componentRef_; } - // repeated .Issue list = 2; public static final int LIST_FIELD_NUMBER = 2; private java.util.List list_; + /** * repeated .Issue list = 2; */ public java.util.List getListList() { return list_; } + /** * repeated .Issue list = 2; */ - public java.util.List - getListOrBuilderList() { + public java.util.List + getListOrBuilderList() { return list_; } + /** * repeated .Issue list = 2; */ public int getListCount() { return list_.size(); } + /** * repeated .Issue list = 2; */ public org.sonar.batch.protocol.output.BatchReport.Issue getList(int index) { return list_.get(index); } + /** * repeated .Issue list = 2; */ public org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder getListOrBuilder( - int index) { + int index) { return list_.get(index); } - // optional string component_uuid = 3; public static final int COMPONENT_UUID_FIELD_NUMBER = 3; private java.lang.Object componentUuid_; + /** * optional string component_uuid = 3; * @@ -6089,6 +7563,7 @@ public final class BatchReport { public boolean hasComponentUuid() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** * optional string component_uuid = 3; * @@ -6101,8 +7576,8 @@ public final class BatchReport { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { componentUuid_ = s; @@ -6110,6 +7585,7 @@ public final class BatchReport { return s; } } + /** * optional string component_uuid = 3; * @@ -6118,12 +7594,12 @@ public final class BatchReport { * */ public com.google.protobuf.ByteString - getComponentUuidBytes() { + getComponentUuidBytes() { java.lang.Object ref = componentUuid_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); componentUuid_ = b; return b; } else { @@ -6136,17 +7612,22 @@ public final class BatchReport { list_ = java.util.Collections.emptyList(); componentUuid_ = ""; } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt32(1, componentRef_); @@ -6161,9 +7642,11 @@ public final class BatchReport { } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { @@ -6184,94 +7667,115 @@ public final class BatchReport { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.sonar.batch.protocol.output.BatchReport.Issues parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.sonar.batch.protocol.output.BatchReport.Issues parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static org.sonar.batch.protocol.output.BatchReport.Issues parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.sonar.batch.protocol.output.BatchReport.Issues parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static org.sonar.batch.protocol.output.BatchReport.Issues parseFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.sonar.batch.protocol.output.BatchReport.Issues parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } + public static org.sonar.batch.protocol.output.BatchReport.Issues parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.sonar.batch.protocol.output.BatchReport.Issues parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.sonar.batch.protocol.output.BatchReport.Issues parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.sonar.batch.protocol.output.BatchReport.Issues parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Issues prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code Issues} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.sonar.batch.protocol.output.BatchReport.IssuesOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:Issues) + org.sonar.batch.protocol.output.BatchReport.IssuesOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Issues_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Issues_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Issues.class, org.sonar.batch.protocol.output.BatchReport.Issues.Builder.class); + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.Issues.class, org.sonar.batch.protocol.output.BatchReport.Issues.Builder.class); } // Construct using org.sonar.batch.protocol.output.BatchReport.Issues.newBuilder() @@ -6280,15 +7784,17 @@ public final class BatchReport { } private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getListFieldBuilder(); } } + private static Builder create() { return new Builder(); } @@ -6313,7 +7819,7 @@ public final class BatchReport { } public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + getDescriptorForType() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Issues_descriptor; } @@ -6357,7 +7863,7 @@ public final class BatchReport { public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.sonar.batch.protocol.output.BatchReport.Issues) { - return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Issues)other); + return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Issues) other); } else { super.mergeFrom(other); return this; @@ -6365,7 +7871,8 @@ public final class BatchReport { } public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Issues other) { - if (other == org.sonar.batch.protocol.output.BatchReport.Issues.getDefaultInstance()) return this; + if (other == org.sonar.batch.protocol.output.BatchReport.Issues.getDefaultInstance()) + return this; if (other.hasComponentRef()) { setComponentRef(other.getComponentRef()); } @@ -6387,9 +7894,9 @@ public final class BatchReport { listBuilder_ = null; list_ = other.list_; bitField0_ = (bitField0_ & ~0x00000002); - listBuilder_ = + listBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getListFieldBuilder() : null; + getListFieldBuilder() : null; } else { listBuilder_.addAllMessages(other.list_); } @@ -6409,9 +7916,9 @@ public final class BatchReport { } public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { org.sonar.batch.protocol.output.BatchReport.Issues parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); @@ -6425,22 +7932,25 @@ public final class BatchReport { } return this; } + private int bitField0_; - // optional int32 component_ref = 1; - private int componentRef_ ; + private int componentRef_; + /** * optional int32 component_ref = 1; */ public boolean hasComponentRef() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * optional int32 component_ref = 1; */ public int getComponentRef() { return componentRef_; } + /** * optional int32 component_ref = 1; */ @@ -6450,6 +7960,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional int32 component_ref = 1; */ @@ -6460,18 +7971,17 @@ public final class BatchReport { return this; } - // repeated .Issue list = 2; private java.util.List list_ = java.util.Collections.emptyList(); + private void ensureListIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { list_ = new java.util.ArrayList(list_); bitField0_ |= 0x00000002; - } + } } - private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Issue, org.sonar.batch.protocol.output.BatchReport.Issue.Builder, org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder> listBuilder_; + private com.google.protobuf.RepeatedFieldBuilder listBuilder_; /** * repeated .Issue list = 2; @@ -6483,6 +7993,7 @@ public final class BatchReport { return listBuilder_.getMessageList(); } } + /** * repeated .Issue list = 2; */ @@ -6493,6 +8004,7 @@ public final class BatchReport { return listBuilder_.getCount(); } } + /** * repeated .Issue list = 2; */ @@ -6503,11 +8015,12 @@ public final class BatchReport { return listBuilder_.getMessage(index); } } + /** * repeated .Issue list = 2; */ public Builder setList( - int index, org.sonar.batch.protocol.output.BatchReport.Issue value) { + int index, org.sonar.batch.protocol.output.BatchReport.Issue value) { if (listBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -6520,11 +8033,12 @@ public final class BatchReport { } return this; } + /** * repeated .Issue list = 2; */ public Builder setList( - int index, org.sonar.batch.protocol.output.BatchReport.Issue.Builder builderForValue) { + int index, org.sonar.batch.protocol.output.BatchReport.Issue.Builder builderForValue) { if (listBuilder_ == null) { ensureListIsMutable(); list_.set(index, builderForValue.build()); @@ -6534,6 +8048,7 @@ public final class BatchReport { } return this; } + /** * repeated .Issue list = 2; */ @@ -6550,11 +8065,12 @@ public final class BatchReport { } return this; } + /** * repeated .Issue list = 2; */ public Builder addList( - int index, org.sonar.batch.protocol.output.BatchReport.Issue value) { + int index, org.sonar.batch.protocol.output.BatchReport.Issue value) { if (listBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -6567,11 +8083,12 @@ public final class BatchReport { } return this; } + /** * repeated .Issue list = 2; */ public Builder addList( - org.sonar.batch.protocol.output.BatchReport.Issue.Builder builderForValue) { + org.sonar.batch.protocol.output.BatchReport.Issue.Builder builderForValue) { if (listBuilder_ == null) { ensureListIsMutable(); list_.add(builderForValue.build()); @@ -6581,11 +8098,12 @@ public final class BatchReport { } return this; } + /** * repeated .Issue list = 2; */ public Builder addList( - int index, org.sonar.batch.protocol.output.BatchReport.Issue.Builder builderForValue) { + int index, org.sonar.batch.protocol.output.BatchReport.Issue.Builder builderForValue) { if (listBuilder_ == null) { ensureListIsMutable(); list_.add(index, builderForValue.build()); @@ -6595,20 +8113,23 @@ public final class BatchReport { } return this; } + /** * repeated .Issue list = 2; */ public Builder addAllList( - java.lang.Iterable values) { + java.lang.Iterable values) { if (listBuilder_ == null) { ensureListIsMutable(); - super.addAll(values, list_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, list_); onChanged(); } else { listBuilder_.addAllMessages(values); } return this; } + /** * repeated .Issue list = 2; */ @@ -6622,6 +8143,7 @@ public final class BatchReport { } return this; } + /** * repeated .Issue list = 2; */ @@ -6635,73 +8157,81 @@ public final class BatchReport { } return this; } + /** * repeated .Issue list = 2; */ public org.sonar.batch.protocol.output.BatchReport.Issue.Builder getListBuilder( - int index) { + int index) { return getListFieldBuilder().getBuilder(index); } + /** * repeated .Issue list = 2; */ public org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder getListOrBuilder( - int index) { + int index) { if (listBuilder_ == null) { - return list_.get(index); } else { + return list_.get(index); + } else { return listBuilder_.getMessageOrBuilder(index); } } + /** * repeated .Issue list = 2; */ - public java.util.List - getListOrBuilderList() { + public java.util.List + getListOrBuilderList() { if (listBuilder_ != null) { return listBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(list_); } } + /** * repeated .Issue list = 2; */ public org.sonar.batch.protocol.output.BatchReport.Issue.Builder addListBuilder() { return getListFieldBuilder().addBuilder( - org.sonar.batch.protocol.output.BatchReport.Issue.getDefaultInstance()); + org.sonar.batch.protocol.output.BatchReport.Issue.getDefaultInstance()); } + /** * repeated .Issue list = 2; */ public org.sonar.batch.protocol.output.BatchReport.Issue.Builder addListBuilder( - int index) { + int index) { return getListFieldBuilder().addBuilder( - index, org.sonar.batch.protocol.output.BatchReport.Issue.getDefaultInstance()); + index, org.sonar.batch.protocol.output.BatchReport.Issue.getDefaultInstance()); } + /** * repeated .Issue list = 2; */ - public java.util.List - getListBuilderList() { + public java.util.List + getListBuilderList() { return getListFieldBuilder().getBuilderList(); } + private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Issue, org.sonar.batch.protocol.output.BatchReport.Issue.Builder, org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder> - getListFieldBuilder() { + org.sonar.batch.protocol.output.BatchReport.Issue, org.sonar.batch.protocol.output.BatchReport.Issue.Builder, org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder> + getListFieldBuilder() { if (listBuilder_ == null) { listBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Issue, org.sonar.batch.protocol.output.BatchReport.Issue.Builder, org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder>( - list_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + org.sonar.batch.protocol.output.BatchReport.Issue, org.sonar.batch.protocol.output.BatchReport.Issue.Builder, org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder>( + list_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); list_ = null; } return listBuilder_; } - // optional string component_uuid = 3; private java.lang.Object componentUuid_ = ""; + /** * optional string component_uuid = 3; * @@ -6712,6 +8242,7 @@ public final class BatchReport { public boolean hasComponentUuid() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** * optional string component_uuid = 3; * @@ -6722,14 +8253,18 @@ public final class BatchReport { public java.lang.String getComponentUuid() { java.lang.Object ref = componentUuid_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - componentUuid_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + componentUuid_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string component_uuid = 3; * @@ -6738,18 +8273,19 @@ public final class BatchReport { * */ public com.google.protobuf.ByteString - getComponentUuidBytes() { + getComponentUuidBytes() { java.lang.Object ref = componentUuid_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); componentUuid_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string component_uuid = 3; * @@ -6758,15 +8294,16 @@ public final class BatchReport { * */ public Builder setComponentUuid( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; componentUuid_ = value; onChanged(); return this; } + /** * optional string component_uuid = 3; * @@ -6780,6 +8317,7 @@ public final class BatchReport { onChanged(); return this; } + /** * optional string component_uuid = 3; * @@ -6788,11 +8326,11 @@ public final class BatchReport { * */ public Builder setComponentUuidBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; componentUuid_ = value; onChanged(); return this; @@ -6809,99 +8347,100 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Issues) } - private static com.google.protobuf.Descriptors.Descriptor - internal_static_Metadata_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_Metadata_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_Component_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_Component_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_Issue_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_Issue_fieldAccessorTable; - 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 internal_static_Metadata_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Metadata_fieldAccessorTable; + private static final 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 internal_static_Component_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Component_fieldAccessorTable; + private static final 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 internal_static_Issues_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Issues_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { + getDescriptor() { return descriptor; } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n\022batch_report.proto\032\017constants.proto\"\211\001" + - "\n\010Metadata\022\025\n\ranalysis_date\030\001 \001(\003\022\023\n\013pro" + - "ject_key\030\002 \001(\t\022\032\n\022root_component_ref\030\003 \001" + - "(\005\022\023\n\013snapshot_id\030\004 \001(\003\022 \n\030deleted_compo" + - "nents_count\030\005 \001(\005\"\260\001\n\tComponent\022\013\n\003ref\030\001" + - " \001(\005\022\014\n\004path\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\022\034\n\004type" + - "\030\004 \001(\0162\016.ComponentType\022\017\n\007is_test\030\005 \001(\010\022" + - "\020\n\010language\030\006 \001(\t\022\026\n\nchild_refs\030\007 \003(\005B\002\020" + - "\001\022\023\n\013snapshot_id\030\010 \001(\005\022\014\n\004uuid\030\t \001(\t\"\232\004\n" + - "\005Issue\022\027\n\017rule_repository\030\001 \001(\t\022\020\n\010rule_", - "key\030\002 \001(\t\022\014\n\004line\030\003 \001(\005\022\013\n\003msg\030\004 \001(\t\022\033\n\010" + - "severity\030\005 \001(\0162\t.Severity\022\014\n\004tags\030\006 \003(\t\022" + - "\025\n\reffort_to_fix\030\007 \001(\001\022\016\n\006is_new\030\010 \001(\010\022\014" + - "\n\004uuid\030\t \001(\t\022\027\n\017debt_in_minutes\030\n \001(\003\022\022\n" + - "\nresolution\030\013 \001(\t\022\016\n\006status\030\014 \001(\t\022\020\n\010che" + - "cksum\030\r \001(\t\022\027\n\017manual_severity\030\016 \001(\010\022\020\n\010" + - "reporter\030\017 \001(\t\022\020\n\010assignee\030\020 \001(\t\022\027\n\017acti" + - "on_plan_key\030\021 \001(\t\022\022\n\nattributes\030\022 \001(\t\022\024\n" + - "\014author_login\030\023 \001(\t\022\025\n\rcreation_date\030\024 \001" + - "(\003\022\022\n\nclose_date\030\025 \001(\003\022\023\n\013update_date\030\026 ", - "\001(\003\022\023\n\013selected_at\030\027 \001(\003\022\023\n\013diff_fields\030" + - "\030 \001(\t\022\022\n\nis_changed\030\031 \001(\010\022\036\n\026must_send_n" + - "otification\030\032 \001(\010\"M\n\006Issues\022\025\n\rcomponent" + - "_ref\030\001 \001(\005\022\024\n\004list\030\002 \003(\0132\006.Issue\022\026\n\016comp" + - "onent_uuid\030\003 \001(\tB#\n\037org.sonar.batch.prot" + - "ocol.outputH\001" + "\n\010Metadata\022\025\n\ranalysis_date\030\001 \001(\003\022\023\n\013pro" + + "ject_key\030\002 \001(\t\022\032\n\022root_component_ref\030\003 \001" + + "(\005\022\023\n\013snapshot_id\030\004 \001(\003\022 \n\030deleted_compo" + + "nents_count\030\005 \001(\005\"?\n\rComponentLink\022 \n\004ty" + + "pe\030\001 \001(\0162\022.ComponentLinkType\022\014\n\004href\030\002 \001" + + "(\t\"\317\001\n\tComponent\022\013\n\003ref\030\001 \001(\005\022\014\n\004path\030\002 " + + "\001(\t\022\014\n\004name\030\003 \001(\t\022\034\n\004type\030\004 \001(\0162\016.Compon" + + "entType\022\017\n\007is_test\030\005 \001(\010\022\020\n\010language\030\006 \001" + + "(\t\022\026\n\nchild_refs\030\007 \003(\005B\002\020\001\022\035\n\005links\030\n \003(", + "\0132\016.ComponentLink\022\023\n\013snapshot_id\030\010 \001(\005\022\014" + + "\n\004uuid\030\t \001(\t\"\232\004\n\005Issue\022\027\n\017rule_repositor" + + "y\030\001 \001(\t\022\020\n\010rule_key\030\002 \001(\t\022\014\n\004line\030\003 \001(\005\022" + + "\013\n\003msg\030\004 \001(\t\022\033\n\010severity\030\005 \001(\0162\t.Severit" + + "y\022\014\n\004tags\030\006 \003(\t\022\025\n\reffort_to_fix\030\007 \001(\001\022\016" + + "\n\006is_new\030\010 \001(\010\022\014\n\004uuid\030\t \001(\t\022\027\n\017debt_in_" + + "minutes\030\n \001(\003\022\022\n\nresolution\030\013 \001(\t\022\016\n\006sta" + + "tus\030\014 \001(\t\022\020\n\010checksum\030\r \001(\t\022\027\n\017manual_se" + + "verity\030\016 \001(\010\022\020\n\010reporter\030\017 \001(\t\022\020\n\010assign" + + "ee\030\020 \001(\t\022\027\n\017action_plan_key\030\021 \001(\t\022\022\n\natt", + "ributes\030\022 \001(\t\022\024\n\014author_login\030\023 \001(\t\022\025\n\rc" + + "reation_date\030\024 \001(\003\022\022\n\nclose_date\030\025 \001(\003\022\023" + + "\n\013update_date\030\026 \001(\003\022\023\n\013selected_at\030\027 \001(\003" + + "\022\023\n\013diff_fields\030\030 \001(\t\022\022\n\nis_changed\030\031 \001(" + + "\010\022\036\n\026must_send_notification\030\032 \001(\010\"M\n\006Iss" + + "ues\022\025\n\rcomponent_ref\030\001 \001(\005\022\024\n\004list\030\002 \003(\013" + + "2\006.Issue\022\026\n\016component_uuid\030\003 \001(\tB#\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) { + 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", "RootComponentRef", "SnapshotId", "DeletedComponentsCount", }); - internal_static_Component_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_Component_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Component_descriptor, - new java.lang.String[] { "Ref", "Path", "Name", "Type", "IsTest", "Language", "ChildRefs", "SnapshotId", "Uuid", }); - internal_static_Issue_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_Issue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Issue_descriptor, - new java.lang.String[] { "RuleRepository", "RuleKey", "Line", "Msg", "Severity", "Tags", "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(3); - internal_static_Issues_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Issues_descriptor, - new java.lang.String[] { "ComponentRef", "List", "ComponentUuid", }); return null; } }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - org.sonar.batch.protocol.Constants.getDescriptor(), + 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", "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_Component_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_Component_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Component_descriptor, + new java.lang.String[] {"Ref", "Path", "Name", "Type", "IsTest", "Language", "ChildRefs", "Links", "SnapshotId", "Uuid",}); + internal_static_Issue_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_Issue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Issue_descriptor, + new java.lang.String[] {"RuleRepository", "RuleKey", "Line", "Msg", "Severity", "Tags", "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(4); + internal_static_Issues_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Issues_descriptor, + new java.lang.String[] {"ComponentRef", "List", "ComponentUuid",}); + 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 523344bac28..13609283ec4 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 @@ -4,39 +4,43 @@ package org.sonar.server.source.db; public final class FileSourceDb { - private FileSourceDb() {} + private FileSourceDb() { + } + public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { + com.google.protobuf.ExtensionRegistry registry) { } - public interface LineOrBuilder - extends com.google.protobuf.MessageOrBuilder { - // optional int32 line = 1; + public interface LineOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.sonar.server.source.db.Line) + com.google.protobuf.MessageOrBuilder { + /** * optional int32 line = 1; */ boolean hasLine(); + /** * optional int32 line = 1; */ int getLine(); - // optional string source = 2; /** * optional string source = 2; */ boolean hasSource(); + /** * optional string source = 2; */ java.lang.String getSource(); + /** * optional string source = 2; */ com.google.protobuf.ByteString - getSourceBytes(); + getSourceBytes(); - // optional string scm_revision = 3; /** * optional string scm_revision = 3; * @@ -45,6 +49,7 @@ public final class FileSourceDb { * */ boolean hasScmRevision(); + /** * optional string scm_revision = 3; * @@ -53,6 +58,7 @@ public final class FileSourceDb { * */ java.lang.String getScmRevision(); + /** * optional string scm_revision = 3; * @@ -61,34 +67,34 @@ public final class FileSourceDb { * */ com.google.protobuf.ByteString - getScmRevisionBytes(); + getScmRevisionBytes(); - // optional string scm_author = 4; /** * optional string scm_author = 4; */ boolean hasScmAuthor(); + /** * optional string scm_author = 4; */ java.lang.String getScmAuthor(); + /** * optional string scm_author = 4; */ com.google.protobuf.ByteString - getScmAuthorBytes(); + getScmAuthorBytes(); - // optional int64 scm_date = 5; /** * optional int64 scm_date = 5; */ boolean hasScmDate(); + /** * optional int64 scm_date = 5; */ long getScmDate(); - // optional int32 ut_line_hits = 6; /** * optional int32 ut_line_hits = 6; * @@ -97,6 +103,7 @@ public final class FileSourceDb { * */ boolean hasUtLineHits(); + /** * optional int32 ut_line_hits = 6; * @@ -106,27 +113,26 @@ public final class FileSourceDb { */ int getUtLineHits(); - // optional int32 ut_conditions = 7; /** * optional int32 ut_conditions = 7; */ boolean hasUtConditions(); + /** * optional int32 ut_conditions = 7; */ int getUtConditions(); - // optional int32 ut_covered_conditions = 8; /** * optional int32 ut_covered_conditions = 8; */ boolean hasUtCoveredConditions(); + /** * optional int32 ut_covered_conditions = 8; */ int getUtCoveredConditions(); - // optional int32 it_line_hits = 9; /** * optional int32 it_line_hits = 9; * @@ -135,6 +141,7 @@ public final class FileSourceDb { * */ boolean hasItLineHits(); + /** * optional int32 it_line_hits = 9; * @@ -144,27 +151,26 @@ public final class FileSourceDb { */ int getItLineHits(); - // optional int32 it_conditions = 10; /** * optional int32 it_conditions = 10; */ boolean hasItConditions(); + /** * optional int32 it_conditions = 10; */ int getItConditions(); - // optional int32 it_covered_conditions = 11; /** * optional int32 it_covered_conditions = 11; */ boolean hasItCoveredConditions(); + /** * optional int32 it_covered_conditions = 11; */ int getItCoveredConditions(); - // optional int32 overall_line_hits = 12; /** * optional int32 overall_line_hits = 12; * @@ -173,6 +179,7 @@ public final class FileSourceDb { * */ boolean hasOverallLineHits(); + /** * optional int32 overall_line_hits = 12; * @@ -182,65 +189,68 @@ public final class FileSourceDb { */ int getOverallLineHits(); - // optional int32 overall_conditions = 13; /** * optional int32 overall_conditions = 13; */ boolean hasOverallConditions(); + /** * optional int32 overall_conditions = 13; */ int getOverallConditions(); - // optional int32 overall_covered_conditions = 14; /** * optional int32 overall_covered_conditions = 14; */ boolean hasOverallCoveredConditions(); + /** * optional int32 overall_covered_conditions = 14; */ int getOverallCoveredConditions(); - // optional string highlighting = 15; /** * optional string highlighting = 15; */ boolean hasHighlighting(); + /** * optional string highlighting = 15; */ java.lang.String getHighlighting(); + /** * optional string highlighting = 15; */ com.google.protobuf.ByteString - getHighlightingBytes(); + getHighlightingBytes(); - // optional string symbols = 16; /** * optional string symbols = 16; */ boolean hasSymbols(); + /** * optional string symbols = 16; */ java.lang.String getSymbols(); + /** * optional string symbols = 16; */ com.google.protobuf.ByteString - getSymbolsBytes(); + getSymbolsBytes(); - // repeated int32 duplications = 17 [packed = true]; /** * repeated int32 duplications = 17 [packed = true]; */ java.util.List getDuplicationsList(); + /** * repeated int32 duplications = 17 [packed = true]; */ int getDuplicationsCount(); + /** * repeated int32 duplications = 17 [packed = true]; */ @@ -250,16 +260,21 @@ public final class FileSourceDb { * Protobuf type {@code org.sonar.server.source.db.Line} */ public static final class Line extends - com.google.protobuf.GeneratedMessage - implements LineOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:org.sonar.server.source.db.Line) + LineOrBuilder { // Use Line.newBuilder() to construct. private Line(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private Line(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private Line(boolean noInit) { + this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final Line defaultInstance; + public static Line getDefaultInstance() { return defaultInstance; } @@ -269,19 +284,21 @@ public final class FileSourceDb { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } + private Line( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -292,7 +309,7 @@ public final class FileSourceDb { break; default: { if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + extensionRegistry, tag)) { done = true; } break; @@ -303,18 +320,21 @@ public final class FileSourceDb { break; } case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - source_ = input.readBytes(); + source_ = bs; break; } case 26: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000004; - scmRevision_ = input.readBytes(); + scmRevision_ = bs; break; } case 34: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000008; - scmAuthor_ = input.readBytes(); + scmAuthor_ = bs; break; } case 40: { @@ -368,13 +388,15 @@ public final class FileSourceDb { break; } case 122: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00004000; - highlighting_ = input.readBytes(); + highlighting_ = bs; break; } case 130: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00008000; - symbols_ = input.readBytes(); + symbols_ = bs; break; } case 136: { @@ -404,7 +426,7 @@ public final class FileSourceDb { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00010000) == 0x00010000)) { duplications_ = java.util.Collections.unmodifiableList(duplications_); @@ -413,27 +435,28 @@ public final class FileSourceDb { makeExtensionsImmutable(); } } + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Line_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Line_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.server.source.db.FileSourceDb.Line.class, org.sonar.server.source.db.FileSourceDb.Line.Builder.class); + .ensureFieldAccessorsInitialized( + org.sonar.server.source.db.FileSourceDb.Line.class, org.sonar.server.source.db.FileSourceDb.Line.Builder.class); } public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Line parsePartialFrom( + new com.google.protobuf.AbstractParser() { + public Line parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Line(input, extensionRegistry); - } - }; + return new Line(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { @@ -441,15 +464,16 @@ public final class FileSourceDb { } private int bitField0_; - // optional int32 line = 1; public static final int LINE_FIELD_NUMBER = 1; private int line_; + /** * optional int32 line = 1; */ public boolean hasLine() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * optional int32 line = 1; */ @@ -457,15 +481,16 @@ public final class FileSourceDb { return line_; } - // optional string source = 2; public static final int SOURCE_FIELD_NUMBER = 2; private java.lang.Object source_; + /** * optional string source = 2; */ public boolean hasSource() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** * optional string source = 2; */ @@ -474,8 +499,8 @@ public final class FileSourceDb { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { source_ = s; @@ -483,16 +508,17 @@ public final class FileSourceDb { return s; } } + /** * optional string source = 2; */ public com.google.protobuf.ByteString - getSourceBytes() { + getSourceBytes() { java.lang.Object ref = source_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); source_ = b; return b; } else { @@ -500,9 +526,9 @@ public final class FileSourceDb { } } - // optional string scm_revision = 3; public static final int SCM_REVISION_FIELD_NUMBER = 3; private java.lang.Object scmRevision_; + /** * optional string scm_revision = 3; * @@ -513,6 +539,7 @@ public final class FileSourceDb { public boolean hasScmRevision() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** * optional string scm_revision = 3; * @@ -525,8 +552,8 @@ public final class FileSourceDb { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { scmRevision_ = s; @@ -534,6 +561,7 @@ public final class FileSourceDb { return s; } } + /** * optional string scm_revision = 3; * @@ -542,12 +570,12 @@ public final class FileSourceDb { * */ public com.google.protobuf.ByteString - getScmRevisionBytes() { + getScmRevisionBytes() { java.lang.Object ref = scmRevision_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); scmRevision_ = b; return b; } else { @@ -555,15 +583,16 @@ public final class FileSourceDb { } } - // optional string scm_author = 4; public static final int SCM_AUTHOR_FIELD_NUMBER = 4; private java.lang.Object scmAuthor_; + /** * optional string scm_author = 4; */ public boolean hasScmAuthor() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** * optional string scm_author = 4; */ @@ -572,8 +601,8 @@ public final class FileSourceDb { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { scmAuthor_ = s; @@ -581,16 +610,17 @@ public final class FileSourceDb { return s; } } + /** * optional string scm_author = 4; */ public com.google.protobuf.ByteString - getScmAuthorBytes() { + getScmAuthorBytes() { java.lang.Object ref = scmAuthor_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); scmAuthor_ = b; return b; } else { @@ -598,15 +628,16 @@ public final class FileSourceDb { } } - // optional int64 scm_date = 5; public static final int SCM_DATE_FIELD_NUMBER = 5; private long scmDate_; + /** * optional int64 scm_date = 5; */ public boolean hasScmDate() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** * optional int64 scm_date = 5; */ @@ -614,9 +645,9 @@ 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_; + /** * optional int32 ut_line_hits = 6; * @@ -627,6 +658,7 @@ public final class FileSourceDb { public boolean hasUtLineHits() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** * optional int32 ut_line_hits = 6; * @@ -638,15 +670,16 @@ public final class FileSourceDb { return utLineHits_; } - // optional int32 ut_conditions = 7; public static final int UT_CONDITIONS_FIELD_NUMBER = 7; private int utConditions_; + /** * optional int32 ut_conditions = 7; */ public boolean hasUtConditions() { return ((bitField0_ & 0x00000040) == 0x00000040); } + /** * optional int32 ut_conditions = 7; */ @@ -654,15 +687,16 @@ 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_; + /** * optional int32 ut_covered_conditions = 8; */ public boolean hasUtCoveredConditions() { return ((bitField0_ & 0x00000080) == 0x00000080); } + /** * optional int32 ut_covered_conditions = 8; */ @@ -670,9 +704,9 @@ 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_; + /** * optional int32 it_line_hits = 9; * @@ -683,6 +717,7 @@ public final class FileSourceDb { public boolean hasItLineHits() { return ((bitField0_ & 0x00000100) == 0x00000100); } + /** * optional int32 it_line_hits = 9; * @@ -694,15 +729,16 @@ public final class FileSourceDb { return itLineHits_; } - // optional int32 it_conditions = 10; public static final int IT_CONDITIONS_FIELD_NUMBER = 10; private int itConditions_; + /** * optional int32 it_conditions = 10; */ public boolean hasItConditions() { return ((bitField0_ & 0x00000200) == 0x00000200); } + /** * optional int32 it_conditions = 10; */ @@ -710,15 +746,16 @@ 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_; + /** * optional int32 it_covered_conditions = 11; */ public boolean hasItCoveredConditions() { return ((bitField0_ & 0x00000400) == 0x00000400); } + /** * optional int32 it_covered_conditions = 11; */ @@ -726,9 +763,9 @@ 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_; + /** * optional int32 overall_line_hits = 12; * @@ -739,6 +776,7 @@ public final class FileSourceDb { public boolean hasOverallLineHits() { return ((bitField0_ & 0x00000800) == 0x00000800); } + /** * optional int32 overall_line_hits = 12; * @@ -750,15 +788,16 @@ public final class FileSourceDb { return overallLineHits_; } - // optional int32 overall_conditions = 13; public static final int OVERALL_CONDITIONS_FIELD_NUMBER = 13; private int overallConditions_; + /** * optional int32 overall_conditions = 13; */ public boolean hasOverallConditions() { return ((bitField0_ & 0x00001000) == 0x00001000); } + /** * optional int32 overall_conditions = 13; */ @@ -766,15 +805,16 @@ 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_; + /** * optional int32 overall_covered_conditions = 14; */ public boolean hasOverallCoveredConditions() { return ((bitField0_ & 0x00002000) == 0x00002000); } + /** * optional int32 overall_covered_conditions = 14; */ @@ -782,15 +822,16 @@ public final class FileSourceDb { return overallCoveredConditions_; } - // optional string highlighting = 15; public static final int HIGHLIGHTING_FIELD_NUMBER = 15; private java.lang.Object highlighting_; + /** * optional string highlighting = 15; */ public boolean hasHighlighting() { return ((bitField0_ & 0x00004000) == 0x00004000); } + /** * optional string highlighting = 15; */ @@ -799,8 +840,8 @@ public final class FileSourceDb { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { highlighting_ = s; @@ -808,16 +849,17 @@ public final class FileSourceDb { return s; } } + /** * optional string highlighting = 15; */ public com.google.protobuf.ByteString - getHighlightingBytes() { + getHighlightingBytes() { java.lang.Object ref = highlighting_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); highlighting_ = b; return b; } else { @@ -825,15 +867,16 @@ public final class FileSourceDb { } } - // optional string symbols = 16; public static final int SYMBOLS_FIELD_NUMBER = 16; private java.lang.Object symbols_; + /** * optional string symbols = 16; */ public boolean hasSymbols() { return ((bitField0_ & 0x00008000) == 0x00008000); } + /** * optional string symbols = 16; */ @@ -842,8 +885,8 @@ public final class FileSourceDb { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { symbols_ = s; @@ -851,16 +894,17 @@ public final class FileSourceDb { return s; } } + /** * optional string symbols = 16; */ public com.google.protobuf.ByteString - getSymbolsBytes() { + getSymbolsBytes() { java.lang.Object ref = symbols_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); symbols_ = b; return b; } else { @@ -868,28 +912,31 @@ public final class FileSourceDb { } } - // repeated int32 duplications = 17 [packed = true]; public static final int DUPLICATIONS_FIELD_NUMBER = 17; private java.util.List duplications_; + /** * repeated int32 duplications = 17 [packed = true]; */ public java.util.List - getDuplicationsList() { + getDuplicationsList() { return duplications_; } + /** * repeated int32 duplications = 17 [packed = true]; */ public int getDuplicationsCount() { return duplications_.size(); } + /** * repeated int32 duplications = 17 [packed = true]; */ public int getDuplications(int index) { return duplications_.get(index); } + private int duplicationsMemoizedSerializedSize = -1; private void initFields() { @@ -911,17 +958,22 @@ public final class FileSourceDb { symbols_ = ""; duplications_ = java.util.Collections.emptyList(); } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt32(1, line_); @@ -982,9 +1034,11 @@ public final class FileSourceDb { } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { @@ -1061,7 +1115,7 @@ public final class FileSourceDb { if (!getDuplicationsList().isEmpty()) { size += 2; size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); + .computeInt32SizeNoTag(dataSize); } duplicationsMemoizedSerializedSize = dataSize; } @@ -1071,94 +1125,115 @@ public final class FileSourceDb { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.sonar.server.source.db.FileSourceDb.Line parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.sonar.server.source.db.FileSourceDb.Line parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static org.sonar.server.source.db.FileSourceDb.Line parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.sonar.server.source.db.FileSourceDb.Line parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static org.sonar.server.source.db.FileSourceDb.Line parseFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.sonar.server.source.db.FileSourceDb.Line parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } + public static org.sonar.server.source.db.FileSourceDb.Line parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.sonar.server.source.db.FileSourceDb.Line parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.sonar.server.source.db.FileSourceDb.Line parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.sonar.server.source.db.FileSourceDb.Line parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder(org.sonar.server.source.db.FileSourceDb.Line prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.sonar.server.source.db.Line} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.sonar.server.source.db.FileSourceDb.LineOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:org.sonar.server.source.db.Line) + org.sonar.server.source.db.FileSourceDb.LineOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Line_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Line_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.server.source.db.FileSourceDb.Line.class, org.sonar.server.source.db.FileSourceDb.Line.Builder.class); + .ensureFieldAccessorsInitialized( + org.sonar.server.source.db.FileSourceDb.Line.class, org.sonar.server.source.db.FileSourceDb.Line.Builder.class); } // Construct using org.sonar.server.source.db.FileSourceDb.Line.newBuilder() @@ -1167,14 +1242,16 @@ public final class FileSourceDb { } private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -1223,7 +1300,7 @@ public final class FileSourceDb { } public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + getDescriptorForType() { return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Line_descriptor; } @@ -1319,7 +1396,7 @@ public final class FileSourceDb { public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.sonar.server.source.db.FileSourceDb.Line) { - return mergeFrom((org.sonar.server.source.db.FileSourceDb.Line)other); + return mergeFrom((org.sonar.server.source.db.FileSourceDb.Line) other); } else { super.mergeFrom(other); return this; @@ -1327,7 +1404,8 @@ public final class FileSourceDb { } public Builder mergeFrom(org.sonar.server.source.db.FileSourceDb.Line other) { - if (other == org.sonar.server.source.db.FileSourceDb.Line.getDefaultInstance()) return this; + if (other == org.sonar.server.source.db.FileSourceDb.Line.getDefaultInstance()) + return this; if (other.hasLine()) { setLine(other.getLine()); } @@ -1405,9 +1483,9 @@ public final class FileSourceDb { } public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { org.sonar.server.source.db.FileSourceDb.Line parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); @@ -1421,22 +1499,25 @@ public final class FileSourceDb { } return this; } + private int bitField0_; - // optional int32 line = 1; - private int line_ ; + private int line_; + /** * optional int32 line = 1; */ public boolean hasLine() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * optional int32 line = 1; */ public int getLine() { return line_; } + /** * optional int32 line = 1; */ @@ -1446,6 +1527,7 @@ public final class FileSourceDb { onChanged(); return this; } + /** * optional int32 line = 1; */ @@ -1456,57 +1538,64 @@ public final class FileSourceDb { return this; } - // optional string source = 2; private java.lang.Object source_ = ""; + /** * optional string source = 2; */ public boolean hasSource() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** * optional string source = 2; */ public java.lang.String getSource() { java.lang.Object ref = source_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - source_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + source_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string source = 2; */ public com.google.protobuf.ByteString - getSourceBytes() { + getSourceBytes() { java.lang.Object ref = source_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); source_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string source = 2; */ public Builder setSource( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; source_ = value; onChanged(); return this; } + /** * optional string source = 2; */ @@ -1516,22 +1605,23 @@ public final class FileSourceDb { onChanged(); return this; } + /** * optional string source = 2; */ public Builder setSourceBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; source_ = value; onChanged(); return this; } - // optional string scm_revision = 3; private java.lang.Object scmRevision_ = ""; + /** * optional string scm_revision = 3; * @@ -1542,6 +1632,7 @@ public final class FileSourceDb { public boolean hasScmRevision() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** * optional string scm_revision = 3; * @@ -1552,14 +1643,18 @@ public final class FileSourceDb { public java.lang.String getScmRevision() { java.lang.Object ref = scmRevision_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - scmRevision_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + scmRevision_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string scm_revision = 3; * @@ -1568,18 +1663,19 @@ public final class FileSourceDb { * */ public com.google.protobuf.ByteString - getScmRevisionBytes() { + getScmRevisionBytes() { java.lang.Object ref = scmRevision_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); scmRevision_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string scm_revision = 3; * @@ -1588,15 +1684,16 @@ public final class FileSourceDb { * */ public Builder setScmRevision( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; scmRevision_ = value; onChanged(); return this; } + /** * optional string scm_revision = 3; * @@ -1610,6 +1707,7 @@ public final class FileSourceDb { onChanged(); return this; } + /** * optional string scm_revision = 3; * @@ -1618,67 +1716,74 @@ public final class FileSourceDb { * */ public Builder setScmRevisionBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; scmRevision_ = value; onChanged(); return this; } - // optional string scm_author = 4; private java.lang.Object scmAuthor_ = ""; + /** * optional string scm_author = 4; */ public boolean hasScmAuthor() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** * optional string scm_author = 4; */ public java.lang.String getScmAuthor() { java.lang.Object ref = scmAuthor_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - scmAuthor_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + scmAuthor_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string scm_author = 4; */ public com.google.protobuf.ByteString - getScmAuthorBytes() { + getScmAuthorBytes() { java.lang.Object ref = scmAuthor_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); scmAuthor_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string scm_author = 4; */ public Builder setScmAuthor( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; scmAuthor_ = value; onChanged(); return this; } + /** * optional string scm_author = 4; */ @@ -1688,34 +1793,37 @@ public final class FileSourceDb { onChanged(); return this; } + /** * optional string scm_author = 4; */ public Builder setScmAuthorBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; scmAuthor_ = value; onChanged(); return this; } - // optional int64 scm_date = 5; - private long scmDate_ ; + private long scmDate_; + /** * optional int64 scm_date = 5; */ public boolean hasScmDate() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** * optional int64 scm_date = 5; */ public long getScmDate() { return scmDate_; } + /** * optional int64 scm_date = 5; */ @@ -1725,6 +1833,7 @@ public final class FileSourceDb { onChanged(); return this; } + /** * optional int64 scm_date = 5; */ @@ -1735,8 +1844,8 @@ public final class FileSourceDb { return this; } - // optional int32 ut_line_hits = 6; - private int utLineHits_ ; + private int utLineHits_; + /** * optional int32 ut_line_hits = 6; * @@ -1747,6 +1856,7 @@ public final class FileSourceDb { public boolean hasUtLineHits() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** * optional int32 ut_line_hits = 6; * @@ -1757,6 +1867,7 @@ public final class FileSourceDb { public int getUtLineHits() { return utLineHits_; } + /** * optional int32 ut_line_hits = 6; * @@ -1770,6 +1881,7 @@ public final class FileSourceDb { onChanged(); return this; } + /** * optional int32 ut_line_hits = 6; * @@ -1784,20 +1896,22 @@ public final class FileSourceDb { return this; } - // optional int32 ut_conditions = 7; - private int utConditions_ ; + private int utConditions_; + /** * optional int32 ut_conditions = 7; */ public boolean hasUtConditions() { return ((bitField0_ & 0x00000040) == 0x00000040); } + /** * optional int32 ut_conditions = 7; */ public int getUtConditions() { return utConditions_; } + /** * optional int32 ut_conditions = 7; */ @@ -1807,6 +1921,7 @@ public final class FileSourceDb { onChanged(); return this; } + /** * optional int32 ut_conditions = 7; */ @@ -1817,20 +1932,22 @@ public final class FileSourceDb { return this; } - // optional int32 ut_covered_conditions = 8; - private int utCoveredConditions_ ; + private int utCoveredConditions_; + /** * optional int32 ut_covered_conditions = 8; */ public boolean hasUtCoveredConditions() { return ((bitField0_ & 0x00000080) == 0x00000080); } + /** * optional int32 ut_covered_conditions = 8; */ public int getUtCoveredConditions() { return utCoveredConditions_; } + /** * optional int32 ut_covered_conditions = 8; */ @@ -1840,6 +1957,7 @@ public final class FileSourceDb { onChanged(); return this; } + /** * optional int32 ut_covered_conditions = 8; */ @@ -1850,8 +1968,8 @@ public final class FileSourceDb { return this; } - // optional int32 it_line_hits = 9; - private int itLineHits_ ; + private int itLineHits_; + /** * optional int32 it_line_hits = 9; * @@ -1862,6 +1980,7 @@ public final class FileSourceDb { public boolean hasItLineHits() { return ((bitField0_ & 0x00000100) == 0x00000100); } + /** * optional int32 it_line_hits = 9; * @@ -1872,6 +1991,7 @@ public final class FileSourceDb { public int getItLineHits() { return itLineHits_; } + /** * optional int32 it_line_hits = 9; * @@ -1885,6 +2005,7 @@ public final class FileSourceDb { onChanged(); return this; } + /** * optional int32 it_line_hits = 9; * @@ -1899,20 +2020,22 @@ public final class FileSourceDb { return this; } - // optional int32 it_conditions = 10; - private int itConditions_ ; + private int itConditions_; + /** * optional int32 it_conditions = 10; */ public boolean hasItConditions() { return ((bitField0_ & 0x00000200) == 0x00000200); } + /** * optional int32 it_conditions = 10; */ public int getItConditions() { return itConditions_; } + /** * optional int32 it_conditions = 10; */ @@ -1922,6 +2045,7 @@ public final class FileSourceDb { onChanged(); return this; } + /** * optional int32 it_conditions = 10; */ @@ -1932,20 +2056,22 @@ public final class FileSourceDb { return this; } - // optional int32 it_covered_conditions = 11; - private int itCoveredConditions_ ; + private int itCoveredConditions_; + /** * optional int32 it_covered_conditions = 11; */ public boolean hasItCoveredConditions() { return ((bitField0_ & 0x00000400) == 0x00000400); } + /** * optional int32 it_covered_conditions = 11; */ public int getItCoveredConditions() { return itCoveredConditions_; } + /** * optional int32 it_covered_conditions = 11; */ @@ -1955,6 +2081,7 @@ public final class FileSourceDb { onChanged(); return this; } + /** * optional int32 it_covered_conditions = 11; */ @@ -1965,8 +2092,8 @@ public final class FileSourceDb { return this; } - // optional int32 overall_line_hits = 12; - private int overallLineHits_ ; + private int overallLineHits_; + /** * optional int32 overall_line_hits = 12; * @@ -1977,6 +2104,7 @@ public final class FileSourceDb { public boolean hasOverallLineHits() { return ((bitField0_ & 0x00000800) == 0x00000800); } + /** * optional int32 overall_line_hits = 12; * @@ -1987,6 +2115,7 @@ public final class FileSourceDb { public int getOverallLineHits() { return overallLineHits_; } + /** * optional int32 overall_line_hits = 12; * @@ -2000,6 +2129,7 @@ public final class FileSourceDb { onChanged(); return this; } + /** * optional int32 overall_line_hits = 12; * @@ -2014,20 +2144,22 @@ public final class FileSourceDb { return this; } - // optional int32 overall_conditions = 13; - private int overallConditions_ ; + private int overallConditions_; + /** * optional int32 overall_conditions = 13; */ public boolean hasOverallConditions() { return ((bitField0_ & 0x00001000) == 0x00001000); } + /** * optional int32 overall_conditions = 13; */ public int getOverallConditions() { return overallConditions_; } + /** * optional int32 overall_conditions = 13; */ @@ -2037,6 +2169,7 @@ public final class FileSourceDb { onChanged(); return this; } + /** * optional int32 overall_conditions = 13; */ @@ -2047,20 +2180,22 @@ public final class FileSourceDb { return this; } - // optional int32 overall_covered_conditions = 14; - private int overallCoveredConditions_ ; + private int overallCoveredConditions_; + /** * optional int32 overall_covered_conditions = 14; */ public boolean hasOverallCoveredConditions() { return ((bitField0_ & 0x00002000) == 0x00002000); } + /** * optional int32 overall_covered_conditions = 14; */ public int getOverallCoveredConditions() { return overallCoveredConditions_; } + /** * optional int32 overall_covered_conditions = 14; */ @@ -2070,6 +2205,7 @@ public final class FileSourceDb { onChanged(); return this; } + /** * optional int32 overall_covered_conditions = 14; */ @@ -2080,57 +2216,64 @@ public final class FileSourceDb { return this; } - // optional string highlighting = 15; private java.lang.Object highlighting_ = ""; + /** * optional string highlighting = 15; */ public boolean hasHighlighting() { return ((bitField0_ & 0x00004000) == 0x00004000); } + /** * optional string highlighting = 15; */ public java.lang.String getHighlighting() { java.lang.Object ref = highlighting_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - highlighting_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + highlighting_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string highlighting = 15; */ public com.google.protobuf.ByteString - getHighlightingBytes() { + getHighlightingBytes() { java.lang.Object ref = highlighting_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); highlighting_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string highlighting = 15; */ public Builder setHighlighting( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00004000; + throw new NullPointerException(); + } + bitField0_ |= 0x00004000; highlighting_ = value; onChanged(); return this; } + /** * optional string highlighting = 15; */ @@ -2140,71 +2283,79 @@ public final class FileSourceDb { onChanged(); return this; } + /** * optional string highlighting = 15; */ public Builder setHighlightingBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00004000; + throw new NullPointerException(); + } + bitField0_ |= 0x00004000; highlighting_ = value; onChanged(); return this; } - // optional string symbols = 16; private java.lang.Object symbols_ = ""; + /** * optional string symbols = 16; */ public boolean hasSymbols() { return ((bitField0_ & 0x00008000) == 0x00008000); } + /** * optional string symbols = 16; */ public java.lang.String getSymbols() { java.lang.Object ref = symbols_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - symbols_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + symbols_ = s; + } return s; } else { return (java.lang.String) ref; } } + /** * optional string symbols = 16; */ public com.google.protobuf.ByteString - getSymbolsBytes() { + getSymbolsBytes() { java.lang.Object ref = symbols_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); symbols_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * optional string symbols = 16; */ public Builder setSymbols( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00008000; + throw new NullPointerException(); + } + bitField0_ |= 0x00008000; symbols_ = value; onChanged(); return this; } + /** * optional string symbols = 16; */ @@ -2214,57 +2365,63 @@ public final class FileSourceDb { onChanged(); return this; } + /** * optional string symbols = 16; */ public Builder setSymbolsBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00008000; + throw new NullPointerException(); + } + bitField0_ |= 0x00008000; symbols_ = value; onChanged(); return this; } - // repeated int32 duplications = 17 [packed = true]; private java.util.List duplications_ = java.util.Collections.emptyList(); + private void ensureDuplicationsIsMutable() { if (!((bitField0_ & 0x00010000) == 0x00010000)) { duplications_ = new java.util.ArrayList(duplications_); bitField0_ |= 0x00010000; - } + } } + /** * repeated int32 duplications = 17 [packed = true]; */ public java.util.List - getDuplicationsList() { + getDuplicationsList() { return java.util.Collections.unmodifiableList(duplications_); } + /** * repeated int32 duplications = 17 [packed = true]; */ public int getDuplicationsCount() { return duplications_.size(); } + /** * repeated int32 duplications = 17 [packed = true]; */ public int getDuplications(int index) { return duplications_.get(index); } + /** * repeated int32 duplications = 17 [packed = true]; */ public Builder setDuplications( - int index, int value) { + int index, int value) { ensureDuplicationsIsMutable(); duplications_.set(index, value); onChanged(); return this; } + /** * repeated int32 duplications = 17 [packed = true]; */ @@ -2274,16 +2431,19 @@ public final class FileSourceDb { onChanged(); return this; } + /** * repeated int32 duplications = 17 [packed = true]; */ public Builder addAllDuplications( - java.lang.Iterable values) { + java.lang.Iterable values) { ensureDuplicationsIsMutable(); - super.addAll(values, duplications_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, duplications_); onChanged(); return this; } + /** * repeated int32 duplications = 17 [packed = true]; */ @@ -2305,48 +2465,57 @@ public final class FileSourceDb { // @@protoc_insertion_point(class_scope:org.sonar.server.source.db.Line) } - public interface DataOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface DataOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.sonar.server.source.db.Data) + com.google.protobuf.MessageOrBuilder { - // repeated .org.sonar.server.source.db.Line lines = 1; /** * repeated .org.sonar.server.source.db.Line lines = 1; */ - java.util.List - getLinesList(); + java.util.List + getLinesList(); + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ org.sonar.server.source.db.FileSourceDb.Line getLines(int index); + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ int getLinesCount(); + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ - java.util.List - getLinesOrBuilderList(); + java.util.List + getLinesOrBuilderList(); + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ org.sonar.server.source.db.FileSourceDb.LineOrBuilder getLinesOrBuilder( - int index); + int index); } /** * Protobuf type {@code org.sonar.server.source.db.Data} */ public static final class Data extends - com.google.protobuf.GeneratedMessage - implements DataOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:org.sonar.server.source.db.Data) + DataOrBuilder { // Use Data.newBuilder() to construct. private Data(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private Data(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private Data(boolean noInit) { + this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final Data defaultInstance; + public static Data getDefaultInstance() { return defaultInstance; } @@ -2356,19 +2525,21 @@ public final class FileSourceDb { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } + private Data( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -2379,7 +2550,7 @@ public final class FileSourceDb { break; default: { if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + extensionRegistry, tag)) { done = true; } break; @@ -2398,7 +2569,7 @@ public final class FileSourceDb { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { lines_ = java.util.Collections.unmodifiableList(lines_); @@ -2407,83 +2578,93 @@ public final class FileSourceDb { makeExtensionsImmutable(); } } + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Data_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Data_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.server.source.db.FileSourceDb.Data.class, org.sonar.server.source.db.FileSourceDb.Data.Builder.class); + .ensureFieldAccessorsInitialized( + org.sonar.server.source.db.FileSourceDb.Data.class, org.sonar.server.source.db.FileSourceDb.Data.Builder.class); } public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Data parsePartialFrom( + new com.google.protobuf.AbstractParser() { + public Data parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Data(input, extensionRegistry); - } - }; + return new Data(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - // repeated .org.sonar.server.source.db.Line lines = 1; public static final int LINES_FIELD_NUMBER = 1; private java.util.List lines_; + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ public java.util.List getLinesList() { return lines_; } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ - public java.util.List - getLinesOrBuilderList() { + public java.util.List + getLinesOrBuilderList() { return lines_; } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ public int getLinesCount() { return lines_.size(); } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ public org.sonar.server.source.db.FileSourceDb.Line getLines(int index) { return lines_.get(index); } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ public org.sonar.server.source.db.FileSourceDb.LineOrBuilder getLinesOrBuilder( - int index) { + int index) { return lines_.get(index); } private void initFields() { lines_ = java.util.Collections.emptyList(); } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); for (int i = 0; i < lines_.size(); i++) { output.writeMessage(1, lines_.get(i)); @@ -2492,9 +2673,11 @@ public final class FileSourceDb { } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; for (int i = 0; i < lines_.size(); i++) { @@ -2507,94 +2690,115 @@ public final class FileSourceDb { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.sonar.server.source.db.FileSourceDb.Data parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.sonar.server.source.db.FileSourceDb.Data parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static org.sonar.server.source.db.FileSourceDb.Data parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.sonar.server.source.db.FileSourceDb.Data parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static org.sonar.server.source.db.FileSourceDb.Data parseFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.sonar.server.source.db.FileSourceDb.Data parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } + public static org.sonar.server.source.db.FileSourceDb.Data parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.sonar.server.source.db.FileSourceDb.Data parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.sonar.server.source.db.FileSourceDb.Data parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.sonar.server.source.db.FileSourceDb.Data parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder(org.sonar.server.source.db.FileSourceDb.Data prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.sonar.server.source.db.Data} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.sonar.server.source.db.FileSourceDb.DataOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:org.sonar.server.source.db.Data) + org.sonar.server.source.db.FileSourceDb.DataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Data_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Data_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.server.source.db.FileSourceDb.Data.class, org.sonar.server.source.db.FileSourceDb.Data.Builder.class); + .ensureFieldAccessorsInitialized( + org.sonar.server.source.db.FileSourceDb.Data.class, org.sonar.server.source.db.FileSourceDb.Data.Builder.class); } // Construct using org.sonar.server.source.db.FileSourceDb.Data.newBuilder() @@ -2603,15 +2807,17 @@ public final class FileSourceDb { } private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getLinesFieldBuilder(); } } + private static Builder create() { return new Builder(); } @@ -2632,7 +2838,7 @@ public final class FileSourceDb { } public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + getDescriptorForType() { return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Data_descriptor; } @@ -2666,7 +2872,7 @@ public final class FileSourceDb { public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.sonar.server.source.db.FileSourceDb.Data) { - return mergeFrom((org.sonar.server.source.db.FileSourceDb.Data)other); + return mergeFrom((org.sonar.server.source.db.FileSourceDb.Data) other); } else { super.mergeFrom(other); return this; @@ -2674,7 +2880,8 @@ public final class FileSourceDb { } public Builder mergeFrom(org.sonar.server.source.db.FileSourceDb.Data other) { - if (other == org.sonar.server.source.db.FileSourceDb.Data.getDefaultInstance()) return this; + if (other == org.sonar.server.source.db.FileSourceDb.Data.getDefaultInstance()) + return this; if (linesBuilder_ == null) { if (!other.lines_.isEmpty()) { if (lines_.isEmpty()) { @@ -2693,9 +2900,9 @@ public final class FileSourceDb { linesBuilder_ = null; lines_ = other.lines_; bitField0_ = (bitField0_ & ~0x00000001); - linesBuilder_ = + linesBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getLinesFieldBuilder() : null; + getLinesFieldBuilder() : null; } else { linesBuilder_.addAllMessages(other.lines_); } @@ -2710,9 +2917,9 @@ public final class FileSourceDb { } public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { org.sonar.server.source.db.FileSourceDb.Data parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); @@ -2726,20 +2933,20 @@ public final class FileSourceDb { } return this; } + private int bitField0_; - // repeated .org.sonar.server.source.db.Line lines = 1; private java.util.List lines_ = java.util.Collections.emptyList(); + private void ensureLinesIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { lines_ = new java.util.ArrayList(lines_); bitField0_ |= 0x00000001; - } + } } - private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.server.source.db.FileSourceDb.Line, org.sonar.server.source.db.FileSourceDb.Line.Builder, org.sonar.server.source.db.FileSourceDb.LineOrBuilder> linesBuilder_; + private com.google.protobuf.RepeatedFieldBuilder linesBuilder_; /** * repeated .org.sonar.server.source.db.Line lines = 1; @@ -2751,6 +2958,7 @@ public final class FileSourceDb { return linesBuilder_.getMessageList(); } } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ @@ -2761,6 +2969,7 @@ public final class FileSourceDb { return linesBuilder_.getCount(); } } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ @@ -2771,11 +2980,12 @@ public final class FileSourceDb { return linesBuilder_.getMessage(index); } } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ public Builder setLines( - int index, org.sonar.server.source.db.FileSourceDb.Line value) { + int index, org.sonar.server.source.db.FileSourceDb.Line value) { if (linesBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -2788,11 +2998,12 @@ public final class FileSourceDb { } return this; } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ public Builder setLines( - int index, org.sonar.server.source.db.FileSourceDb.Line.Builder builderForValue) { + int index, org.sonar.server.source.db.FileSourceDb.Line.Builder builderForValue) { if (linesBuilder_ == null) { ensureLinesIsMutable(); lines_.set(index, builderForValue.build()); @@ -2802,6 +3013,7 @@ public final class FileSourceDb { } return this; } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ @@ -2818,11 +3030,12 @@ public final class FileSourceDb { } return this; } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ public Builder addLines( - int index, org.sonar.server.source.db.FileSourceDb.Line value) { + int index, org.sonar.server.source.db.FileSourceDb.Line value) { if (linesBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -2835,11 +3048,12 @@ public final class FileSourceDb { } return this; } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ public Builder addLines( - org.sonar.server.source.db.FileSourceDb.Line.Builder builderForValue) { + org.sonar.server.source.db.FileSourceDb.Line.Builder builderForValue) { if (linesBuilder_ == null) { ensureLinesIsMutable(); lines_.add(builderForValue.build()); @@ -2849,11 +3063,12 @@ public final class FileSourceDb { } return this; } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ public Builder addLines( - int index, org.sonar.server.source.db.FileSourceDb.Line.Builder builderForValue) { + int index, org.sonar.server.source.db.FileSourceDb.Line.Builder builderForValue) { if (linesBuilder_ == null) { ensureLinesIsMutable(); lines_.add(index, builderForValue.build()); @@ -2863,20 +3078,23 @@ public final class FileSourceDb { } return this; } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ public Builder addAllLines( - java.lang.Iterable values) { + java.lang.Iterable values) { if (linesBuilder_ == null) { ensureLinesIsMutable(); - super.addAll(values, lines_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, lines_); onChanged(); } else { linesBuilder_.addAllMessages(values); } return this; } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ @@ -2890,6 +3108,7 @@ public final class FileSourceDb { } return this; } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ @@ -2903,66 +3122,74 @@ public final class FileSourceDb { } return this; } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ public org.sonar.server.source.db.FileSourceDb.Line.Builder getLinesBuilder( - int index) { + int index) { return getLinesFieldBuilder().getBuilder(index); } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ public org.sonar.server.source.db.FileSourceDb.LineOrBuilder getLinesOrBuilder( - int index) { + int index) { if (linesBuilder_ == null) { - return lines_.get(index); } else { + return lines_.get(index); + } else { return linesBuilder_.getMessageOrBuilder(index); } } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ - public java.util.List - getLinesOrBuilderList() { + public java.util.List + getLinesOrBuilderList() { if (linesBuilder_ != null) { return linesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(lines_); } } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ public org.sonar.server.source.db.FileSourceDb.Line.Builder addLinesBuilder() { return getLinesFieldBuilder().addBuilder( - org.sonar.server.source.db.FileSourceDb.Line.getDefaultInstance()); + org.sonar.server.source.db.FileSourceDb.Line.getDefaultInstance()); } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ public org.sonar.server.source.db.FileSourceDb.Line.Builder addLinesBuilder( - int index) { + int index) { return getLinesFieldBuilder().addBuilder( - index, org.sonar.server.source.db.FileSourceDb.Line.getDefaultInstance()); + index, org.sonar.server.source.db.FileSourceDb.Line.getDefaultInstance()); } + /** * repeated .org.sonar.server.source.db.Line lines = 1; */ - public java.util.List - getLinesBuilderList() { + public java.util.List + getLinesBuilderList() { return getLinesFieldBuilder().getBuilderList(); } + private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.server.source.db.FileSourceDb.Line, org.sonar.server.source.db.FileSourceDb.Line.Builder, org.sonar.server.source.db.FileSourceDb.LineOrBuilder> - getLinesFieldBuilder() { + org.sonar.server.source.db.FileSourceDb.Line, org.sonar.server.source.db.FileSourceDb.Line.Builder, org.sonar.server.source.db.FileSourceDb.LineOrBuilder> + getLinesFieldBuilder() { if (linesBuilder_ == null) { linesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.sonar.server.source.db.FileSourceDb.Line, org.sonar.server.source.db.FileSourceDb.Line.Builder, org.sonar.server.source.db.FileSourceDb.LineOrBuilder>( - lines_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + org.sonar.server.source.db.FileSourceDb.Line, org.sonar.server.source.db.FileSourceDb.Line.Builder, org.sonar.server.source.db.FileSourceDb.LineOrBuilder>( + lines_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); lines_ = null; } return linesBuilder_; @@ -2979,56 +3206,38 @@ public final class FileSourceDb { // @@protoc_insertion_point(class_scope:org.sonar.server.source.db.Data) } - 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 com.google.protobuf.Descriptors.Descriptor - internal_static_org_sonar_server_source_db_Data_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_sonar_server_source_db_Data_fieldAccessorTable; + private static final 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 internal_static_org_sonar_server_source_db_Data_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_sonar_server_source_db_Data_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { + getDescriptor() { return descriptor; } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n\024file_source_db.proto\022\032org.sonar.server" + - ".source.db\"\224\003\n\004Line\022\014\n\004line\030\001 \001(\005\022\016\n\006sou" + - "rce\030\002 \001(\t\022\024\n\014scm_revision\030\003 \001(\t\022\022\n\nscm_a" + - "uthor\030\004 \001(\t\022\020\n\010scm_date\030\005 \001(\003\022\024\n\014ut_line" + - "_hits\030\006 \001(\005\022\025\n\rut_conditions\030\007 \001(\005\022\035\n\025ut" + - "_covered_conditions\030\010 \001(\005\022\024\n\014it_line_hit" + - "s\030\t \001(\005\022\025\n\rit_conditions\030\n \001(\005\022\035\n\025it_cov" + - "ered_conditions\030\013 \001(\005\022\031\n\021overall_line_hi" + - "ts\030\014 \001(\005\022\032\n\022overall_conditions\030\r \001(\005\022\"\n\032" + - "overall_covered_conditions\030\016 \001(\005\022\024\n\014high", + ".source.db\"\224\003\n\004Line\022\014\n\004line\030\001 \001(\005\022\016\n\006sou" + + "rce\030\002 \001(\t\022\024\n\014scm_revision\030\003 \001(\t\022\022\n\nscm_a" + + "uthor\030\004 \001(\t\022\020\n\010scm_date\030\005 \001(\003\022\024\n\014ut_line" + + "_hits\030\006 \001(\005\022\025\n\rut_conditions\030\007 \001(\005\022\035\n\025ut" + + "_covered_conditions\030\010 \001(\005\022\024\n\014it_line_hit" + + "s\030\t \001(\005\022\025\n\rit_conditions\030\n \001(\005\022\035\n\025it_cov" + + "ered_conditions\030\013 \001(\005\022\031\n\021overall_line_hi" + + "ts\030\014 \001(\005\022\032\n\022overall_conditions\030\r \001(\005\022\"\n\032" + + "overall_covered_conditions\030\016 \001(\005\022\024\n\014high", "lighting\030\017 \001(\t\022\017\n\007symbols\030\020 \001(\t\022\030\n\014dupli" + - "cations\030\021 \003(\005B\002\020\001\"7\n\004Data\022/\n\005lines\030\001 \003(\013" + - "2 .org.sonar.server.source.db.LineB\002H\001" + "cations\030\021 \003(\005B\002\020\001\"7\n\004Data\022/\n\005lines\030\001 \003(\013" + + "2 .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) { + 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", "Duplications", }); - 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; } }; @@ -3036,6 +3245,19 @@ public final class FileSourceDb { .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", "Duplications",}); + 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/protobuf/batch_report.proto b/sonar-batch-protocol/src/main/protobuf/batch_report.proto index 546f33f86fb..58ba5c532d4 100644 --- a/sonar-batch-protocol/src/main/protobuf/batch_report.proto +++ b/sonar-batch-protocol/src/main/protobuf/batch_report.proto @@ -48,6 +48,11 @@ message Metadata { optional int32 deleted_components_count = 5; } +message ComponentLink { + optional ComponentLinkType type = 1; + optional string href = 2; +} + message Component { optional int32 ref = 1; optional string path = 2; @@ -56,6 +61,7 @@ message Component { optional bool is_test = 5; optional string language = 6; repeated int32 child_refs = 7 [packed=true]; + repeated ComponentLink links = 10; // temporary fields during development of computation stack optional int32 snapshot_id = 8; diff --git a/sonar-batch-protocol/src/main/protobuf/constants.proto b/sonar-batch-protocol/src/main/protobuf/constants.proto index 3cbc886accd..e4e06eb0570 100644 --- a/sonar-batch-protocol/src/main/protobuf/constants.proto +++ b/sonar-batch-protocol/src/main/protobuf/constants.proto @@ -37,3 +37,11 @@ enum ComponentType { VIEW = 4; SUBVIEW = 5; } + +enum ComponentLinkType { + HOME = 0; + SCM = 1; + SCM_DEV = 2; + ISSUE = 3; + CI = 4; +} diff --git a/sonar-core/src/main/java/org/sonar/core/component/ComponentLinkDto.java b/sonar-core/src/main/java/org/sonar/core/component/ComponentLinkDto.java new file mode 100644 index 00000000000..521298efee5 --- /dev/null +++ b/sonar-core/src/main/java/org/sonar/core/component/ComponentLinkDto.java @@ -0,0 +1,79 @@ +/* + * SonarQube, open source software quality management tool. + * Copyright (C) 2008-2014 SonarSource + * mailto:contact AT sonarsource DOT com + * + * SonarQube is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * SonarQube is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.sonar.core.component; + +/** + * Component links should be merge in a 'links' column (using protobuf for instance) of the projects table. + * But to do this we'll have to wait for the measure filters page (where links are displayed) to be rewritten in JS/WS (because it's in Rails for the moment). + */ +public class ComponentLinkDto { + + private Long id; + private String componentUuid; + private String type; + private String name; + private String href; + + public String getName() { + return name; + } + + public ComponentLinkDto setName(String name) { + this.name = name; + return this; + } + + public String getComponentUuid() { + return componentUuid; + } + + public ComponentLinkDto setComponentUuid(String componentUuid) { + this.componentUuid = componentUuid; + return this; + } + + public String getHref() { + return href; + } + + public ComponentLinkDto setHref(String href) { + this.href = href; + return this; + } + + public Long getId() { + return id; + } + + public ComponentLinkDto setId(Long id) { + this.id = id; + return this; + } + + public String getType() { + return type; + } + + public ComponentLinkDto setType(String type) { + this.type = type; + return this; + } +} diff --git a/sonar-core/src/main/java/org/sonar/core/component/db/ComponentLinkMapper.java b/sonar-core/src/main/java/org/sonar/core/component/db/ComponentLinkMapper.java new file mode 100644 index 00000000000..464a998fc7f --- /dev/null +++ b/sonar-core/src/main/java/org/sonar/core/component/db/ComponentLinkMapper.java @@ -0,0 +1,37 @@ +/* + * SonarQube, open source software quality management tool. + * Copyright (C) 2008-2014 SonarSource + * mailto:contact AT sonarsource DOT com + * + * SonarQube is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * SonarQube is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.sonar.core.component.db; + +import org.sonar.core.component.ComponentLinkDto; + +import java.util.List; + +public interface ComponentLinkMapper { + + List selectByComponentUuid(String componentUuid); + + void insert(ComponentLinkDto dto); + + void update(ComponentLinkDto dto); + + void delete(long id); + +} diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java b/sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java index 2fceabc00f2..721288c807e 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java @@ -35,11 +35,9 @@ import org.sonar.api.database.model.MeasureModel; import org.sonar.core.activity.db.ActivityDto; import org.sonar.core.activity.db.ActivityMapper; import org.sonar.core.cluster.WorkQueue; -import org.sonar.core.component.ComponentDto; -import org.sonar.core.component.FilePathWithHashDto; -import org.sonar.core.component.SnapshotDto; -import org.sonar.core.component.UuidWithProjectUuidDto; +import org.sonar.core.component.*; import org.sonar.core.component.db.ComponentIndexMapper; +import org.sonar.core.component.db.ComponentLinkMapper; import org.sonar.core.component.db.ComponentMapper; import org.sonar.core.component.db.SnapshotMapper; import org.sonar.core.computation.db.AnalysisReportDto; @@ -133,6 +131,7 @@ public class MyBatis implements BatchComponent, ServerComponent { loadAlias(conf, "ActiveDashboard", ActiveDashboardDto.class); loadAlias(conf, "Author", AuthorDto.class); loadAlias(conf, "Component", ComponentDto.class); + loadAlias(conf, "ComponentLink", ComponentLinkDto.class); loadAlias(conf, "Dashboard", DashboardDto.class); loadAlias(conf, "Dependency", DependencyDto.class); loadAlias(conf, "DuplicationUnit", DuplicationUnitDto.class); @@ -204,7 +203,7 @@ public class MyBatis implements BatchComponent, ServerComponent { GroupMembershipMapper.class, QualityProfileMapper.class, ActiveRuleMapper.class, MeasureMapper.class, MetricMapper.class, QualityGateMapper.class, QualityGateConditionMapper.class, ComponentMapper.class, SnapshotMapper.class, ProjectQgateAssociationMapper.class, - AnalysisReportMapper.class, ComponentIndexMapper.class, + AnalysisReportMapper.class, ComponentIndexMapper.class, ComponentLinkMapper.class, Migration45Mapper.class, Migration50Mapper.class }; loadMappers(conf, mappers); diff --git a/sonar-core/src/main/resources/org/sonar/core/component/db/ComponentLinkMapper.xml b/sonar-core/src/main/resources/org/sonar/core/component/db/ComponentLinkMapper.xml new file mode 100644 index 00000000000..a89efc62bfa --- /dev/null +++ b/sonar-core/src/main/resources/org/sonar/core/component/db/ComponentLinkMapper.xml @@ -0,0 +1,37 @@ + + + + + + p.id, + p.component_uuid as "componentUuid", + p.link_type as "type", + p.name as name, + p.href as href + + + + + + INSERT INTO project_links (component_uuid, link_type, name, href) + VALUES (#{componentUuid,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{href,jdbcType=VARCHAR}) + + + + UPDATE project_links SET component_uuid=#{componentUuid,jdbcType=VARCHAR}, link_type=#{type,jdbcType=VARCHAR}, name=#{name,jdbcType=VARCHAR}, href=#{href,jdbcType=VARCHAR} + WHERE id=#{id} + + + + DELETE FROM project_links WHERE id=#{id} + + + + -- 2.39.5