From 33a216e2071c028060d437fe2707b9e7012aae76 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Wed, 9 Sep 2015 09:37:48 +0200 Subject: [PATCH] Upgrade protobuf lib to 3.0.0-beta-1 --- compile_protobuf.sh | 2 +- pom.xml | 2 +- .../org/sonar/batch/protocol/Constants.java | 28 +- .../batch/protocol/input/BatchInput.java | 318 +- .../batch/protocol/output/BatchReport.java | 2881 ++++++++-------- .../sonar/core/util/ProtobufJsonFormat.java | 69 +- .../gen-java/org/sonar/core/test/Test.java | 2968 ++++++++++++----- .../core/util/ProtobufJsonFormatTest.java | 120 +- sonar-core/src/test/protobuf/test.proto | 28 +- .../org/sonar/db/protobuf/DbCommons.java | 128 +- .../org/sonar/db/protobuf/DbFileSources.java | 578 ++-- .../org/sonar/db/protobuf/DbIssues.java | 414 ++- .../gen-java/org/sonarqube/ws/Common.java | 808 +++-- .../gen-java/org/sonarqube/ws/Issues.java | 1432 ++++---- .../org/sonarqube/ws/Permissions.java | 1781 +++++----- .../main/gen-java/org/sonarqube/ws/Rules.java | 258 +- 16 files changed, 6409 insertions(+), 5406 deletions(-) diff --git a/compile_protobuf.sh b/compile_protobuf.sh index e4bd4d96326..9e862debefe 100755 --- a/compile_protobuf.sh +++ b/compile_protobuf.sh @@ -4,7 +4,7 @@ # Local installation of protobuf compiler is NOT needed. # Available versions listed at http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.github.os72%22%20AND%20a%3A%22protoc-jar%22 -PROTOBUF_VERSION="2.6.1.4" +PROTOBUF_VERSION="3.0.0-a3" mvn org.apache.maven.plugins:maven-dependency-plugin::copy -Dartifact=com.github.os72:protoc-jar:$PROTOBUF_VERSION -DoutputDirectory=target diff --git a/pom.xml b/pom.xml index 8c564db7bd1..cdd7e9afe9f 100644 --- a/pom.xml +++ b/pom.xml @@ -1087,7 +1087,7 @@ com.google.protobuf protobuf-java - 2.6.1 + 3.0.0-beta-1 net.jpountz.lz4 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 33b9bbc4363..7eb449e1eaa 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 @@ -57,7 +57,9 @@ 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) { @@ -158,7 +160,9 @@ public final class Constants { public static final int FILE_VALUE = 3; - public final int getNumber() { return value; } + public final int getNumber() { + return value; + } public static ComponentType valueOf(int value) { switch (value) { @@ -266,7 +270,9 @@ public final class Constants { public static final int STRING_VALUE = 4; - public final int getNumber() { return value; } + public final int getNumber() { + return value; + } public static MeasureValueType valueOf(int value) { switch (value) { @@ -355,7 +361,9 @@ public final class Constants { public static final int PROFILE_VALUE = 1; - public final int getNumber() { return value; } + public final int getNumber() { + return value; + } public static EventCategory valueOf(int value) { switch (value) { @@ -461,7 +469,9 @@ public final class Constants { public static final int CI_VALUE = 4; - public final int getNumber() { return value; } + public final int getNumber() { + return value; + } public static ComponentLinkType valueOf(int value) { switch (value) { @@ -602,7 +612,9 @@ public final class Constants { public static final int PREPROCESS_DIRECTIVE_VALUE = 8; - public final int getNumber() { return value; } + public final int getNumber() { + return value; + } public static HighlightingType valueOf(int value) { switch (value) { @@ -707,7 +719,9 @@ public final class Constants { public static final int SKIPPED_VALUE = 4; - public final int getNumber() { return value; } + public final int getNumber() { + return value; + } public static TestStatus valueOf(int value) { switch (value) { 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 a0a3e900e68..87d2250eb70 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 @@ -191,37 +191,40 @@ public final class BatchInput { /** * Protobuf type {@code ServerIssue} */ - public static final class ServerIssue extends + public static final class ServerIssue extends 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) { + 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 static final ServerIssue defaultInstance; - public static ServerIssue getDefaultInstance() { - return defaultInstance; - } - - public ServerIssue getDefaultInstanceForType() { - return defaultInstance; + private ServerIssue() { + key_ = ""; + moduleKey_ = ""; + path_ = ""; + ruleRepository_ = ""; + ruleKey_ = ""; + line_ = 0; + msg_ = ""; + severity_ = 0; + manualSeverity_ = false; + resolution_ = ""; + status_ = ""; + checksum_ = ""; + assigneeLogin_ = ""; + creationDate_ = 0L; } - 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 { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -288,7 +291,7 @@ public final class BatchInput { unknownFields.mergeVarintField(8, rawValue); } else { bitField0_ |= 0x00000080; - severity_ = value; + severity_ = rawValue; } break; } @@ -329,10 +332,11 @@ public final class BatchInput { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -350,24 +354,9 @@ public final class BatchInput { 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( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ServerIssue(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int KEY_FIELD_NUMBER = 1; - private java.lang.Object key_; + private volatile java.lang.Object key_; /** * optional string key = 1; */ @@ -409,7 +398,7 @@ public final class BatchInput { } public static final int MODULE_KEY_FIELD_NUMBER = 2; - private java.lang.Object moduleKey_; + private volatile java.lang.Object moduleKey_; /** * optional string module_key = 2; */ @@ -451,7 +440,7 @@ public final class BatchInput { } public static final int PATH_FIELD_NUMBER = 3; - private java.lang.Object path_; + private volatile java.lang.Object path_; /** * optional string path = 3; */ @@ -493,7 +482,7 @@ public final class BatchInput { } public static final int RULE_REPOSITORY_FIELD_NUMBER = 4; - private java.lang.Object ruleRepository_; + private volatile java.lang.Object ruleRepository_; /** * optional string rule_repository = 4; */ @@ -535,7 +524,7 @@ public final class BatchInput { } public static final int RULE_KEY_FIELD_NUMBER = 5; - private java.lang.Object ruleKey_; + private volatile java.lang.Object ruleKey_; /** * optional string rule_key = 5; */ @@ -592,7 +581,7 @@ public final class BatchInput { } public static final int MSG_FIELD_NUMBER = 7; - private java.lang.Object msg_; + private volatile java.lang.Object msg_; /** * optional string msg = 7; */ @@ -634,7 +623,7 @@ public final class BatchInput { } public static final int SEVERITY_FIELD_NUMBER = 8; - private org.sonar.batch.protocol.Constants.Severity severity_; + private int severity_; /** * optional .Severity severity = 8; */ @@ -645,7 +634,8 @@ public final class BatchInput { * optional .Severity severity = 8; */ public org.sonar.batch.protocol.Constants.Severity getSeverity() { - return severity_; + org.sonar.batch.protocol.Constants.Severity result = org.sonar.batch.protocol.Constants.Severity.valueOf(severity_); + return result == null ? org.sonar.batch.protocol.Constants.Severity.INFO : result; } public static final int MANUAL_SEVERITY_FIELD_NUMBER = 9; @@ -664,7 +654,7 @@ public final class BatchInput { } public static final int RESOLUTION_FIELD_NUMBER = 10; - private java.lang.Object resolution_; + private volatile java.lang.Object resolution_; /** * optional string resolution = 10; */ @@ -706,7 +696,7 @@ public final class BatchInput { } public static final int STATUS_FIELD_NUMBER = 11; - private java.lang.Object status_; + private volatile java.lang.Object status_; /** * optional string status = 11; */ @@ -748,7 +738,7 @@ public final class BatchInput { } public static final int CHECKSUM_FIELD_NUMBER = 12; - private java.lang.Object checksum_; + private volatile java.lang.Object checksum_; /** * optional string checksum = 12; */ @@ -790,7 +780,7 @@ public final class BatchInput { } public static final int ASSIGNEE_LOGIN_FIELD_NUMBER = 13; - private java.lang.Object assigneeLogin_; + private volatile java.lang.Object assigneeLogin_; /** * optional string assignee_login = 13; */ @@ -846,22 +836,6 @@ public final class BatchInput { return creationDate_; } - private void initFields() { - key_ = ""; - moduleKey_ = ""; - path_ = ""; - ruleRepository_ = ""; - ruleKey_ = ""; - line_ = 0; - msg_ = ""; - severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; - manualSeverity_ = false; - resolution_ = ""; - status_ = ""; - checksum_ = ""; - assigneeLogin_ = ""; - creationDate_ = 0L; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -874,7 +848,6 @@ public final class BatchInput { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getKeyBytes()); } @@ -897,7 +870,7 @@ public final class BatchInput { output.writeBytes(7, getMsgBytes()); } if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeEnum(8, severity_.getNumber()); + output.writeEnum(8, severity_); } if (((bitField0_ & 0x00000100) == 0x00000100)) { output.writeBool(9, manualSeverity_); @@ -917,7 +890,7 @@ public final class BatchInput { if (((bitField0_ & 0x00002000) == 0x00002000)) { output.writeInt64(14, creationDate_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -956,7 +929,7 @@ public final class BatchInput { } if (((bitField0_ & 0x00000080) == 0x00000080)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(8, severity_.getNumber()); + .computeEnumSize(8, severity_); } if (((bitField0_ & 0x00000100) == 0x00000100)) { size += com.google.protobuf.CodedOutputStream @@ -982,18 +955,12 @@ public final class BatchInput { size += com.google.protobuf.CodedOutputStream .computeInt64Size(14, creationDate_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.input.BatchInput.ServerIssue parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1047,12 +1014,17 @@ public final class BatchInput { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.input.BatchInput.ServerIssue prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -1093,10 +1065,6 @@ public final class BatchInput { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); key_ = ""; @@ -1113,7 +1081,7 @@ public final class BatchInput { bitField0_ = (bitField0_ & ~0x00000020); msg_ = ""; bitField0_ = (bitField0_ & ~0x00000040); - severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; + severity_ = 0; bitField0_ = (bitField0_ & ~0x00000080); manualSeverity_ = false; bitField0_ = (bitField0_ & ~0x00000100); @@ -1130,10 +1098,6 @@ public final class BatchInput { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonar.batch.protocol.input.BatchInput.internal_static_ServerIssue_descriptor; @@ -1289,7 +1253,8 @@ public final class BatchInput { if (other.hasCreationDate()) { setCreationDate(other.getCreationDate()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -1804,7 +1769,7 @@ public final class BatchInput { return this; } - private org.sonar.batch.protocol.Constants.Severity severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; + private int severity_ = 0; /** * optional .Severity severity = 8; */ @@ -1815,7 +1780,8 @@ public final class BatchInput { * optional .Severity severity = 8; */ public org.sonar.batch.protocol.Constants.Severity getSeverity() { - return severity_; + org.sonar.batch.protocol.Constants.Severity result = org.sonar.batch.protocol.Constants.Severity.valueOf(severity_); + return result == null ? org.sonar.batch.protocol.Constants.Severity.INFO : result; } /** * optional .Severity severity = 8; @@ -1825,7 +1791,7 @@ public final class BatchInput { throw new NullPointerException(); } bitField0_ |= 0x00000080; - severity_ = value; + severity_ = value.getNumber(); onChanged(); return this; } @@ -1834,7 +1800,7 @@ public final class BatchInput { */ public Builder clearSeverity() { bitField0_ = (bitField0_ & ~0x00000080); - severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; + severity_ = 0; onChanged(); return this; } @@ -2210,12 +2176,44 @@ public final class BatchInput { // @@protoc_insertion_point(builder_scope:ServerIssue) } + // @@protoc_insertion_point(class_scope:ServerIssue) + private static final org.sonar.batch.protocol.input.BatchInput.ServerIssue DEFAULT_INSTANCE; static { - defaultInstance = new ServerIssue(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.input.BatchInput.ServerIssue(); + } + + public static org.sonar.batch.protocol.input.BatchInput.ServerIssue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ServerIssue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ServerIssue(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.input.BatchInput.ServerIssue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:ServerIssue) } public interface UserOrBuilder extends @@ -2253,37 +2251,28 @@ public final class BatchInput { /** * Protobuf type {@code User} */ - public static final class User extends + public static final class User extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:User) UserOrBuilder { // Use User.newBuilder() to construct. - private User(com.google.protobuf.GeneratedMessage.Builder builder) { + private User(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private User(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final User defaultInstance; - public static User getDefaultInstance() { - return defaultInstance; } - - public User getDefaultInstanceForType() { - return defaultInstance; + private User() { + login_ = ""; + name_ = ""; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private User( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -2317,10 +2306,11 @@ public final class BatchInput { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -2338,24 +2328,9 @@ public final class BatchInput { org.sonar.batch.protocol.input.BatchInput.User.class, org.sonar.batch.protocol.input.BatchInput.User.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public User parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new User(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int LOGIN_FIELD_NUMBER = 1; - private java.lang.Object login_; + private volatile java.lang.Object login_; /** * optional string login = 1; */ @@ -2397,7 +2372,7 @@ public final class BatchInput { } public static final int NAME_FIELD_NUMBER = 2; - private java.lang.Object name_; + private volatile java.lang.Object name_; /** * optional string name = 2; */ @@ -2438,10 +2413,6 @@ public final class BatchInput { } } - private void initFields() { - login_ = ""; - name_ = ""; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -2454,14 +2425,13 @@ public final class BatchInput { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getLoginBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getNameBytes()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -2478,18 +2448,12 @@ public final class BatchInput { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getNameBytes()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.input.BatchInput.User parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -2543,12 +2507,17 @@ public final class BatchInput { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.input.BatchInput.User prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -2589,10 +2558,6 @@ public final class BatchInput { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); login_ = ""; @@ -2602,10 +2567,6 @@ public final class BatchInput { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonar.batch.protocol.input.BatchInput.internal_static_User_descriptor; @@ -2661,7 +2622,8 @@ public final class BatchInput { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -2843,20 +2805,52 @@ public final class BatchInput { // @@protoc_insertion_point(builder_scope:User) } + // @@protoc_insertion_point(class_scope:User) + private static final org.sonar.batch.protocol.input.BatchInput.User DEFAULT_INSTANCE; static { - defaultInstance = new User(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.input.BatchInput.User(); + } + + public static org.sonar.batch.protocol.input.BatchInput.User getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public User parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new User(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.input.BatchInput.User getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:User) } - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_ServerIssue_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_ServerIssue_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_User_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable 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 bbb3ac4d3e7..f270f91192c 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 @@ -73,37 +73,30 @@ public final class BatchReport { /** * Protobuf type {@code Metadata} */ - public static final class Metadata extends + public static final class Metadata extends 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) { + 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 static final Metadata defaultInstance; - public static Metadata getDefaultInstance() { - return defaultInstance; - } - - public Metadata getDefaultInstanceForType() { - return defaultInstance; + private Metadata() { + analysisDate_ = 0L; + projectKey_ = ""; + branch_ = ""; + rootComponentRef_ = 0; } - 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 { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -147,10 +140,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -168,21 +162,6 @@ public final class BatchReport { 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( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Metadata(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int ANALYSIS_DATE_FIELD_NUMBER = 1; private long analysisDate_; @@ -200,7 +179,7 @@ public final class BatchReport { } public static final int PROJECT_KEY_FIELD_NUMBER = 2; - private java.lang.Object projectKey_; + private volatile java.lang.Object projectKey_; /** * optional string project_key = 2; * @@ -254,7 +233,7 @@ public final class BatchReport { } public static final int BRANCH_FIELD_NUMBER = 3; - private java.lang.Object branch_; + private volatile java.lang.Object branch_; /** * optional string branch = 3; */ @@ -310,12 +289,6 @@ public final class BatchReport { return rootComponentRef_; } - private void initFields() { - analysisDate_ = 0L; - projectKey_ = ""; - branch_ = ""; - rootComponentRef_ = 0; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -328,7 +301,6 @@ public final class BatchReport { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt64(1, analysisDate_); } @@ -341,7 +313,7 @@ public final class BatchReport { if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeInt32(4, rootComponentRef_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -366,18 +338,12 @@ public final class BatchReport { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, rootComponentRef_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.Metadata parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -431,12 +397,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Metadata prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -477,10 +448,6 @@ public final class BatchReport { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); analysisDate_ = 0L; @@ -494,10 +461,6 @@ public final class BatchReport { 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_Metadata_descriptor; @@ -567,7 +530,8 @@ public final class BatchReport { if (other.hasRootComponentRef()) { setRootComponentRef(other.getRootComponentRef()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -837,12 +801,44 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:Metadata) } + // @@protoc_insertion_point(class_scope:Metadata) + private static final org.sonar.batch.protocol.output.BatchReport.Metadata DEFAULT_INSTANCE; static { - defaultInstance = new Metadata(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.Metadata(); + } + + public static org.sonar.batch.protocol.output.BatchReport.Metadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Metadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Metadata(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.Metadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:Metadata) } public interface ActiveRuleOrBuilder extends @@ -913,37 +909,30 @@ public final class BatchReport { /** * Protobuf type {@code ActiveRule} */ - public static final class ActiveRule extends + public static final class ActiveRule extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:ActiveRule) ActiveRuleOrBuilder { // Use ActiveRule.newBuilder() to construct. - private ActiveRule(com.google.protobuf.GeneratedMessage.Builder builder) { + private ActiveRule(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private ActiveRule(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final ActiveRule defaultInstance; - public static ActiveRule getDefaultInstance() { - return defaultInstance; } - - public ActiveRule getDefaultInstanceForType() { - return defaultInstance; + private ActiveRule() { + ruleRepository_ = ""; + ruleKey_ = ""; + severity_ = 0; + param_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private ActiveRule( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -981,7 +970,7 @@ public final class BatchReport { unknownFields.mergeVarintField(3, rawValue); } else { bitField0_ |= 0x00000004; - severity_ = value; + severity_ = rawValue; } break; } @@ -996,10 +985,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { param_ = java.util.Collections.unmodifiableList(param_); @@ -1020,21 +1010,6 @@ public final class BatchReport { org.sonar.batch.protocol.output.BatchReport.ActiveRule.class, org.sonar.batch.protocol.output.BatchReport.ActiveRule.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public ActiveRule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ActiveRule(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - public interface ActiveRuleParamOrBuilder extends // @@protoc_insertion_point(interface_extends:ActiveRule.ActiveRuleParam) com.google.protobuf.MessageOrBuilder { @@ -1074,37 +1049,28 @@ public final class BatchReport { * TODO replace by map * */ - public static final class ActiveRuleParam extends + public static final class ActiveRuleParam extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:ActiveRule.ActiveRuleParam) ActiveRuleParamOrBuilder { // Use ActiveRuleParam.newBuilder() to construct. - private ActiveRuleParam(com.google.protobuf.GeneratedMessage.Builder builder) { + private ActiveRuleParam(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private ActiveRuleParam(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final ActiveRuleParam defaultInstance; - public static ActiveRuleParam getDefaultInstance() { - return defaultInstance; } - - public ActiveRuleParam getDefaultInstanceForType() { - return defaultInstance; + private ActiveRuleParam() { + key_ = ""; + value_ = ""; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private ActiveRuleParam( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -1138,10 +1104,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -1159,24 +1126,9 @@ public final class BatchReport { org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.class, org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public ActiveRuleParam parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ActiveRuleParam(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int KEY_FIELD_NUMBER = 1; - private java.lang.Object key_; + private volatile java.lang.Object key_; /** * optional string key = 1; */ @@ -1218,7 +1170,7 @@ public final class BatchReport { } public static final int VALUE_FIELD_NUMBER = 2; - private java.lang.Object value_; + private volatile java.lang.Object value_; /** * optional string value = 2; */ @@ -1259,10 +1211,6 @@ public final class BatchReport { } } - private void initFields() { - key_ = ""; - value_ = ""; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -1275,14 +1223,13 @@ public final class BatchReport { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getKeyBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getValueBytes()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -1299,18 +1246,12 @@ public final class BatchReport { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getValueBytes()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.ActiveRule.ActiveRuleParam parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1364,12 +1305,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -1414,10 +1360,6 @@ public final class BatchReport { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); key_ = ""; @@ -1427,10 +1369,6 @@ public final class BatchReport { 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_ActiveRule_ActiveRuleParam_descriptor; @@ -1486,7 +1424,8 @@ public final class BatchReport { value_ = other.value_; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -1668,17 +1607,49 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:ActiveRule.ActiveRuleParam) } + // @@protoc_insertion_point(class_scope:ActiveRule.ActiveRuleParam) + private static final org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam DEFAULT_INSTANCE; static { - defaultInstance = new ActiveRuleParam(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam(); + } + + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ActiveRuleParam parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ActiveRuleParam(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:ActiveRule.ActiveRuleParam) } private int bitField0_; public static final int RULE_REPOSITORY_FIELD_NUMBER = 1; - private java.lang.Object ruleRepository_; + private volatile java.lang.Object ruleRepository_; /** * optional string rule_repository = 1; */ @@ -1720,7 +1691,7 @@ public final class BatchReport { } public static final int RULE_KEY_FIELD_NUMBER = 2; - private java.lang.Object ruleKey_; + private volatile java.lang.Object ruleKey_; /** * optional string rule_key = 2; */ @@ -1762,7 +1733,7 @@ public final class BatchReport { } public static final int SEVERITY_FIELD_NUMBER = 3; - private org.sonar.batch.protocol.Constants.Severity severity_; + private int severity_; /** * optional .Severity severity = 3; */ @@ -1773,7 +1744,8 @@ public final class BatchReport { * optional .Severity severity = 3; */ public org.sonar.batch.protocol.Constants.Severity getSeverity() { - return severity_; + org.sonar.batch.protocol.Constants.Severity result = org.sonar.batch.protocol.Constants.Severity.valueOf(severity_); + return result == null ? org.sonar.batch.protocol.Constants.Severity.INFO : result; } public static final int PARAM_FIELD_NUMBER = 4; @@ -1811,12 +1783,6 @@ public final class BatchReport { return param_.get(index); } - private void initFields() { - ruleRepository_ = ""; - ruleKey_ = ""; - severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; - param_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -1829,7 +1795,6 @@ public final class BatchReport { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getRuleRepositoryBytes()); } @@ -1837,12 +1802,12 @@ public final class BatchReport { output.writeBytes(2, getRuleKeyBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeEnum(3, severity_.getNumber()); + output.writeEnum(3, severity_); } for (int i = 0; i < param_.size(); i++) { output.writeMessage(4, param_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -1861,24 +1826,18 @@ public final class BatchReport { } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, severity_.getNumber()); + .computeEnumSize(3, severity_); } for (int i = 0; i < param_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, param_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.ActiveRule parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1932,12 +1891,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.ActiveRule prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -1979,17 +1943,13 @@ public final class BatchReport { getParamFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); ruleRepository_ = ""; bitField0_ = (bitField0_ & ~0x00000001); ruleKey_ = ""; bitField0_ = (bitField0_ & ~0x00000002); - severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; + severity_ = 0; bitField0_ = (bitField0_ & ~0x00000004); if (paramBuilder_ == null) { param_ = java.util.Collections.emptyList(); @@ -2000,10 +1960,6 @@ public final class BatchReport { 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_ActiveRule_descriptor; @@ -2101,7 +2057,8 @@ public final class BatchReport { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -2280,7 +2237,7 @@ public final class BatchReport { return this; } - private org.sonar.batch.protocol.Constants.Severity severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; + private int severity_ = 0; /** * optional .Severity severity = 3; */ @@ -2291,7 +2248,8 @@ public final class BatchReport { * optional .Severity severity = 3; */ public org.sonar.batch.protocol.Constants.Severity getSeverity() { - return severity_; + org.sonar.batch.protocol.Constants.Severity result = org.sonar.batch.protocol.Constants.Severity.valueOf(severity_); + return result == null ? org.sonar.batch.protocol.Constants.Severity.INFO : result; } /** * optional .Severity severity = 3; @@ -2301,7 +2259,7 @@ public final class BatchReport { throw new NullPointerException(); } bitField0_ |= 0x00000004; - severity_ = value; + severity_ = value.getNumber(); onChanged(); return this; } @@ -2310,7 +2268,7 @@ public final class BatchReport { */ public Builder clearSeverity() { bitField0_ = (bitField0_ & ~0x00000004); - severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; + severity_ = 0; onChanged(); return this; } @@ -2558,12 +2516,44 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:ActiveRule) } + // @@protoc_insertion_point(class_scope:ActiveRule) + private static final org.sonar.batch.protocol.output.BatchReport.ActiveRule DEFAULT_INSTANCE; static { - defaultInstance = new ActiveRule(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.ActiveRule(); + } + + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ActiveRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ActiveRule(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.ActiveRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:ActiveRule) } public interface ComponentLinkOrBuilder extends @@ -2596,37 +2586,28 @@ public final class BatchReport { /** * Protobuf type {@code ComponentLink} */ - public static final class ComponentLink extends + 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) { + private ComponentLink(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private ComponentLink(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final ComponentLink defaultInstance; - public static ComponentLink getDefaultInstance() { - return defaultInstance; } - - public ComponentLink getDefaultInstanceForType() { - return defaultInstance; + private ComponentLink() { + type_ = 0; + href_ = ""; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private ComponentLink( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -2652,7 +2633,7 @@ public final class BatchReport { unknownFields.mergeVarintField(1, rawValue); } else { bitField0_ |= 0x00000001; - type_ = value; + type_ = rawValue; } break; } @@ -2665,10 +2646,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -2686,24 +2668,9 @@ public final class BatchReport { 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_; + private int type_; /** * optional .ComponentLinkType type = 1; */ @@ -2714,11 +2681,12 @@ public final class BatchReport { * optional .ComponentLinkType type = 1; */ public org.sonar.batch.protocol.Constants.ComponentLinkType getType() { - return type_; + org.sonar.batch.protocol.Constants.ComponentLinkType result = org.sonar.batch.protocol.Constants.ComponentLinkType.valueOf(type_); + return result == null ? org.sonar.batch.protocol.Constants.ComponentLinkType.HOME : result; } public static final int HREF_FIELD_NUMBER = 2; - private java.lang.Object href_; + private volatile java.lang.Object href_; /** * optional string href = 2; */ @@ -2759,10 +2727,6 @@ public final class BatchReport { } } - private void initFields() { - type_ = org.sonar.batch.protocol.Constants.ComponentLinkType.HOME; - href_ = ""; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -2775,14 +2739,13 @@ public final class BatchReport { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, type_.getNumber()); + output.writeEnum(1, type_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getHrefBytes()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -2793,24 +2756,18 @@ public final class BatchReport { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_.getNumber()); + .computeEnumSize(1, type_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getHrefBytes()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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 { @@ -2864,12 +2821,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.ComponentLink prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -2910,23 +2872,15 @@ public final class BatchReport { 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; + type_ = 0; 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; @@ -2980,7 +2934,8 @@ public final class BatchReport { href_ = other.href_; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -3007,7 +2962,7 @@ public final class BatchReport { } private int bitField0_; - private org.sonar.batch.protocol.Constants.ComponentLinkType type_ = org.sonar.batch.protocol.Constants.ComponentLinkType.HOME; + private int type_ = 0; /** * optional .ComponentLinkType type = 1; */ @@ -3018,7 +2973,8 @@ public final class BatchReport { * optional .ComponentLinkType type = 1; */ public org.sonar.batch.protocol.Constants.ComponentLinkType getType() { - return type_; + org.sonar.batch.protocol.Constants.ComponentLinkType result = org.sonar.batch.protocol.Constants.ComponentLinkType.valueOf(type_); + return result == null ? org.sonar.batch.protocol.Constants.ComponentLinkType.HOME : result; } /** * optional .ComponentLinkType type = 1; @@ -3028,7 +2984,7 @@ public final class BatchReport { throw new NullPointerException(); } bitField0_ |= 0x00000001; - type_ = value; + type_ = value.getNumber(); onChanged(); return this; } @@ -3037,7 +2993,7 @@ public final class BatchReport { */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); - type_ = org.sonar.batch.protocol.Constants.ComponentLinkType.HOME; + type_ = 0; onChanged(); return this; } @@ -3121,12 +3077,44 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:ComponentLink) } + // @@protoc_insertion_point(class_scope:ComponentLink) + private static final org.sonar.batch.protocol.output.BatchReport.ComponentLink DEFAULT_INSTANCE; static { - defaultInstance = new ComponentLink(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.ComponentLink(); + } + + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final 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 { + try { + return new ComponentLink(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.ComponentLink getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:ComponentLink) } public interface ComponentOrBuilder extends @@ -3340,37 +3328,38 @@ public final class BatchReport { /** * Protobuf type {@code Component} */ - public static final class Component extends + 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) { + 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 Component() { + ref_ = 0; + path_ = ""; + name_ = ""; + type_ = 0; + isTest_ = false; + language_ = ""; + childRef_ = java.util.Collections.emptyList(); + link_ = java.util.Collections.emptyList(); + version_ = ""; + key_ = ""; + lines_ = 0; + description_ = ""; } - 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 { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -3413,7 +3402,7 @@ public final class BatchReport { unknownFields.mergeVarintField(4, rawValue); } else { bitField0_ |= 0x00000008; - type_ = value; + type_ = rawValue; } break; } @@ -3483,10 +3472,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { childRef_ = java.util.Collections.unmodifiableList(childRef_); @@ -3510,21 +3500,6 @@ public final class BatchReport { 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( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Component(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int REF_FIELD_NUMBER = 1; private int ref_; @@ -3542,7 +3517,7 @@ public final class BatchReport { } public static final int PATH_FIELD_NUMBER = 2; - private java.lang.Object path_; + private volatile java.lang.Object path_; /** * optional string path = 2; */ @@ -3584,7 +3559,7 @@ public final class BatchReport { } public static final int NAME_FIELD_NUMBER = 3; - private java.lang.Object name_; + private volatile java.lang.Object name_; /** * optional string name = 3; */ @@ -3626,7 +3601,7 @@ public final class BatchReport { } public static final int TYPE_FIELD_NUMBER = 4; - private org.sonar.batch.protocol.Constants.ComponentType type_; + private int type_; /** * optional .ComponentType type = 4; */ @@ -3637,7 +3612,8 @@ public final class BatchReport { * optional .ComponentType type = 4; */ public org.sonar.batch.protocol.Constants.ComponentType getType() { - return type_; + org.sonar.batch.protocol.Constants.ComponentType result = org.sonar.batch.protocol.Constants.ComponentType.valueOf(type_); + return result == null ? org.sonar.batch.protocol.Constants.ComponentType.PROJECT : result; } public static final int IS_TEST_FIELD_NUMBER = 5; @@ -3656,7 +3632,7 @@ public final class BatchReport { } public static final int LANGUAGE_FIELD_NUMBER = 6; - private java.lang.Object language_; + private volatile java.lang.Object language_; /** * optional string language = 6; */ @@ -3756,7 +3732,7 @@ public final class BatchReport { } public static final int VERSION_FIELD_NUMBER = 9; - private java.lang.Object version_; + private volatile java.lang.Object version_; /** * optional string version = 9; * @@ -3810,7 +3786,7 @@ public final class BatchReport { } public static final int KEY_FIELD_NUMBER = 10; - private java.lang.Object key_; + private volatile java.lang.Object key_; /** * optional string key = 10; * @@ -3890,7 +3866,7 @@ public final class BatchReport { } public static final int DESCRIPTION_FIELD_NUMBER = 12; - private java.lang.Object description_; + private volatile java.lang.Object description_; /** * optional string description = 12; * @@ -3943,20 +3919,6 @@ public final class BatchReport { } } - private void initFields() { - ref_ = 0; - path_ = ""; - name_ = ""; - type_ = org.sonar.batch.protocol.Constants.ComponentType.PROJECT; - isTest_ = false; - language_ = ""; - childRef_ = java.util.Collections.emptyList(); - link_ = java.util.Collections.emptyList(); - version_ = ""; - key_ = ""; - lines_ = 0; - description_ = ""; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -3980,7 +3942,7 @@ public final class BatchReport { output.writeBytes(3, getNameBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeEnum(4, type_.getNumber()); + output.writeEnum(4, type_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBool(5, isTest_); @@ -4010,7 +3972,7 @@ public final class BatchReport { if (((bitField0_ & 0x00000200) == 0x00000200)) { output.writeBytes(12, getDescriptionBytes()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -4033,7 +3995,7 @@ public final class BatchReport { } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, type_.getNumber()); + .computeEnumSize(4, type_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream @@ -4077,18 +4039,12 @@ public final class BatchReport { size += com.google.protobuf.CodedOutputStream .computeBytesSize(12, getDescriptionBytes()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.Component parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -4142,12 +4098,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Component prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -4189,10 +4150,6 @@ public final class BatchReport { getLinkFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); ref_ = 0; @@ -4201,7 +4158,7 @@ public final class BatchReport { bitField0_ = (bitField0_ & ~0x00000002); name_ = ""; bitField0_ = (bitField0_ & ~0x00000004); - type_ = org.sonar.batch.protocol.Constants.ComponentType.PROJECT; + type_ = 0; bitField0_ = (bitField0_ & ~0x00000008); isTest_ = false; bitField0_ = (bitField0_ & ~0x00000010); @@ -4226,10 +4183,6 @@ public final class BatchReport { 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_Component_descriptor; @@ -4399,7 +4352,8 @@ public final class BatchReport { description_ = other.description_; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -4610,7 +4564,7 @@ public final class BatchReport { return this; } - private org.sonar.batch.protocol.Constants.ComponentType type_ = org.sonar.batch.protocol.Constants.ComponentType.PROJECT; + private int type_ = 0; /** * optional .ComponentType type = 4; */ @@ -4621,7 +4575,8 @@ public final class BatchReport { * optional .ComponentType type = 4; */ public org.sonar.batch.protocol.Constants.ComponentType getType() { - return type_; + org.sonar.batch.protocol.Constants.ComponentType result = org.sonar.batch.protocol.Constants.ComponentType.valueOf(type_); + return result == null ? org.sonar.batch.protocol.Constants.ComponentType.PROJECT : result; } /** * optional .ComponentType type = 4; @@ -4631,7 +4586,7 @@ public final class BatchReport { throw new NullPointerException(); } bitField0_ |= 0x00000008; - type_ = value; + type_ = value.getNumber(); onChanged(); return this; } @@ -4640,7 +4595,7 @@ public final class BatchReport { */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000008); - type_ = org.sonar.batch.protocol.Constants.ComponentType.PROJECT; + type_ = 0; onChanged(); return this; } @@ -5416,12 +5371,44 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:Component) } + // @@protoc_insertion_point(class_scope:Component) + private static final org.sonar.batch.protocol.output.BatchReport.Component DEFAULT_INSTANCE; static { - defaultInstance = new Component(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.Component(); + } + + public static org.sonar.batch.protocol.output.BatchReport.Component getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Component parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Component(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.Component getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:Component) } public interface MeasureOrBuilder extends @@ -5512,37 +5499,33 @@ public final class BatchReport { /** * Protobuf type {@code Measure} */ - public static final class Measure extends + public static final class Measure extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Measure) MeasureOrBuilder { // Use Measure.newBuilder() to construct. - private Measure(com.google.protobuf.GeneratedMessage.Builder builder) { + private Measure(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Measure(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Measure defaultInstance; - public static Measure getDefaultInstance() { - return defaultInstance; } - - public Measure getDefaultInstanceForType() { - return defaultInstance; + private Measure() { + valueType_ = 0; + booleanValue_ = false; + intValue_ = 0; + longValue_ = 0L; + doubleValue_ = 0D; + stringValue_ = ""; + metricKey_ = ""; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Measure( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -5568,7 +5551,7 @@ public final class BatchReport { unknownFields.mergeVarintField(1, rawValue); } else { bitField0_ |= 0x00000001; - valueType_ = value; + valueType_ = rawValue; } break; } @@ -5607,10 +5590,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -5628,24 +5612,9 @@ public final class BatchReport { org.sonar.batch.protocol.output.BatchReport.Measure.class, org.sonar.batch.protocol.output.BatchReport.Measure.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Measure parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Measure(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int VALUE_TYPE_FIELD_NUMBER = 1; - private org.sonar.batch.protocol.Constants.MeasureValueType valueType_; + private int valueType_; /** * optional .MeasureValueType value_type = 1; */ @@ -5656,7 +5625,8 @@ public final class BatchReport { * optional .MeasureValueType value_type = 1; */ public org.sonar.batch.protocol.Constants.MeasureValueType getValueType() { - return valueType_; + org.sonar.batch.protocol.Constants.MeasureValueType result = org.sonar.batch.protocol.Constants.MeasureValueType.valueOf(valueType_); + return result == null ? org.sonar.batch.protocol.Constants.MeasureValueType.INT : result; } public static final int BOOLEAN_VALUE_FIELD_NUMBER = 2; @@ -5728,7 +5698,7 @@ public final class BatchReport { } public static final int STRING_VALUE_FIELD_NUMBER = 6; - private java.lang.Object stringValue_; + private volatile java.lang.Object stringValue_; /** * optional string string_value = 6; */ @@ -5770,7 +5740,7 @@ public final class BatchReport { } public static final int METRIC_KEY_FIELD_NUMBER = 7; - private java.lang.Object metricKey_; + private volatile java.lang.Object metricKey_; /** * optional string metric_key = 7; */ @@ -5811,15 +5781,6 @@ public final class BatchReport { } } - private void initFields() { - valueType_ = org.sonar.batch.protocol.Constants.MeasureValueType.INT; - booleanValue_ = false; - intValue_ = 0; - longValue_ = 0L; - doubleValue_ = 0D; - stringValue_ = ""; - metricKey_ = ""; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -5832,9 +5793,8 @@ public final class BatchReport { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, valueType_.getNumber()); + output.writeEnum(1, valueType_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBool(2, booleanValue_); @@ -5854,7 +5814,7 @@ public final class BatchReport { if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeBytes(7, getMetricKeyBytes()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -5865,7 +5825,7 @@ public final class BatchReport { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, valueType_.getNumber()); + .computeEnumSize(1, valueType_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream @@ -5891,18 +5851,12 @@ public final class BatchReport { size += com.google.protobuf.CodedOutputStream .computeBytesSize(7, getMetricKeyBytes()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.Measure parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -5956,12 +5910,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Measure prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -6002,13 +5961,9 @@ public final class BatchReport { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); - valueType_ = org.sonar.batch.protocol.Constants.MeasureValueType.INT; + valueType_ = 0; bitField0_ = (bitField0_ & ~0x00000001); booleanValue_ = false; bitField0_ = (bitField0_ & ~0x00000002); @@ -6025,10 +5980,6 @@ public final class BatchReport { 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_Measure_descriptor; @@ -6119,7 +6070,8 @@ public final class BatchReport { metricKey_ = other.metricKey_; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -6146,7 +6098,7 @@ public final class BatchReport { } private int bitField0_; - private org.sonar.batch.protocol.Constants.MeasureValueType valueType_ = org.sonar.batch.protocol.Constants.MeasureValueType.INT; + private int valueType_ = 0; /** * optional .MeasureValueType value_type = 1; */ @@ -6157,7 +6109,8 @@ public final class BatchReport { * optional .MeasureValueType value_type = 1; */ public org.sonar.batch.protocol.Constants.MeasureValueType getValueType() { - return valueType_; + org.sonar.batch.protocol.Constants.MeasureValueType result = org.sonar.batch.protocol.Constants.MeasureValueType.valueOf(valueType_); + return result == null ? org.sonar.batch.protocol.Constants.MeasureValueType.INT : result; } /** * optional .MeasureValueType value_type = 1; @@ -6167,7 +6120,7 @@ public final class BatchReport { throw new NullPointerException(); } bitField0_ |= 0x00000001; - valueType_ = value; + valueType_ = value.getNumber(); onChanged(); return this; } @@ -6176,7 +6129,7 @@ public final class BatchReport { */ public Builder clearValueType() { bitField0_ = (bitField0_ & ~0x00000001); - valueType_ = org.sonar.batch.protocol.Constants.MeasureValueType.INT; + valueType_ = 0; onChanged(); return this; } @@ -6480,12 +6433,44 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:Measure) } + // @@protoc_insertion_point(class_scope:Measure) + private static final org.sonar.batch.protocol.output.BatchReport.Measure DEFAULT_INSTANCE; static { - defaultInstance = new Measure(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.Measure(); + } + + public static org.sonar.batch.protocol.output.BatchReport.Measure getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Measure parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Measure(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.Measure getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:Measure) } public interface IssueOrBuilder extends @@ -6637,37 +6622,34 @@ public final class BatchReport { /** * Protobuf type {@code Issue} */ - public static final class Issue extends + public static final class Issue extends 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) { + 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 static final Issue defaultInstance; - public static Issue getDefaultInstance() { - return defaultInstance; } - - public Issue getDefaultInstanceForType() { - return defaultInstance; + private Issue() { + ruleRepository_ = ""; + ruleKey_ = ""; + line_ = 0; + msg_ = ""; + severity_ = 0; + effortToFix_ = 0D; + attributes_ = ""; + flow_ = java.util.Collections.emptyList(); } - 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 { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -6716,7 +6698,7 @@ public final class BatchReport { unknownFields.mergeVarintField(5, rawValue); } else { bitField0_ |= 0x00000010; - severity_ = value; + severity_ = rawValue; } break; } @@ -6755,10 +6737,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { flow_ = java.util.Collections.unmodifiableList(flow_); @@ -6779,24 +6762,9 @@ public final class BatchReport { 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( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Issue(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int RULE_REPOSITORY_FIELD_NUMBER = 1; - private java.lang.Object ruleRepository_; + private volatile java.lang.Object ruleRepository_; /** * optional string rule_repository = 1; */ @@ -6838,7 +6806,7 @@ public final class BatchReport { } public static final int RULE_KEY_FIELD_NUMBER = 2; - private java.lang.Object ruleKey_; + private volatile java.lang.Object ruleKey_; /** * optional string rule_key = 2; */ @@ -6905,7 +6873,7 @@ public final class BatchReport { } public static final int MSG_FIELD_NUMBER = 4; - private java.lang.Object msg_; + private volatile java.lang.Object msg_; /** * optional string msg = 4; */ @@ -6947,7 +6915,7 @@ public final class BatchReport { } public static final int SEVERITY_FIELD_NUMBER = 5; - private org.sonar.batch.protocol.Constants.Severity severity_; + private int severity_; /** * optional .Severity severity = 5; */ @@ -6958,7 +6926,8 @@ public final class BatchReport { * optional .Severity severity = 5; */ public org.sonar.batch.protocol.Constants.Severity getSeverity() { - return severity_; + org.sonar.batch.protocol.Constants.Severity result = org.sonar.batch.protocol.Constants.Severity.valueOf(severity_); + return result == null ? org.sonar.batch.protocol.Constants.Severity.INFO : result; } public static final int EFFORT_TO_FIX_FIELD_NUMBER = 6; @@ -6977,7 +6946,7 @@ public final class BatchReport { } public static final int ATTRIBUTES_FIELD_NUMBER = 7; - private java.lang.Object attributes_; + private volatile java.lang.Object attributes_; /** * optional string attributes = 7; */ @@ -7038,7 +7007,7 @@ public final class BatchReport { * */ public org.sonar.batch.protocol.output.BatchReport.TextRange getTextRange() { - return textRange_; + return textRange_ == null ? org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : textRange_; } /** * optional .TextRange text_range = 9; @@ -7048,7 +7017,7 @@ public final class BatchReport { * */ public org.sonar.batch.protocol.output.BatchReport.TextRangeOrBuilder getTextRangeOrBuilder() { - return textRange_; + return textRange_ == null ? org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : textRange_; } public static final int FLOW_FIELD_NUMBER = 10; @@ -7086,17 +7055,6 @@ public final class BatchReport { return flow_.get(index); } - private void initFields() { - ruleRepository_ = ""; - ruleKey_ = ""; - line_ = 0; - msg_ = ""; - severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; - effortToFix_ = 0D; - attributes_ = ""; - textRange_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); - flow_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -7109,7 +7067,6 @@ public final class BatchReport { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getRuleRepositoryBytes()); } @@ -7123,7 +7080,7 @@ public final class BatchReport { output.writeBytes(4, getMsgBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeEnum(5, severity_.getNumber()); + output.writeEnum(5, severity_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeDouble(6, effortToFix_); @@ -7132,12 +7089,12 @@ public final class BatchReport { output.writeBytes(7, getAttributesBytes()); } if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeMessage(9, textRange_); + output.writeMessage(9, getTextRange()); } for (int i = 0; i < flow_.size(); i++) { output.writeMessage(10, flow_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -7164,7 +7121,7 @@ public final class BatchReport { } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, severity_.getNumber()); + .computeEnumSize(5, severity_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream @@ -7176,24 +7133,18 @@ public final class BatchReport { } if (((bitField0_ & 0x00000080) == 0x00000080)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, textRange_); + .computeMessageSize(9, getTextRange()); } for (int i = 0; i < flow_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(10, flow_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.Issue parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -7247,12 +7198,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Issue prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -7295,10 +7251,6 @@ public final class BatchReport { getFlowFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); ruleRepository_ = ""; @@ -7309,14 +7261,14 @@ public final class BatchReport { bitField0_ = (bitField0_ & ~0x00000004); msg_ = ""; bitField0_ = (bitField0_ & ~0x00000008); - severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; + severity_ = 0; bitField0_ = (bitField0_ & ~0x00000010); effortToFix_ = 0D; bitField0_ = (bitField0_ & ~0x00000020); attributes_ = ""; bitField0_ = (bitField0_ & ~0x00000040); if (textRangeBuilder_ == null) { - textRange_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); + textRange_ = null; } else { textRangeBuilder_.clear(); } @@ -7330,10 +7282,6 @@ public final class BatchReport { 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_Issue_descriptor; @@ -7474,7 +7422,8 @@ public final class BatchReport { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -7781,7 +7730,7 @@ public final class BatchReport { return this; } - private org.sonar.batch.protocol.Constants.Severity severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; + private int severity_ = 0; /** * optional .Severity severity = 5; */ @@ -7792,7 +7741,8 @@ public final class BatchReport { * optional .Severity severity = 5; */ public org.sonar.batch.protocol.Constants.Severity getSeverity() { - return severity_; + org.sonar.batch.protocol.Constants.Severity result = org.sonar.batch.protocol.Constants.Severity.valueOf(severity_); + return result == null ? org.sonar.batch.protocol.Constants.Severity.INFO : result; } /** * optional .Severity severity = 5; @@ -7802,7 +7752,7 @@ public final class BatchReport { throw new NullPointerException(); } bitField0_ |= 0x00000010; - severity_ = value; + severity_ = value.getNumber(); onChanged(); return this; } @@ -7811,7 +7761,7 @@ public final class BatchReport { */ public Builder clearSeverity() { bitField0_ = (bitField0_ & ~0x00000010); - severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; + severity_ = 0; onChanged(); return this; } @@ -7924,7 +7874,7 @@ public final class BatchReport { return this; } - private org.sonar.batch.protocol.output.BatchReport.TextRange textRange_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); + private org.sonar.batch.protocol.output.BatchReport.TextRange textRange_ = null; private com.google.protobuf.SingleFieldBuilder< org.sonar.batch.protocol.output.BatchReport.TextRange, org.sonar.batch.protocol.output.BatchReport.TextRange.Builder, org.sonar.batch.protocol.output.BatchReport.TextRangeOrBuilder> textRangeBuilder_; /** @@ -7946,7 +7896,7 @@ public final class BatchReport { */ public org.sonar.batch.protocol.output.BatchReport.TextRange getTextRange() { if (textRangeBuilder_ == null) { - return textRange_; + return textRange_ == null ? org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : textRange_; } else { return textRangeBuilder_.getMessage(); } @@ -7999,6 +7949,7 @@ public final class BatchReport { public Builder mergeTextRange(org.sonar.batch.protocol.output.BatchReport.TextRange value) { if (textRangeBuilder_ == null) { if (((bitField0_ & 0x00000080) == 0x00000080) && + textRange_ != null && textRange_ != org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance()) { textRange_ = org.sonar.batch.protocol.output.BatchReport.TextRange.newBuilder(textRange_).mergeFrom(value).buildPartial(); @@ -8021,7 +7972,7 @@ public final class BatchReport { */ public Builder clearTextRange() { if (textRangeBuilder_ == null) { - textRange_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); + textRange_ = null; onChanged(); } else { textRangeBuilder_.clear(); @@ -8052,7 +8003,8 @@ public final class BatchReport { if (textRangeBuilder_ != null) { return textRangeBuilder_.getMessageOrBuilder(); } else { - return textRange_; + return textRange_ == null ? + org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : textRange_; } } /** @@ -8319,12 +8271,44 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:Issue) } + // @@protoc_insertion_point(class_scope:Issue) + private static final org.sonar.batch.protocol.output.BatchReport.Issue DEFAULT_INSTANCE; static { - defaultInstance = new Issue(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.Issue(); + } + + public static org.sonar.batch.protocol.output.BatchReport.Issue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Issue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Issue(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.Issue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:Issue) } public interface IssueLocationOrBuilder extends @@ -8382,37 +8366,28 @@ public final class BatchReport { /** * Protobuf type {@code IssueLocation} */ - public static final class IssueLocation extends + public static final class IssueLocation extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:IssueLocation) IssueLocationOrBuilder { // Use IssueLocation.newBuilder() to construct. - private IssueLocation(com.google.protobuf.GeneratedMessage.Builder builder) { + private IssueLocation(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private IssueLocation(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final IssueLocation defaultInstance; - public static IssueLocation getDefaultInstance() { - return defaultInstance; } - - public IssueLocation getDefaultInstanceForType() { - return defaultInstance; + private IssueLocation() { + componentRef_ = 0; + msg_ = ""; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private IssueLocation( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -8458,10 +8433,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -8479,21 +8455,6 @@ public final class BatchReport { org.sonar.batch.protocol.output.BatchReport.IssueLocation.class, org.sonar.batch.protocol.output.BatchReport.IssueLocation.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public IssueLocation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new IssueLocation(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int COMPONENT_REF_FIELD_NUMBER = 1; private int componentRef_; @@ -8530,7 +8491,7 @@ public final class BatchReport { * */ public org.sonar.batch.protocol.output.BatchReport.TextRange getTextRange() { - return textRange_; + return textRange_ == null ? org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : textRange_; } /** * optional .TextRange text_range = 2; @@ -8540,11 +8501,11 @@ public final class BatchReport { * */ public org.sonar.batch.protocol.output.BatchReport.TextRangeOrBuilder getTextRangeOrBuilder() { - return textRange_; + return textRange_ == null ? org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : textRange_; } public static final int MSG_FIELD_NUMBER = 3; - private java.lang.Object msg_; + private volatile java.lang.Object msg_; /** * optional string msg = 3; */ @@ -8585,11 +8546,6 @@ public final class BatchReport { } } - private void initFields() { - componentRef_ = 0; - textRange_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); - msg_ = ""; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -8602,17 +8558,16 @@ public final class BatchReport { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt32(1, componentRef_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, textRange_); + output.writeMessage(2, getTextRange()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getMsgBytes()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -8627,24 +8582,18 @@ public final class BatchReport { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, textRange_); + .computeMessageSize(2, getTextRange()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getMsgBytes()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.IssueLocation parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -8698,12 +8647,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.IssueLocation prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -8745,16 +8699,12 @@ public final class BatchReport { getTextRangeFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); componentRef_ = 0; bitField0_ = (bitField0_ & ~0x00000001); if (textRangeBuilder_ == null) { - textRange_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); + textRange_ = null; } else { textRangeBuilder_.clear(); } @@ -8764,10 +8714,6 @@ public final class BatchReport { 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_IssueLocation_descriptor; @@ -8832,7 +8778,8 @@ public final class BatchReport { msg_ = other.msg_; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -8891,7 +8838,7 @@ public final class BatchReport { return this; } - private org.sonar.batch.protocol.output.BatchReport.TextRange textRange_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); + private org.sonar.batch.protocol.output.BatchReport.TextRange textRange_ = null; private com.google.protobuf.SingleFieldBuilder< org.sonar.batch.protocol.output.BatchReport.TextRange, org.sonar.batch.protocol.output.BatchReport.TextRange.Builder, org.sonar.batch.protocol.output.BatchReport.TextRangeOrBuilder> textRangeBuilder_; /** @@ -8913,7 +8860,7 @@ public final class BatchReport { */ public org.sonar.batch.protocol.output.BatchReport.TextRange getTextRange() { if (textRangeBuilder_ == null) { - return textRange_; + return textRange_ == null ? org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : textRange_; } else { return textRangeBuilder_.getMessage(); } @@ -8966,6 +8913,7 @@ public final class BatchReport { public Builder mergeTextRange(org.sonar.batch.protocol.output.BatchReport.TextRange value) { if (textRangeBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && + textRange_ != null && textRange_ != org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance()) { textRange_ = org.sonar.batch.protocol.output.BatchReport.TextRange.newBuilder(textRange_).mergeFrom(value).buildPartial(); @@ -8988,7 +8936,7 @@ public final class BatchReport { */ public Builder clearTextRange() { if (textRangeBuilder_ == null) { - textRange_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); + textRange_ = null; onChanged(); } else { textRangeBuilder_.clear(); @@ -9019,7 +8967,8 @@ public final class BatchReport { if (textRangeBuilder_ != null) { return textRangeBuilder_.getMessageOrBuilder(); } else { - return textRange_; + return textRange_ == null ? + org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : textRange_; } } /** @@ -9122,12 +9071,44 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:IssueLocation) } + // @@protoc_insertion_point(class_scope:IssueLocation) + private static final org.sonar.batch.protocol.output.BatchReport.IssueLocation DEFAULT_INSTANCE; static { - defaultInstance = new IssueLocation(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.IssueLocation(); + } + + public static org.sonar.batch.protocol.output.BatchReport.IssueLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public IssueLocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new IssueLocation(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.IssueLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:IssueLocation) } public interface FlowOrBuilder extends @@ -9161,37 +9142,27 @@ public final class BatchReport { /** * Protobuf type {@code Flow} */ - public static final class Flow extends + public static final class Flow extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Flow) FlowOrBuilder { // Use Flow.newBuilder() to construct. - private Flow(com.google.protobuf.GeneratedMessage.Builder builder) { + private Flow(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private Flow(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Flow defaultInstance; - public static Flow getDefaultInstance() { - return defaultInstance; - } - - public Flow getDefaultInstanceForType() { - return defaultInstance; + private Flow() { + location_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Flow( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -9221,10 +9192,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { location_ = java.util.Collections.unmodifiableList(location_); @@ -9245,21 +9217,6 @@ public final class BatchReport { org.sonar.batch.protocol.output.BatchReport.Flow.class, org.sonar.batch.protocol.output.BatchReport.Flow.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Flow parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Flow(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - public static final int LOCATION_FIELD_NUMBER = 1; private java.util.List location_; /** @@ -9295,9 +9252,6 @@ public final class BatchReport { return location_.get(index); } - private void initFields() { - location_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -9310,11 +9264,10 @@ public final class BatchReport { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); for (int i = 0; i < location_.size(); i++) { output.writeMessage(1, location_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -9327,18 +9280,12 @@ public final class BatchReport { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, location_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.Flow parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -9392,12 +9339,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Flow prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -9439,10 +9391,6 @@ public final class BatchReport { getLocationFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); if (locationBuilder_ == null) { @@ -9454,10 +9402,6 @@ public final class BatchReport { 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_Flow_descriptor; @@ -9528,7 +9472,8 @@ public final class BatchReport { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -9798,12 +9743,44 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:Flow) } + // @@protoc_insertion_point(class_scope:Flow) + private static final org.sonar.batch.protocol.output.BatchReport.Flow DEFAULT_INSTANCE; static { - defaultInstance = new Flow(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.Flow(); + } + + public static org.sonar.batch.protocol.output.BatchReport.Flow getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Flow parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Flow(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.Flow getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:Flow) } public interface ChangesetsOrBuilder extends @@ -9871,37 +9848,29 @@ public final class BatchReport { /** * Protobuf type {@code Changesets} */ - public static final class Changesets extends + public static final class Changesets extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Changesets) ChangesetsOrBuilder { // Use Changesets.newBuilder() to construct. - private Changesets(com.google.protobuf.GeneratedMessage.Builder builder) { + private Changesets(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private Changesets(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Changesets defaultInstance; - public static Changesets getDefaultInstance() { - return defaultInstance; - } - - public Changesets getDefaultInstanceForType() { - return defaultInstance; + private Changesets() { + componentRef_ = 0; + changeset_ = java.util.Collections.emptyList(); + changesetIndexByLine_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Changesets( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -9957,10 +9926,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { changeset_ = java.util.Collections.unmodifiableList(changeset_); @@ -9984,21 +9954,6 @@ public final class BatchReport { org.sonar.batch.protocol.output.BatchReport.Changesets.class, org.sonar.batch.protocol.output.BatchReport.Changesets.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Changesets parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Changesets(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - public interface ChangesetOrBuilder extends // @@protoc_insertion_point(interface_extends:Changesets.Changeset) com.google.protobuf.MessageOrBuilder { @@ -10043,37 +9998,29 @@ public final class BatchReport { /** * Protobuf type {@code Changesets.Changeset} */ - public static final class Changeset extends + public static final class Changeset extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Changesets.Changeset) ChangesetOrBuilder { // Use Changeset.newBuilder() to construct. - private Changeset(com.google.protobuf.GeneratedMessage.Builder builder) { + private Changeset(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private Changeset(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Changeset defaultInstance; - public static Changeset getDefaultInstance() { - return defaultInstance; - } - - public Changeset getDefaultInstanceForType() { - return defaultInstance; + private Changeset() { + revision_ = ""; + author_ = ""; + date_ = 0L; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Changeset( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -10112,10 +10059,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -10133,24 +10081,9 @@ public final class BatchReport { org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.class, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Changeset parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Changeset(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int REVISION_FIELD_NUMBER = 1; - private java.lang.Object revision_; + private volatile java.lang.Object revision_; /** * optional string revision = 1; */ @@ -10192,7 +10125,7 @@ public final class BatchReport { } public static final int AUTHOR_FIELD_NUMBER = 2; - private java.lang.Object author_; + private volatile java.lang.Object author_; /** * optional string author = 2; */ @@ -10248,11 +10181,6 @@ public final class BatchReport { return date_; } - private void initFields() { - revision_ = ""; - author_ = ""; - date_ = 0L; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -10265,7 +10193,6 @@ public final class BatchReport { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getRevisionBytes()); } @@ -10275,7 +10202,7 @@ public final class BatchReport { if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeInt64(3, date_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -10296,18 +10223,12 @@ public final class BatchReport { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, date_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.Changesets.Changeset parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -10361,12 +10282,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -10407,10 +10333,6 @@ public final class BatchReport { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); revision_ = ""; @@ -10422,10 +10344,6 @@ public final class BatchReport { 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_Changesets_Changeset_descriptor; @@ -10488,7 +10406,8 @@ public final class BatchReport { if (other.hasDate()) { setDate(other.getDate()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -10702,12 +10621,44 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:Changesets.Changeset) } + // @@protoc_insertion_point(class_scope:Changesets.Changeset) + private static final org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset DEFAULT_INSTANCE; static { - defaultInstance = new Changeset(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset(); + } + + public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Changeset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Changeset(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:Changesets.Changeset) } private int bitField0_; @@ -10796,11 +10747,6 @@ public final class BatchReport { } private int changesetIndexByLineMemoizedSerializedSize = -1; - private void initFields() { - componentRef_ = 0; - changeset_ = java.util.Collections.emptyList(); - changesetIndexByLine_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -10827,7 +10773,7 @@ public final class BatchReport { for (int i = 0; i < changesetIndexByLine_.size(); i++) { output.writeInt32NoTag(changesetIndexByLine_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -10858,18 +10804,12 @@ public final class BatchReport { } changesetIndexByLineMemoizedSerializedSize = dataSize; } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.Changesets parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -10923,12 +10863,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Changesets prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -10970,10 +10915,6 @@ public final class BatchReport { getChangesetFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); componentRef_ = 0; @@ -10989,10 +10930,6 @@ public final class BatchReport { 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_Changesets_descriptor; @@ -11087,7 +11024,8 @@ public final class BatchReport { } onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -11483,12 +11421,44 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:Changesets) } + // @@protoc_insertion_point(class_scope:Changesets) + private static final org.sonar.batch.protocol.output.BatchReport.Changesets DEFAULT_INSTANCE; static { - defaultInstance = new Changesets(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.Changesets(); + } + + public static org.sonar.batch.protocol.output.BatchReport.Changesets getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Changesets parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Changesets(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.Changesets getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:Changesets) } public interface DuplicateOrBuilder extends @@ -11554,37 +11524,28 @@ public final class BatchReport { /** * Protobuf type {@code Duplicate} */ - public static final class Duplicate extends + public static final class Duplicate extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Duplicate) DuplicateOrBuilder { // Use Duplicate.newBuilder() to construct. - private Duplicate(com.google.protobuf.GeneratedMessage.Builder builder) { + private Duplicate(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Duplicate(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Duplicate defaultInstance; - public static Duplicate getDefaultInstance() { - return defaultInstance; } - - public Duplicate getDefaultInstanceForType() { - return defaultInstance; + private Duplicate() { + otherFileRef_ = 0; + otherFileKey_ = ""; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Duplicate( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -11630,10 +11591,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -11647,23 +11609,8 @@ public final class BatchReport { protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplicate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Duplicate.class, org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Duplicate parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Duplicate(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.Duplicate.class, org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder.class); } private int bitField0_; @@ -11702,17 +11649,17 @@ public final class BatchReport { * optional .TextRange range = 2; */ public org.sonar.batch.protocol.output.BatchReport.TextRange getRange() { - return range_; + return range_ == null ? org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : range_; } /** * optional .TextRange range = 2; */ public org.sonar.batch.protocol.output.BatchReport.TextRangeOrBuilder getRangeOrBuilder() { - return range_; + return range_ == null ? org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : range_; } public static final int OTHER_FILE_KEY_FIELD_NUMBER = 3; - private java.lang.Object otherFileKey_; + private volatile java.lang.Object otherFileKey_; /** * optional string other_file_key = 3; * @@ -11765,11 +11712,6 @@ public final class BatchReport { } } - private void initFields() { - otherFileRef_ = 0; - range_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); - otherFileKey_ = ""; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -11782,17 +11724,16 @@ public final class BatchReport { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt32(1, otherFileRef_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, range_); + output.writeMessage(2, getRange()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getOtherFileKeyBytes()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -11807,24 +11748,18 @@ public final class BatchReport { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, range_); + .computeMessageSize(2, getRange()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getOtherFileKeyBytes()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.Duplicate parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -11878,12 +11813,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Duplicate prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -11925,16 +11865,12 @@ public final class BatchReport { getRangeFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); otherFileRef_ = 0; bitField0_ = (bitField0_ & ~0x00000001); if (rangeBuilder_ == null) { - range_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); + range_ = null; } else { rangeBuilder_.clear(); } @@ -11944,10 +11880,6 @@ public final class BatchReport { 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_Duplicate_descriptor; @@ -12012,7 +11944,8 @@ public final class BatchReport { otherFileKey_ = other.otherFileKey_; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -12087,7 +12020,7 @@ public final class BatchReport { return this; } - private org.sonar.batch.protocol.output.BatchReport.TextRange range_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); + private org.sonar.batch.protocol.output.BatchReport.TextRange range_ = null; private com.google.protobuf.SingleFieldBuilder< org.sonar.batch.protocol.output.BatchReport.TextRange, org.sonar.batch.protocol.output.BatchReport.TextRange.Builder, org.sonar.batch.protocol.output.BatchReport.TextRangeOrBuilder> rangeBuilder_; /** @@ -12101,7 +12034,7 @@ public final class BatchReport { */ public org.sonar.batch.protocol.output.BatchReport.TextRange getRange() { if (rangeBuilder_ == null) { - return range_; + return range_ == null ? org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : range_; } else { return rangeBuilder_.getMessage(); } @@ -12142,6 +12075,7 @@ public final class BatchReport { public Builder mergeRange(org.sonar.batch.protocol.output.BatchReport.TextRange value) { if (rangeBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && + range_ != null && range_ != org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance()) { range_ = org.sonar.batch.protocol.output.BatchReport.TextRange.newBuilder(range_).mergeFrom(value).buildPartial(); @@ -12160,7 +12094,7 @@ public final class BatchReport { */ public Builder clearRange() { if (rangeBuilder_ == null) { - range_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); + range_ = null; onChanged(); } else { rangeBuilder_.clear(); @@ -12183,7 +12117,8 @@ public final class BatchReport { if (rangeBuilder_ != null) { return rangeBuilder_.getMessageOrBuilder(); } else { - return range_; + return range_ == null ? + org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : range_; } } /** @@ -12306,12 +12241,44 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:Duplicate) } + // @@protoc_insertion_point(class_scope:Duplicate) + private static final org.sonar.batch.protocol.output.BatchReport.Duplicate DEFAULT_INSTANCE; static { - defaultInstance = new Duplicate(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.Duplicate(); + } + + public static org.sonar.batch.protocol.output.BatchReport.Duplicate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Duplicate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Duplicate(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.Duplicate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:Duplicate) } public interface DuplicationOrBuilder extends @@ -12370,37 +12337,27 @@ public final class BatchReport { /** * Protobuf type {@code Duplication} */ - public static final class Duplication extends + public static final class Duplication extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Duplication) DuplicationOrBuilder { // Use Duplication.newBuilder() to construct. - private Duplication(com.google.protobuf.GeneratedMessage.Builder builder) { + private Duplication(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Duplication(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Duplication defaultInstance; - public static Duplication getDefaultInstance() { - return defaultInstance; } - - public Duplication getDefaultInstanceForType() { - return defaultInstance; + private Duplication() { + duplicate_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Duplication( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -12443,10 +12400,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { duplicate_ = java.util.Collections.unmodifiableList(duplicate_); @@ -12467,21 +12425,6 @@ public final class BatchReport { org.sonar.batch.protocol.output.BatchReport.Duplication.class, org.sonar.batch.protocol.output.BatchReport.Duplication.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Duplication parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Duplication(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int ORIGIN_POSITION_FIELD_NUMBER = 1; private org.sonar.batch.protocol.output.BatchReport.TextRange originPosition_; @@ -12503,7 +12446,7 @@ public final class BatchReport { * */ public org.sonar.batch.protocol.output.BatchReport.TextRange getOriginPosition() { - return originPosition_; + return originPosition_ == null ? org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : originPosition_; } /** * optional .TextRange origin_position = 1; @@ -12513,7 +12456,7 @@ public final class BatchReport { * */ public org.sonar.batch.protocol.output.BatchReport.TextRangeOrBuilder getOriginPositionOrBuilder() { - return originPosition_; + return originPosition_ == null ? org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : originPosition_; } public static final int DUPLICATE_FIELD_NUMBER = 2; @@ -12551,10 +12494,6 @@ public final class BatchReport { return duplicate_.get(index); } - private void initFields() { - originPosition_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); - duplicate_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -12567,14 +12506,13 @@ public final class BatchReport { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, originPosition_); + output.writeMessage(1, getOriginPosition()); } for (int i = 0; i < duplicate_.size(); i++) { output.writeMessage(2, duplicate_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -12585,24 +12523,18 @@ public final class BatchReport { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, originPosition_); + .computeMessageSize(1, getOriginPosition()); } for (int i = 0; i < duplicate_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, duplicate_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.Duplication parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -12656,12 +12588,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Duplication prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -12704,14 +12641,10 @@ public final class BatchReport { getDuplicateFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); if (originPositionBuilder_ == null) { - originPosition_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); + originPosition_ = null; } else { originPositionBuilder_.clear(); } @@ -12725,10 +12658,6 @@ public final class BatchReport { 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_Duplication_descriptor; @@ -12812,7 +12741,8 @@ public final class BatchReport { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -12839,7 +12769,7 @@ public final class BatchReport { } private int bitField0_; - private org.sonar.batch.protocol.output.BatchReport.TextRange originPosition_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); + private org.sonar.batch.protocol.output.BatchReport.TextRange originPosition_ = null; private com.google.protobuf.SingleFieldBuilder< org.sonar.batch.protocol.output.BatchReport.TextRange, org.sonar.batch.protocol.output.BatchReport.TextRange.Builder, org.sonar.batch.protocol.output.BatchReport.TextRangeOrBuilder> originPositionBuilder_; /** @@ -12861,7 +12791,7 @@ public final class BatchReport { */ public org.sonar.batch.protocol.output.BatchReport.TextRange getOriginPosition() { if (originPositionBuilder_ == null) { - return originPosition_; + return originPosition_ == null ? org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : originPosition_; } else { return originPositionBuilder_.getMessage(); } @@ -12914,6 +12844,7 @@ public final class BatchReport { public Builder mergeOriginPosition(org.sonar.batch.protocol.output.BatchReport.TextRange value) { if (originPositionBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && + originPosition_ != null && originPosition_ != org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance()) { originPosition_ = org.sonar.batch.protocol.output.BatchReport.TextRange.newBuilder(originPosition_).mergeFrom(value).buildPartial(); @@ -12936,7 +12867,7 @@ public final class BatchReport { */ public Builder clearOriginPosition() { if (originPositionBuilder_ == null) { - originPosition_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); + originPosition_ = null; onChanged(); } else { originPositionBuilder_.clear(); @@ -12967,7 +12898,8 @@ public final class BatchReport { if (originPositionBuilder_ != null) { return originPositionBuilder_.getMessageOrBuilder(); } else { - return originPosition_; + return originPosition_ == null ? + org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : originPosition_; } } /** @@ -13234,12 +13166,44 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:Duplication) } + // @@protoc_insertion_point(class_scope:Duplication) + private static final org.sonar.batch.protocol.output.BatchReport.Duplication DEFAULT_INSTANCE; static { - defaultInstance = new Duplication(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.Duplication(); + } + + public static org.sonar.batch.protocol.output.BatchReport.Duplication getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Duplication parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Duplication(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.Duplication getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:Duplication) } public interface TextRangeOrBuilder extends @@ -13321,37 +13285,30 @@ public final class BatchReport { * Lines start at 1 and line offsets start at 0 * */ - public static final class TextRange extends + public static final class TextRange extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:TextRange) TextRangeOrBuilder { // Use TextRange.newBuilder() to construct. - private TextRange(com.google.protobuf.GeneratedMessage.Builder builder) { + private TextRange(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private TextRange(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final TextRange defaultInstance; - public static TextRange getDefaultInstance() { - return defaultInstance; } - - public TextRange getDefaultInstanceForType() { - return defaultInstance; + private TextRange() { + startLine_ = 0; + endLine_ = 0; + startOffset_ = 0; + endOffset_ = 0; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private TextRange( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -13393,10 +13350,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -13414,21 +13372,6 @@ public final class BatchReport { org.sonar.batch.protocol.output.BatchReport.TextRange.class, org.sonar.batch.protocol.output.BatchReport.TextRange.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public TextRange parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextRange(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int START_LINE_FIELD_NUMBER = 1; private int startLine_; @@ -13522,12 +13465,6 @@ public final class BatchReport { return endOffset_; } - private void initFields() { - startLine_ = 0; - endLine_ = 0; - startOffset_ = 0; - endOffset_ = 0; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -13540,7 +13477,6 @@ public final class BatchReport { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt32(1, startLine_); } @@ -13553,7 +13489,7 @@ public final class BatchReport { if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeInt32(4, endOffset_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -13578,18 +13514,12 @@ public final class BatchReport { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, endOffset_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.TextRange parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -13643,12 +13573,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.TextRange prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -13693,10 +13628,6 @@ public final class BatchReport { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); startLine_ = 0; @@ -13710,10 +13641,6 @@ public final class BatchReport { 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_TextRange_descriptor; @@ -13779,7 +13706,8 @@ public final class BatchReport { if (other.hasEndOffset()) { setEndOffset(other.getEndOffset()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -14001,12 +13929,44 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:TextRange) } + // @@protoc_insertion_point(class_scope:TextRange) + private static final org.sonar.batch.protocol.output.BatchReport.TextRange DEFAULT_INSTANCE; static { - defaultInstance = new TextRange(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.TextRange(); + } + + public static org.sonar.batch.protocol.output.BatchReport.TextRange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public TextRange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new TextRange(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.TextRange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:TextRange) } public interface SymbolOrBuilder extends @@ -14053,37 +14013,27 @@ public final class BatchReport { /** * Protobuf type {@code Symbol} */ - public static final class Symbol extends + public static final class Symbol extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Symbol) SymbolOrBuilder { // Use Symbol.newBuilder() to construct. - private Symbol(com.google.protobuf.GeneratedMessage.Builder builder) { + private Symbol(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Symbol(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Symbol defaultInstance; - public static Symbol getDefaultInstance() { - return defaultInstance; } - - public Symbol getDefaultInstanceForType() { - return defaultInstance; + private Symbol() { + reference_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Symbol( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -14126,10 +14076,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { reference_ = java.util.Collections.unmodifiableList(reference_); @@ -14150,21 +14101,6 @@ public final class BatchReport { org.sonar.batch.protocol.output.BatchReport.Symbol.class, org.sonar.batch.protocol.output.BatchReport.Symbol.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Symbol parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Symbol(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int DECLARATION_FIELD_NUMBER = 1; private org.sonar.batch.protocol.output.BatchReport.TextRange declaration_; @@ -14178,13 +14114,13 @@ public final class BatchReport { * optional .TextRange declaration = 1; */ public org.sonar.batch.protocol.output.BatchReport.TextRange getDeclaration() { - return declaration_; + return declaration_ == null ? org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : declaration_; } /** * optional .TextRange declaration = 1; */ public org.sonar.batch.protocol.output.BatchReport.TextRangeOrBuilder getDeclarationOrBuilder() { - return declaration_; + return declaration_ == null ? org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : declaration_; } public static final int REFERENCE_FIELD_NUMBER = 2; @@ -14222,10 +14158,6 @@ public final class BatchReport { return reference_.get(index); } - private void initFields() { - declaration_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); - reference_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -14238,14 +14170,13 @@ public final class BatchReport { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, declaration_); + output.writeMessage(1, getDeclaration()); } for (int i = 0; i < reference_.size(); i++) { output.writeMessage(2, reference_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -14256,24 +14187,18 @@ public final class BatchReport { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, declaration_); + .computeMessageSize(1, getDeclaration()); } for (int i = 0; i < reference_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, reference_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.Symbol parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -14327,12 +14252,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Symbol prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -14375,14 +14305,10 @@ public final class BatchReport { getReferenceFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); if (declarationBuilder_ == null) { - declaration_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); + declaration_ = null; } else { declarationBuilder_.clear(); } @@ -14396,10 +14322,6 @@ public final class BatchReport { 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_Symbol_descriptor; @@ -14483,7 +14405,8 @@ public final class BatchReport { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -14510,7 +14433,7 @@ public final class BatchReport { } private int bitField0_; - private org.sonar.batch.protocol.output.BatchReport.TextRange declaration_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); + private org.sonar.batch.protocol.output.BatchReport.TextRange declaration_ = null; private com.google.protobuf.SingleFieldBuilder< org.sonar.batch.protocol.output.BatchReport.TextRange, org.sonar.batch.protocol.output.BatchReport.TextRange.Builder, org.sonar.batch.protocol.output.BatchReport.TextRangeOrBuilder> declarationBuilder_; /** @@ -14524,7 +14447,7 @@ public final class BatchReport { */ public org.sonar.batch.protocol.output.BatchReport.TextRange getDeclaration() { if (declarationBuilder_ == null) { - return declaration_; + return declaration_ == null ? org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : declaration_; } else { return declarationBuilder_.getMessage(); } @@ -14565,6 +14488,7 @@ public final class BatchReport { public Builder mergeDeclaration(org.sonar.batch.protocol.output.BatchReport.TextRange value) { if (declarationBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && + declaration_ != null && declaration_ != org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance()) { declaration_ = org.sonar.batch.protocol.output.BatchReport.TextRange.newBuilder(declaration_).mergeFrom(value).buildPartial(); @@ -14583,7 +14507,7 @@ public final class BatchReport { */ public Builder clearDeclaration() { if (declarationBuilder_ == null) { - declaration_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); + declaration_ = null; onChanged(); } else { declarationBuilder_.clear(); @@ -14606,7 +14530,8 @@ public final class BatchReport { if (declarationBuilder_ != null) { return declarationBuilder_.getMessageOrBuilder(); } else { - return declaration_; + return declaration_ == null ? + org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : declaration_; } } /** @@ -14869,12 +14794,44 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:Symbol) } + // @@protoc_insertion_point(class_scope:Symbol) + private static final org.sonar.batch.protocol.output.BatchReport.Symbol DEFAULT_INSTANCE; static { - defaultInstance = new Symbol(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.Symbol(); + } + + public static org.sonar.batch.protocol.output.BatchReport.Symbol getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Symbol parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Symbol(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.Symbol getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:Symbol) } public interface CoverageOrBuilder extends @@ -15000,37 +14957,33 @@ public final class BatchReport { * TODO rename it LineCoverage ? * */ - public static final class Coverage extends + public static final class Coverage extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Coverage) CoverageOrBuilder { // Use Coverage.newBuilder() to construct. - private Coverage(com.google.protobuf.GeneratedMessage.Builder builder) { + private Coverage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private Coverage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Coverage defaultInstance; - public static Coverage getDefaultInstance() { - return defaultInstance; - } - - public Coverage getDefaultInstanceForType() { - return defaultInstance; + private Coverage() { + line_ = 0; + conditions_ = 0; + utHits_ = false; + itHits_ = false; + utCoveredConditions_ = 0; + itCoveredConditions_ = 0; + overallCoveredConditions_ = 0; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Coverage( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -15087,10 +15040,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -15108,21 +15062,6 @@ public final class BatchReport { org.sonar.batch.protocol.output.BatchReport.Coverage.class, org.sonar.batch.protocol.output.BatchReport.Coverage.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Coverage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Coverage(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int LINE_FIELD_NUMBER = 1; private int line_; @@ -15277,15 +15216,6 @@ public final class BatchReport { return overallCoveredConditions_; } - private void initFields() { - line_ = 0; - conditions_ = 0; - utHits_ = false; - itHits_ = false; - utCoveredConditions_ = 0; - itCoveredConditions_ = 0; - overallCoveredConditions_ = 0; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -15298,7 +15228,6 @@ public final class BatchReport { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt32(1, line_); } @@ -15320,7 +15249,7 @@ public final class BatchReport { if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeInt32(7, overallCoveredConditions_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -15357,18 +15286,12 @@ public final class BatchReport { size += com.google.protobuf.CodedOutputStream .computeInt32Size(7, overallCoveredConditions_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.Coverage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -15422,12 +15345,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Coverage prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -15473,10 +15401,6 @@ public final class BatchReport { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); line_ = 0; @@ -15496,10 +15420,6 @@ public final class BatchReport { 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_Coverage_descriptor; @@ -15586,7 +15506,8 @@ public final class BatchReport { if (other.hasOverallCoveredConditions()) { setOverallCoveredConditions(other.getOverallCoveredConditions()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -15936,12 +15857,44 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:Coverage) } + // @@protoc_insertion_point(class_scope:Coverage) + private static final org.sonar.batch.protocol.output.BatchReport.Coverage DEFAULT_INSTANCE; static { - defaultInstance = new Coverage(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.Coverage(); + } + + public static org.sonar.batch.protocol.output.BatchReport.Coverage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Coverage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Coverage(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.Coverage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:Coverage) } public interface SyntaxHighlightingOrBuilder extends @@ -15978,37 +15931,27 @@ public final class BatchReport { * TODO rename it SyntaxHighlightingRule ? * */ - public static final class SyntaxHighlighting extends + public static final class SyntaxHighlighting extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:SyntaxHighlighting) SyntaxHighlightingOrBuilder { // Use SyntaxHighlighting.newBuilder() to construct. - private SyntaxHighlighting(com.google.protobuf.GeneratedMessage.Builder builder) { + private SyntaxHighlighting(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private SyntaxHighlighting(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final SyntaxHighlighting defaultInstance; - public static SyntaxHighlighting getDefaultInstance() { - return defaultInstance; } - - public SyntaxHighlighting getDefaultInstanceForType() { - return defaultInstance; + private SyntaxHighlighting() { + type_ = 0; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private SyntaxHighlighting( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -16047,17 +15990,18 @@ public final class BatchReport { unknownFields.mergeVarintField(2, rawValue); } else { bitField0_ |= 0x00000002; - type_ = value; + type_ = rawValue; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -16075,21 +16019,6 @@ public final class BatchReport { org.sonar.batch.protocol.output.BatchReport.SyntaxHighlighting.class, org.sonar.batch.protocol.output.BatchReport.SyntaxHighlighting.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public SyntaxHighlighting parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SyntaxHighlighting(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int RANGE_FIELD_NUMBER = 1; private org.sonar.batch.protocol.output.BatchReport.TextRange range_; @@ -16103,17 +16032,17 @@ public final class BatchReport { * optional .TextRange range = 1; */ public org.sonar.batch.protocol.output.BatchReport.TextRange getRange() { - return range_; + return range_ == null ? org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : range_; } /** * optional .TextRange range = 1; */ public org.sonar.batch.protocol.output.BatchReport.TextRangeOrBuilder getRangeOrBuilder() { - return range_; + return range_ == null ? org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : range_; } public static final int TYPE_FIELD_NUMBER = 2; - private org.sonar.batch.protocol.Constants.HighlightingType type_; + private int type_; /** * optional .HighlightingType type = 2; */ @@ -16124,13 +16053,10 @@ public final class BatchReport { * optional .HighlightingType type = 2; */ public org.sonar.batch.protocol.Constants.HighlightingType getType() { - return type_; + org.sonar.batch.protocol.Constants.HighlightingType result = org.sonar.batch.protocol.Constants.HighlightingType.valueOf(type_); + return result == null ? org.sonar.batch.protocol.Constants.HighlightingType.ANNOTATION : result; } - private void initFields() { - range_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); - type_ = org.sonar.batch.protocol.Constants.HighlightingType.ANNOTATION; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -16143,14 +16069,13 @@ public final class BatchReport { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, range_); + output.writeMessage(1, getRange()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(2, type_.getNumber()); + output.writeEnum(2, type_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -16161,24 +16086,18 @@ public final class BatchReport { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, range_); + .computeMessageSize(1, getRange()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, type_.getNumber()); + .computeEnumSize(2, type_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.SyntaxHighlighting parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -16232,12 +16151,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.SyntaxHighlighting prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -16284,27 +16208,19 @@ public final class BatchReport { getRangeFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); if (rangeBuilder_ == null) { - range_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); + range_ = null; } else { rangeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); - type_ = org.sonar.batch.protocol.Constants.HighlightingType.ANNOTATION; + type_ = 0; 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_SyntaxHighlighting_descriptor; @@ -16360,7 +16276,8 @@ public final class BatchReport { if (other.hasType()) { setType(other.getType()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -16387,7 +16304,7 @@ public final class BatchReport { } private int bitField0_; - private org.sonar.batch.protocol.output.BatchReport.TextRange range_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); + private org.sonar.batch.protocol.output.BatchReport.TextRange range_ = null; private com.google.protobuf.SingleFieldBuilder< org.sonar.batch.protocol.output.BatchReport.TextRange, org.sonar.batch.protocol.output.BatchReport.TextRange.Builder, org.sonar.batch.protocol.output.BatchReport.TextRangeOrBuilder> rangeBuilder_; /** @@ -16401,7 +16318,7 @@ public final class BatchReport { */ public org.sonar.batch.protocol.output.BatchReport.TextRange getRange() { if (rangeBuilder_ == null) { - return range_; + return range_ == null ? org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : range_; } else { return rangeBuilder_.getMessage(); } @@ -16442,6 +16359,7 @@ public final class BatchReport { public Builder mergeRange(org.sonar.batch.protocol.output.BatchReport.TextRange value) { if (rangeBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && + range_ != null && range_ != org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance()) { range_ = org.sonar.batch.protocol.output.BatchReport.TextRange.newBuilder(range_).mergeFrom(value).buildPartial(); @@ -16460,7 +16378,7 @@ public final class BatchReport { */ public Builder clearRange() { if (rangeBuilder_ == null) { - range_ = org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance(); + range_ = null; onChanged(); } else { rangeBuilder_.clear(); @@ -16483,7 +16401,8 @@ public final class BatchReport { if (rangeBuilder_ != null) { return rangeBuilder_.getMessageOrBuilder(); } else { - return range_; + return range_ == null ? + org.sonar.batch.protocol.output.BatchReport.TextRange.getDefaultInstance() : range_; } } /** @@ -16503,7 +16422,7 @@ public final class BatchReport { return rangeBuilder_; } - private org.sonar.batch.protocol.Constants.HighlightingType type_ = org.sonar.batch.protocol.Constants.HighlightingType.ANNOTATION; + private int type_ = 0; /** * optional .HighlightingType type = 2; */ @@ -16514,7 +16433,8 @@ public final class BatchReport { * optional .HighlightingType type = 2; */ public org.sonar.batch.protocol.Constants.HighlightingType getType() { - return type_; + org.sonar.batch.protocol.Constants.HighlightingType result = org.sonar.batch.protocol.Constants.HighlightingType.valueOf(type_); + return result == null ? org.sonar.batch.protocol.Constants.HighlightingType.ANNOTATION : result; } /** * optional .HighlightingType type = 2; @@ -16524,7 +16444,7 @@ public final class BatchReport { throw new NullPointerException(); } bitField0_ |= 0x00000002; - type_ = value; + type_ = value.getNumber(); onChanged(); return this; } @@ -16533,7 +16453,7 @@ public final class BatchReport { */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000002); - type_ = org.sonar.batch.protocol.Constants.HighlightingType.ANNOTATION; + type_ = 0; onChanged(); return this; } @@ -16541,12 +16461,44 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:SyntaxHighlighting) } + // @@protoc_insertion_point(class_scope:SyntaxHighlighting) + private static final org.sonar.batch.protocol.output.BatchReport.SyntaxHighlighting DEFAULT_INSTANCE; static { - defaultInstance = new SyntaxHighlighting(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.SyntaxHighlighting(); + } + + public static org.sonar.batch.protocol.output.BatchReport.SyntaxHighlighting getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public SyntaxHighlighting parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new SyntaxHighlighting(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.SyntaxHighlighting getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:SyntaxHighlighting) } public interface TestOrBuilder extends @@ -16616,37 +16568,31 @@ public final class BatchReport { /** * Protobuf type {@code Test} */ - public static final class Test extends + public static final class Test extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Test) TestOrBuilder { // Use Test.newBuilder() to construct. - private Test(com.google.protobuf.GeneratedMessage.Builder builder) { + private Test(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Test(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Test defaultInstance; - public static Test getDefaultInstance() { - return defaultInstance; } - - public Test getDefaultInstanceForType() { - return defaultInstance; + private Test() { + name_ = ""; + status_ = 1; + durationInMs_ = 0L; + stacktrace_ = ""; + msg_ = ""; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Test( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -16678,7 +16624,7 @@ public final class BatchReport { unknownFields.mergeVarintField(2, rawValue); } else { bitField0_ |= 0x00000002; - status_ = value; + status_ = rawValue; } break; } @@ -16702,10 +16648,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -16723,24 +16670,9 @@ public final class BatchReport { org.sonar.batch.protocol.output.BatchReport.Test.class, org.sonar.batch.protocol.output.BatchReport.Test.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Test parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Test(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; - private java.lang.Object name_; + private volatile java.lang.Object name_; /** * optional string name = 1; */ @@ -16782,7 +16714,7 @@ public final class BatchReport { } public static final int STATUS_FIELD_NUMBER = 2; - private org.sonar.batch.protocol.Constants.TestStatus status_; + private int status_; /** * optional .TestStatus status = 2; */ @@ -16793,7 +16725,8 @@ public final class BatchReport { * optional .TestStatus status = 2; */ public org.sonar.batch.protocol.Constants.TestStatus getStatus() { - return status_; + org.sonar.batch.protocol.Constants.TestStatus result = org.sonar.batch.protocol.Constants.TestStatus.valueOf(status_); + return result == null ? org.sonar.batch.protocol.Constants.TestStatus.OK : result; } public static final int DURATION_IN_MS_FIELD_NUMBER = 3; @@ -16812,7 +16745,7 @@ public final class BatchReport { } public static final int STACKTRACE_FIELD_NUMBER = 4; - private java.lang.Object stacktrace_; + private volatile java.lang.Object stacktrace_; /** * optional string stacktrace = 4; */ @@ -16854,7 +16787,7 @@ public final class BatchReport { } public static final int MSG_FIELD_NUMBER = 5; - private java.lang.Object msg_; + private volatile java.lang.Object msg_; /** * optional string msg = 5; */ @@ -16895,13 +16828,6 @@ public final class BatchReport { } } - private void initFields() { - name_ = ""; - status_ = org.sonar.batch.protocol.Constants.TestStatus.OK; - durationInMs_ = 0L; - stacktrace_ = ""; - msg_ = ""; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -16914,12 +16840,11 @@ public final class BatchReport { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(2, status_.getNumber()); + output.writeEnum(2, status_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeInt64(3, durationInMs_); @@ -16930,7 +16855,7 @@ public final class BatchReport { if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(5, getMsgBytes()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -16945,7 +16870,7 @@ public final class BatchReport { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, status_.getNumber()); + .computeEnumSize(2, status_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream @@ -16959,18 +16884,12 @@ public final class BatchReport { size += com.google.protobuf.CodedOutputStream .computeBytesSize(5, getMsgBytes()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.Test parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -17024,12 +16943,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Test prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -17070,15 +16994,11 @@ public final class BatchReport { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); name_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - status_ = org.sonar.batch.protocol.Constants.TestStatus.OK; + status_ = 1; bitField0_ = (bitField0_ & ~0x00000002); durationInMs_ = 0L; bitField0_ = (bitField0_ & ~0x00000004); @@ -17089,10 +17009,6 @@ public final class BatchReport { 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_Test_descriptor; @@ -17171,7 +17087,8 @@ public final class BatchReport { msg_ = other.msg_; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -17274,7 +17191,7 @@ public final class BatchReport { return this; } - private org.sonar.batch.protocol.Constants.TestStatus status_ = org.sonar.batch.protocol.Constants.TestStatus.OK; + private int status_ = 1; /** * optional .TestStatus status = 2; */ @@ -17285,7 +17202,8 @@ public final class BatchReport { * optional .TestStatus status = 2; */ public org.sonar.batch.protocol.Constants.TestStatus getStatus() { - return status_; + org.sonar.batch.protocol.Constants.TestStatus result = org.sonar.batch.protocol.Constants.TestStatus.valueOf(status_); + return result == null ? org.sonar.batch.protocol.Constants.TestStatus.OK : result; } /** * optional .TestStatus status = 2; @@ -17295,7 +17213,7 @@ public final class BatchReport { throw new NullPointerException(); } bitField0_ |= 0x00000002; - status_ = value; + status_ = value.getNumber(); onChanged(); return this; } @@ -17304,7 +17222,7 @@ public final class BatchReport { */ public Builder clearStatus() { bitField0_ = (bitField0_ & ~0x00000002); - status_ = org.sonar.batch.protocol.Constants.TestStatus.OK; + status_ = 1; onChanged(); return this; } @@ -17496,12 +17414,44 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:Test) } + // @@protoc_insertion_point(class_scope:Test) + private static final org.sonar.batch.protocol.output.BatchReport.Test DEFAULT_INSTANCE; static { - defaultInstance = new Test(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.Test(); + } + + public static org.sonar.batch.protocol.output.BatchReport.Test getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Test parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Test(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.Test getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:Test) } public interface CoverageDetailOrBuilder extends @@ -17549,37 +17499,28 @@ public final class BatchReport { /** * Protobuf type {@code CoverageDetail} */ - public static final class CoverageDetail extends + public static final class CoverageDetail extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:CoverageDetail) CoverageDetailOrBuilder { // Use CoverageDetail.newBuilder() to construct. - private CoverageDetail(com.google.protobuf.GeneratedMessage.Builder builder) { + private CoverageDetail(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private CoverageDetail(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final CoverageDetail defaultInstance; - public static CoverageDetail getDefaultInstance() { - return defaultInstance; } - - public CoverageDetail getDefaultInstanceForType() { - return defaultInstance; + private CoverageDetail() { + testName_ = ""; + coveredFile_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private CoverageDetail( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -17615,10 +17556,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { coveredFile_ = java.util.Collections.unmodifiableList(coveredFile_); @@ -17639,21 +17581,6 @@ public final class BatchReport { org.sonar.batch.protocol.output.BatchReport.CoverageDetail.class, org.sonar.batch.protocol.output.BatchReport.CoverageDetail.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public CoverageDetail parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CoverageDetail(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - public interface CoveredFileOrBuilder extends // @@protoc_insertion_point(interface_extends:CoverageDetail.CoveredFile) com.google.protobuf.MessageOrBuilder { @@ -17683,37 +17610,28 @@ public final class BatchReport { /** * Protobuf type {@code CoverageDetail.CoveredFile} */ - public static final class CoveredFile extends + public static final class CoveredFile extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:CoverageDetail.CoveredFile) CoveredFileOrBuilder { // Use CoveredFile.newBuilder() to construct. - private CoveredFile(com.google.protobuf.GeneratedMessage.Builder builder) { + private CoveredFile(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private CoveredFile(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final CoveredFile defaultInstance; - public static CoveredFile getDefaultInstance() { - return defaultInstance; } - - public CoveredFile getDefaultInstanceForType() { - return defaultInstance; + private CoveredFile() { + fileRef_ = 0; + coveredLine_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private CoveredFile( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -17761,10 +17679,11 @@ public final class BatchReport { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { coveredLine_ = java.util.Collections.unmodifiableList(coveredLine_); @@ -17785,21 +17704,6 @@ public final class BatchReport { org.sonar.batch.protocol.output.BatchReport.CoverageDetail.CoveredFile.class, org.sonar.batch.protocol.output.BatchReport.CoverageDetail.CoveredFile.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public CoveredFile parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CoveredFile(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int FILE_REF_FIELD_NUMBER = 1; private int fileRef_; @@ -17839,10 +17743,6 @@ public final class BatchReport { } private int coveredLineMemoizedSerializedSize = -1; - private void initFields() { - fileRef_ = 0; - coveredLine_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -17866,7 +17766,7 @@ public final class BatchReport { for (int i = 0; i < coveredLine_.size(); i++) { output.writeInt32NoTag(coveredLine_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -17893,18 +17793,12 @@ public final class BatchReport { } coveredLineMemoizedSerializedSize = dataSize; } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.CoverageDetail.CoveredFile parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -17958,12 +17852,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.CoverageDetail.CoveredFile prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -18004,10 +17903,6 @@ public final class BatchReport { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); fileRef_ = 0; @@ -18017,10 +17912,6 @@ public final class BatchReport { 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_CoverageDetail_CoveredFile_descriptor; @@ -18080,7 +17971,8 @@ public final class BatchReport { } onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -18208,17 +18100,49 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:CoverageDetail.CoveredFile) } + // @@protoc_insertion_point(class_scope:CoverageDetail.CoveredFile) + private static final org.sonar.batch.protocol.output.BatchReport.CoverageDetail.CoveredFile DEFAULT_INSTANCE; static { - defaultInstance = new CoveredFile(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.CoverageDetail.CoveredFile(); + } + + public static org.sonar.batch.protocol.output.BatchReport.CoverageDetail.CoveredFile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public CoveredFile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new CoveredFile(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.CoverageDetail.CoveredFile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:CoverageDetail.CoveredFile) } private int bitField0_; public static final int TEST_NAME_FIELD_NUMBER = 1; - private java.lang.Object testName_; + private volatile java.lang.Object testName_; /** * optional string test_name = 1; */ @@ -18294,10 +18218,6 @@ public final class BatchReport { return coveredFile_.get(index); } - private void initFields() { - testName_ = ""; - coveredFile_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -18310,14 +18230,13 @@ public final class BatchReport { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getTestNameBytes()); } for (int i = 0; i < coveredFile_.size(); i++) { output.writeMessage(2, coveredFile_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -18334,18 +18253,12 @@ public final class BatchReport { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, coveredFile_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.CoverageDetail parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -18399,12 +18312,17 @@ public final class BatchReport { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.CoverageDetail prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -18446,10 +18364,6 @@ public final class BatchReport { getCoveredFileFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); testName_ = ""; @@ -18463,10 +18377,6 @@ public final class BatchReport { 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_CoverageDetail_descriptor; @@ -18548,7 +18458,8 @@ public final class BatchReport { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -18894,110 +18805,142 @@ public final class BatchReport { // @@protoc_insertion_point(builder_scope:CoverageDetail) } + // @@protoc_insertion_point(class_scope:CoverageDetail) + private static final org.sonar.batch.protocol.output.BatchReport.CoverageDetail DEFAULT_INSTANCE; static { - defaultInstance = new CoverageDetail(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.batch.protocol.output.BatchReport.CoverageDetail(); + } + + public static org.sonar.batch.protocol.output.BatchReport.CoverageDetail getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public CoverageDetail parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new CoverageDetail(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.batch.protocol.output.BatchReport.CoverageDetail getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:CoverageDetail) } - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Metadata_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Metadata_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_ActiveRule_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_ActiveRule_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_ActiveRule_ActiveRuleParam_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_ActiveRule_ActiveRuleParam_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_ComponentLink_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_ComponentLink_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Component_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Component_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Measure_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Measure_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Issue_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Issue_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_IssueLocation_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_IssueLocation_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Flow_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Flow_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Changesets_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Changesets_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Changesets_Changeset_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Changesets_Changeset_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Duplicate_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Duplicate_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Duplication_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Duplication_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_TextRange_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_TextRange_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Symbol_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Symbol_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Coverage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Coverage_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_SyntaxHighlighting_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_SyntaxHighlighting_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Test_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Test_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_CoverageDetail_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_CoverageDetail_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_CoverageDetail_CoveredFile_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable diff --git a/sonar-core/src/main/java/org/sonar/core/util/ProtobufJsonFormat.java b/sonar-core/src/main/java/org/sonar/core/util/ProtobufJsonFormat.java index 5c0cd07c7fb..7a0877aa2f5 100644 --- a/sonar-core/src/main/java/org/sonar/core/util/ProtobufJsonFormat.java +++ b/sonar-core/src/main/java/org/sonar/core/util/ProtobufJsonFormat.java @@ -23,6 +23,7 @@ import com.google.common.base.Preconditions; import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; import com.google.protobuf.Descriptors; +import com.google.protobuf.MapEntry; import com.google.protobuf.Message; import java.io.StringWriter; import java.util.ArrayList; @@ -81,19 +82,15 @@ public class ProtobufJsonFormat { this.descriptor = descriptor; } - public String getName() { - return descriptor.getName(); + public Descriptors.FieldDescriptor getDescriptor() { + return descriptor; } - public Descriptors.FieldDescriptor.JavaType getJavaType() { - return descriptor.getJavaType(); - } - - public abstract boolean isRepeated(); - public abstract boolean hasValue(Message message); - public abstract Object getValue(Message message); + public Object getValue(Message message) { + return message.getField(descriptor); + } } private static class MessageNonRepeatedField extends MessageField { @@ -102,20 +99,10 @@ public class ProtobufJsonFormat { Preconditions.checkArgument(!descriptor.isRepeated()); } - @Override - public boolean isRepeated() { - return false; - } - @Override public boolean hasValue(Message message) { return message.hasField(descriptor); } - - @Override - public Object getValue(Message message) { - return message.getField(descriptor); - } } private static class MessageRepeatedField extends MessageField { @@ -124,20 +111,10 @@ public class ProtobufJsonFormat { Preconditions.checkArgument(descriptor.isRepeated()); } - @Override - public boolean isRepeated() { - return true; - } - @Override public boolean hasValue(Message message) { return true; } - - @Override - public Object getValue(Message message) { - return message.getField(descriptor); - } } private static class MessageNullableRepeatedField extends MessageField { @@ -150,11 +127,6 @@ public class ProtobufJsonFormat { this.booleanDesc = booleanDesc; } - @Override - public boolean isRepeated() { - return true; - } - @Override public boolean hasValue(Message message) { if (((Collection) message.getField(descriptor)).isEmpty()) { @@ -162,11 +134,6 @@ public class ProtobufJsonFormat { } return true; } - - @Override - public Object getValue(Message message) { - return message.getField(descriptor); - } } static class MessageJsonDescriptor { @@ -236,22 +203,32 @@ public class ProtobufJsonFormat { MessageJsonDescriptor fields = MessageJsonDescriptor.of(message); for (MessageField field : fields.getFields()) { if (field.hasValue(message)) { - writer.name(field.getName()); - if (field.isRepeated()) { + writer.name(field.getDescriptor().getName()); + if (field.getDescriptor().isMapField()) { + writer.beginObject(); + for (Object o : (Collection) field.getValue(message)) { + MapEntry mapEntry = (MapEntry)o; + // Key fields are always double-quoted in json + writer.name(mapEntry.getKey().toString()); + Descriptors.FieldDescriptor valueDescriptor = mapEntry.getDescriptorForType().findFieldByName("value"); + writeFieldValue(valueDescriptor, mapEntry.getValue(), writer); + } + writer.endObject(); + } else if (field.getDescriptor().isRepeated()) { writer.beginArray(); for (Object o : (Collection) field.getValue(message)) { - writeFieldValue(field, o, writer); + writeFieldValue(field.getDescriptor(), o, writer); } writer.endArray(); } else { - writeFieldValue(field, field.getValue(message), writer); + writeFieldValue(field.getDescriptor(), field.getValue(message), writer); } } } } - private static void writeFieldValue(MessageField field, Object value, JsonWriter writer) { - switch (field.getJavaType()) { + private static void writeFieldValue(Descriptors.FieldDescriptor fieldDescriptor, Object value, JsonWriter writer) { + switch (fieldDescriptor.getJavaType()) { case INT: writer.value((Integer) value); break; @@ -276,7 +253,7 @@ public class ProtobufJsonFormat { writer.endObject(); break; default: - throw new IllegalStateException(String.format("JSON format does not support type '%s' of field '%s'", field.getJavaType(), field.getName())); + throw new IllegalStateException(String.format("JSON format does not support type '%s' of field '%s'", fieldDescriptor.getJavaType(), fieldDescriptor.getName())); } } } diff --git a/sonar-core/src/test/gen-java/org/sonar/core/test/Test.java b/sonar-core/src/test/gen-java/org/sonar/core/test/Test.java index c687af5b8b8..04d56a5bdc8 100644 --- a/sonar-core/src/test/gen-java/org/sonar/core/test/Test.java +++ b/sonar-core/src/test/gen-java/org/sonar/core/test/Test.java @@ -41,7 +41,9 @@ public final class Test { public static final int GREEN_VALUE = 2; - public final int getNumber() { return value; } + public final int getNumber() { + return value; + } public static FakeEnum valueOf(int value) { switch (value) { @@ -129,37 +131,28 @@ public final class Test { /** * Protobuf type {@code Fake} */ - public static final class Fake extends + public static final class Fake extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Fake) FakeOrBuilder { // Use Fake.newBuilder() to construct. - private Fake(com.google.protobuf.GeneratedMessage.Builder builder) { + private Fake(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Fake(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Fake defaultInstance; - public static Fake getDefaultInstance() { - return defaultInstance; } - - public Fake getDefaultInstanceForType() { - return defaultInstance; + private Fake() { + label_ = ""; + line_ = 0; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Fake( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -192,10 +185,11 @@ public final class Test { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -213,24 +207,9 @@ public final class Test { org.sonar.core.test.Test.Fake.class, org.sonar.core.test.Test.Fake.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Fake parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Fake(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int LABEL_FIELD_NUMBER = 1; - private java.lang.Object label_; + private volatile java.lang.Object label_; /** * optional string label = 1; */ @@ -286,10 +265,6 @@ public final class Test { return line_; } - private void initFields() { - label_ = ""; - line_ = 0; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -302,14 +277,13 @@ public final class Test { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getLabelBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeInt32(2, line_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -326,18 +300,12 @@ public final class Test { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, line_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.core.test.Test.Fake parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -391,12 +359,17 @@ public final class Test { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.core.test.Test.Fake prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -437,10 +410,6 @@ public final class Test { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); label_ = ""; @@ -450,10 +419,6 @@ public final class Test { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonar.core.test.Test.internal_static_Fake_descriptor; @@ -507,7 +472,8 @@ public final class Test { if (other.hasLine()) { setLine(other.getLine()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -645,16 +611,48 @@ public final class Test { // @@protoc_insertion_point(builder_scope:Fake) } + // @@protoc_insertion_point(class_scope:Fake) + private static final org.sonar.core.test.Test.Fake DEFAULT_INSTANCE; static { - defaultInstance = new Fake(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.core.test.Test.Fake(); + } + + public static org.sonar.core.test.Test.Fake getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Fake parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Fake(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.core.test.Test.Fake getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:Fake) } - public interface JsonTestOrBuilder extends - // @@protoc_insertion_point(interface_extends:JsonTest) + public interface PrimitiveTypeMsgOrBuilder extends + // @@protoc_insertion_point(interface_extends:PrimitiveTypeMsg) com.google.protobuf.MessageOrBuilder { /** @@ -726,71 +724,48 @@ public final class Test { com.google.protobuf.ByteString getBytesField(); /** - * optional .NestedJsonTest nested = 8; + * optional .NestedMsg nested = 8; */ boolean hasNested(); /** - * optional .NestedJsonTest nested = 8; - */ - org.sonar.core.test.Test.NestedJsonTest getNested(); - /** - * optional .NestedJsonTest nested = 8; - */ - org.sonar.core.test.Test.NestedJsonTestOrBuilder getNestedOrBuilder(); - - /** - * repeated string anArray = 9; - */ - com.google.protobuf.ProtocolStringList - getAnArrayList(); - /** - * repeated string anArray = 9; - */ - int getAnArrayCount(); - /** - * repeated string anArray = 9; + * optional .NestedMsg nested = 8; */ - java.lang.String getAnArray(int index); + org.sonar.core.test.Test.NestedMsg getNested(); /** - * repeated string anArray = 9; + * optional .NestedMsg nested = 8; */ - com.google.protobuf.ByteString - getAnArrayBytes(int index); + org.sonar.core.test.Test.NestedMsgOrBuilder getNestedOrBuilder(); } /** - * Protobuf type {@code JsonTest} + * Protobuf type {@code PrimitiveTypeMsg} */ - public static final class JsonTest extends + public static final class PrimitiveTypeMsg extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:JsonTest) - JsonTestOrBuilder { - // Use JsonTest.newBuilder() to construct. - private JsonTest(com.google.protobuf.GeneratedMessage.Builder builder) { + // @@protoc_insertion_point(message_implements:PrimitiveTypeMsg) + PrimitiveTypeMsgOrBuilder { + // Use PrimitiveTypeMsg.newBuilder() to construct. + private PrimitiveTypeMsg(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private JsonTest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final JsonTest defaultInstance; - public static JsonTest getDefaultInstance() { - return defaultInstance; - } - - public JsonTest getDefaultInstanceForType() { - return defaultInstance; + private PrimitiveTypeMsg() { + stringField_ = ""; + intField_ = 0; + longField_ = 0L; + doubleField_ = 0D; + booleanField_ = false; + enumField_ = 0; + bytesField_ = com.google.protobuf.ByteString.EMPTY; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } - private JsonTest( + private PrimitiveTypeMsg( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -842,7 +817,7 @@ public final class Test { unknownFields.mergeVarintField(6, rawValue); } else { bitField0_ |= 0x00000020; - enumField_ = value; + enumField_ = rawValue; } break; } @@ -852,11 +827,11 @@ public final class Test { break; } case 66: { - org.sonar.core.test.Test.NestedJsonTest.Builder subBuilder = null; + org.sonar.core.test.Test.NestedMsg.Builder subBuilder = null; if (((bitField0_ & 0x00000080) == 0x00000080)) { subBuilder = nested_.toBuilder(); } - nested_ = input.readMessage(org.sonar.core.test.Test.NestedJsonTest.PARSER, extensionRegistry); + nested_ = input.readMessage(org.sonar.core.test.Test.NestedMsg.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(nested_); nested_ = subBuilder.buildPartial(); @@ -864,60 +839,34 @@ public final class Test { bitField0_ |= 0x00000080; break; } - case 74: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { - anArray_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000100; - } - anArray_.add(bs); - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { - if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { - anArray_ = anArray_.getUnmodifiableView(); - } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.core.test.Test.internal_static_JsonTest_descriptor; + return org.sonar.core.test.Test.internal_static_PrimitiveTypeMsg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.core.test.Test.internal_static_JsonTest_fieldAccessorTable + return org.sonar.core.test.Test.internal_static_PrimitiveTypeMsg_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.core.test.Test.JsonTest.class, org.sonar.core.test.Test.JsonTest.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public JsonTest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new JsonTest(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + org.sonar.core.test.Test.PrimitiveTypeMsg.class, org.sonar.core.test.Test.PrimitiveTypeMsg.Builder.class); } private int bitField0_; public static final int STRINGFIELD_FIELD_NUMBER = 1; - private java.lang.Object stringField_; + private volatile java.lang.Object stringField_; /** * optional string stringField = 1; */ @@ -1019,7 +968,7 @@ public final class Test { } public static final int ENUMFIELD_FIELD_NUMBER = 6; - private org.sonar.core.test.Test.FakeEnum enumField_; + private int enumField_; /** * optional .FakeEnum enumField = 6; */ @@ -1030,7 +979,8 @@ public final class Test { * optional .FakeEnum enumField = 6; */ public org.sonar.core.test.Test.FakeEnum getEnumField() { - return enumField_; + org.sonar.core.test.Test.FakeEnum result = org.sonar.core.test.Test.FakeEnum.valueOf(enumField_); + return result == null ? org.sonar.core.test.Test.FakeEnum.BLUE : result; } public static final int BYTESFIELD_FIELD_NUMBER = 7; @@ -1049,66 +999,26 @@ public final class Test { } public static final int NESTED_FIELD_NUMBER = 8; - private org.sonar.core.test.Test.NestedJsonTest nested_; + private org.sonar.core.test.Test.NestedMsg nested_; /** - * optional .NestedJsonTest nested = 8; + * optional .NestedMsg nested = 8; */ public boolean hasNested() { return ((bitField0_ & 0x00000080) == 0x00000080); } /** - * optional .NestedJsonTest nested = 8; - */ - public org.sonar.core.test.Test.NestedJsonTest getNested() { - return nested_; - } - /** - * optional .NestedJsonTest nested = 8; - */ - public org.sonar.core.test.Test.NestedJsonTestOrBuilder getNestedOrBuilder() { - return nested_; - } - - public static final int ANARRAY_FIELD_NUMBER = 9; - private com.google.protobuf.LazyStringList anArray_; - /** - * repeated string anArray = 9; - */ - public com.google.protobuf.ProtocolStringList - getAnArrayList() { - return anArray_; - } - /** - * repeated string anArray = 9; - */ - public int getAnArrayCount() { - return anArray_.size(); - } - /** - * repeated string anArray = 9; + * optional .NestedMsg nested = 8; */ - public java.lang.String getAnArray(int index) { - return anArray_.get(index); + public org.sonar.core.test.Test.NestedMsg getNested() { + return nested_ == null ? org.sonar.core.test.Test.NestedMsg.getDefaultInstance() : nested_; } /** - * repeated string anArray = 9; + * optional .NestedMsg nested = 8; */ - public com.google.protobuf.ByteString - getAnArrayBytes(int index) { - return anArray_.getByteString(index); + public org.sonar.core.test.Test.NestedMsgOrBuilder getNestedOrBuilder() { + return nested_ == null ? org.sonar.core.test.Test.NestedMsg.getDefaultInstance() : nested_; } - private void initFields() { - stringField_ = ""; - intField_ = 0; - longField_ = 0L; - doubleField_ = 0D; - booleanField_ = false; - enumField_ = org.sonar.core.test.Test.FakeEnum.BLUE; - bytesField_ = com.google.protobuf.ByteString.EMPTY; - nested_ = org.sonar.core.test.Test.NestedJsonTest.getDefaultInstance(); - anArray_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -1121,7 +1031,6 @@ public final class Test { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getStringFieldBytes()); } @@ -1138,18 +1047,15 @@ public final class Test { output.writeBool(5, booleanField_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeEnum(6, enumField_.getNumber()); + output.writeEnum(6, enumField_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeBytes(7, bytesField_); } if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeMessage(8, nested_); + output.writeMessage(8, getNested()); } - for (int i = 0; i < anArray_.size(); i++) { - output.writeBytes(9, anArray_.getByteString(i)); - } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -1180,7 +1086,7 @@ public final class Test { } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(6, enumField_.getNumber()); + .computeEnumSize(6, enumField_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { size += com.google.protobuf.CodedOutputStream @@ -1188,88 +1094,78 @@ public final class Test { } if (((bitField0_ & 0x00000080) == 0x00000080)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, nested_); - } - { - int dataSize = 0; - for (int i = 0; i < anArray_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(anArray_.getByteString(i)); - } - size += dataSize; - size += 1 * getAnArrayList().size(); + .computeMessageSize(8, getNested()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.core.test.Test.JsonTest parseFrom( + public static org.sonar.core.test.Test.PrimitiveTypeMsg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonar.core.test.Test.JsonTest parseFrom( + public static org.sonar.core.test.Test.PrimitiveTypeMsg 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.core.test.Test.JsonTest parseFrom(byte[] data) + public static org.sonar.core.test.Test.PrimitiveTypeMsg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonar.core.test.Test.JsonTest parseFrom( + public static org.sonar.core.test.Test.PrimitiveTypeMsg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonar.core.test.Test.JsonTest parseFrom(java.io.InputStream input) + public static org.sonar.core.test.Test.PrimitiveTypeMsg parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonar.core.test.Test.JsonTest parseFrom( + public static org.sonar.core.test.Test.PrimitiveTypeMsg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.sonar.core.test.Test.JsonTest parseDelimitedFrom(java.io.InputStream input) + public static org.sonar.core.test.Test.PrimitiveTypeMsg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static org.sonar.core.test.Test.JsonTest parseDelimitedFrom( + public static org.sonar.core.test.Test.PrimitiveTypeMsg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static org.sonar.core.test.Test.JsonTest parseFrom( + public static org.sonar.core.test.Test.PrimitiveTypeMsg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonar.core.test.Test.JsonTest parseFrom( + public static org.sonar.core.test.Test.PrimitiveTypeMsg 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.core.test.Test.JsonTest prototype) { - return newBuilder().mergeFrom(prototype); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.sonar.core.test.Test.PrimitiveTypeMsg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -1278,25 +1174,25 @@ public final class Test { return builder; } /** - * Protobuf type {@code JsonTest} + * Protobuf type {@code PrimitiveTypeMsg} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:JsonTest) - org.sonar.core.test.Test.JsonTestOrBuilder { + // @@protoc_insertion_point(builder_implements:PrimitiveTypeMsg) + org.sonar.core.test.Test.PrimitiveTypeMsgOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.core.test.Test.internal_static_JsonTest_descriptor; + return org.sonar.core.test.Test.internal_static_PrimitiveTypeMsg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.core.test.Test.internal_static_JsonTest_fieldAccessorTable + return org.sonar.core.test.Test.internal_static_PrimitiveTypeMsg_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.core.test.Test.JsonTest.class, org.sonar.core.test.Test.JsonTest.Builder.class); + org.sonar.core.test.Test.PrimitiveTypeMsg.class, org.sonar.core.test.Test.PrimitiveTypeMsg.Builder.class); } - // Construct using org.sonar.core.test.Test.JsonTest.newBuilder() + // Construct using org.sonar.core.test.Test.PrimitiveTypeMsg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -1311,10 +1207,6 @@ public final class Test { getNestedFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); stringField_ = ""; @@ -1327,44 +1219,38 @@ public final class Test { bitField0_ = (bitField0_ & ~0x00000008); booleanField_ = false; bitField0_ = (bitField0_ & ~0x00000010); - enumField_ = org.sonar.core.test.Test.FakeEnum.BLUE; + enumField_ = 0; bitField0_ = (bitField0_ & ~0x00000020); bytesField_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000040); if (nestedBuilder_ == null) { - nested_ = org.sonar.core.test.Test.NestedJsonTest.getDefaultInstance(); + nested_ = null; } else { nestedBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000080); - anArray_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000100); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return org.sonar.core.test.Test.internal_static_JsonTest_descriptor; + return org.sonar.core.test.Test.internal_static_PrimitiveTypeMsg_descriptor; } - public org.sonar.core.test.Test.JsonTest getDefaultInstanceForType() { - return org.sonar.core.test.Test.JsonTest.getDefaultInstance(); + public org.sonar.core.test.Test.PrimitiveTypeMsg getDefaultInstanceForType() { + return org.sonar.core.test.Test.PrimitiveTypeMsg.getDefaultInstance(); } - public org.sonar.core.test.Test.JsonTest build() { - org.sonar.core.test.Test.JsonTest result = buildPartial(); + public org.sonar.core.test.Test.PrimitiveTypeMsg build() { + org.sonar.core.test.Test.PrimitiveTypeMsg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public org.sonar.core.test.Test.JsonTest buildPartial() { - org.sonar.core.test.Test.JsonTest result = new org.sonar.core.test.Test.JsonTest(this); + public org.sonar.core.test.Test.PrimitiveTypeMsg buildPartial() { + org.sonar.core.test.Test.PrimitiveTypeMsg result = new org.sonar.core.test.Test.PrimitiveTypeMsg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -1403,27 +1289,22 @@ public final class Test { } else { result.nested_ = nestedBuilder_.build(); } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - anArray_ = anArray_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000100); - } - result.anArray_ = anArray_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonar.core.test.Test.JsonTest) { - return mergeFrom((org.sonar.core.test.Test.JsonTest)other); + if (other instanceof org.sonar.core.test.Test.PrimitiveTypeMsg) { + return mergeFrom((org.sonar.core.test.Test.PrimitiveTypeMsg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.sonar.core.test.Test.JsonTest other) { - if (other == org.sonar.core.test.Test.JsonTest.getDefaultInstance()) return this; + public Builder mergeFrom(org.sonar.core.test.Test.PrimitiveTypeMsg other) { + if (other == org.sonar.core.test.Test.PrimitiveTypeMsg.getDefaultInstance()) return this; if (other.hasStringField()) { bitField0_ |= 0x00000001; stringField_ = other.stringField_; @@ -1450,17 +1331,8 @@ public final class Test { if (other.hasNested()) { mergeNested(other.getNested()); } - if (!other.anArray_.isEmpty()) { - if (anArray_.isEmpty()) { - anArray_ = other.anArray_; - bitField0_ = (bitField0_ & ~0x00000100); - } else { - ensureAnArrayIsMutable(); - anArray_.addAll(other.anArray_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -1472,11 +1344,11 @@ public final class Test { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.sonar.core.test.Test.JsonTest parsedMessage = null; + org.sonar.core.test.Test.PrimitiveTypeMsg parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonar.core.test.Test.JsonTest) e.getUnfinishedMessage(); + parsedMessage = (org.sonar.core.test.Test.PrimitiveTypeMsg) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -1691,7 +1563,7 @@ public final class Test { return this; } - private org.sonar.core.test.Test.FakeEnum enumField_ = org.sonar.core.test.Test.FakeEnum.BLUE; + private int enumField_ = 0; /** * optional .FakeEnum enumField = 6; */ @@ -1702,7 +1574,8 @@ public final class Test { * optional .FakeEnum enumField = 6; */ public org.sonar.core.test.Test.FakeEnum getEnumField() { - return enumField_; + org.sonar.core.test.Test.FakeEnum result = org.sonar.core.test.Test.FakeEnum.valueOf(enumField_); + return result == null ? org.sonar.core.test.Test.FakeEnum.BLUE : result; } /** * optional .FakeEnum enumField = 6; @@ -1712,7 +1585,7 @@ public final class Test { throw new NullPointerException(); } bitField0_ |= 0x00000020; - enumField_ = value; + enumField_ = value.getNumber(); onChanged(); return this; } @@ -1721,7 +1594,7 @@ public final class Test { */ public Builder clearEnumField() { bitField0_ = (bitField0_ & ~0x00000020); - enumField_ = org.sonar.core.test.Test.FakeEnum.BLUE; + enumField_ = 0; onChanged(); return this; } @@ -1761,29 +1634,29 @@ public final class Test { return this; } - private org.sonar.core.test.Test.NestedJsonTest nested_ = org.sonar.core.test.Test.NestedJsonTest.getDefaultInstance(); + private org.sonar.core.test.Test.NestedMsg nested_ = null; private com.google.protobuf.SingleFieldBuilder< - org.sonar.core.test.Test.NestedJsonTest, org.sonar.core.test.Test.NestedJsonTest.Builder, org.sonar.core.test.Test.NestedJsonTestOrBuilder> nestedBuilder_; + org.sonar.core.test.Test.NestedMsg, org.sonar.core.test.Test.NestedMsg.Builder, org.sonar.core.test.Test.NestedMsgOrBuilder> nestedBuilder_; /** - * optional .NestedJsonTest nested = 8; + * optional .NestedMsg nested = 8; */ public boolean hasNested() { return ((bitField0_ & 0x00000080) == 0x00000080); } /** - * optional .NestedJsonTest nested = 8; + * optional .NestedMsg nested = 8; */ - public org.sonar.core.test.Test.NestedJsonTest getNested() { + public org.sonar.core.test.Test.NestedMsg getNested() { if (nestedBuilder_ == null) { - return nested_; + return nested_ == null ? org.sonar.core.test.Test.NestedMsg.getDefaultInstance() : nested_; } else { return nestedBuilder_.getMessage(); } } /** - * optional .NestedJsonTest nested = 8; + * optional .NestedMsg nested = 8; */ - public Builder setNested(org.sonar.core.test.Test.NestedJsonTest value) { + public Builder setNested(org.sonar.core.test.Test.NestedMsg value) { if (nestedBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -1797,10 +1670,10 @@ public final class Test { return this; } /** - * optional .NestedJsonTest nested = 8; + * optional .NestedMsg nested = 8; */ public Builder setNested( - org.sonar.core.test.Test.NestedJsonTest.Builder builderForValue) { + org.sonar.core.test.Test.NestedMsg.Builder builderForValue) { if (nestedBuilder_ == null) { nested_ = builderForValue.build(); onChanged(); @@ -1811,14 +1684,15 @@ public final class Test { return this; } /** - * optional .NestedJsonTest nested = 8; + * optional .NestedMsg nested = 8; */ - public Builder mergeNested(org.sonar.core.test.Test.NestedJsonTest value) { + public Builder mergeNested(org.sonar.core.test.Test.NestedMsg value) { if (nestedBuilder_ == null) { if (((bitField0_ & 0x00000080) == 0x00000080) && - nested_ != org.sonar.core.test.Test.NestedJsonTest.getDefaultInstance()) { + nested_ != null && + nested_ != org.sonar.core.test.Test.NestedMsg.getDefaultInstance()) { nested_ = - org.sonar.core.test.Test.NestedJsonTest.newBuilder(nested_).mergeFrom(value).buildPartial(); + org.sonar.core.test.Test.NestedMsg.newBuilder(nested_).mergeFrom(value).buildPartial(); } else { nested_ = value; } @@ -1830,11 +1704,11 @@ public final class Test { return this; } /** - * optional .NestedJsonTest nested = 8; + * optional .NestedMsg nested = 8; */ public Builder clearNested() { if (nestedBuilder_ == null) { - nested_ = org.sonar.core.test.Test.NestedJsonTest.getDefaultInstance(); + nested_ = null; onChanged(); } else { nestedBuilder_.clear(); @@ -1843,32 +1717,33 @@ public final class Test { return this; } /** - * optional .NestedJsonTest nested = 8; + * optional .NestedMsg nested = 8; */ - public org.sonar.core.test.Test.NestedJsonTest.Builder getNestedBuilder() { + public org.sonar.core.test.Test.NestedMsg.Builder getNestedBuilder() { bitField0_ |= 0x00000080; onChanged(); return getNestedFieldBuilder().getBuilder(); } /** - * optional .NestedJsonTest nested = 8; + * optional .NestedMsg nested = 8; */ - public org.sonar.core.test.Test.NestedJsonTestOrBuilder getNestedOrBuilder() { + public org.sonar.core.test.Test.NestedMsgOrBuilder getNestedOrBuilder() { if (nestedBuilder_ != null) { return nestedBuilder_.getMessageOrBuilder(); } else { - return nested_; + return nested_ == null ? + org.sonar.core.test.Test.NestedMsg.getDefaultInstance() : nested_; } } /** - * optional .NestedJsonTest nested = 8; + * optional .NestedMsg nested = 8; */ private com.google.protobuf.SingleFieldBuilder< - org.sonar.core.test.Test.NestedJsonTest, org.sonar.core.test.Test.NestedJsonTest.Builder, org.sonar.core.test.Test.NestedJsonTestOrBuilder> + org.sonar.core.test.Test.NestedMsg, org.sonar.core.test.Test.NestedMsg.Builder, org.sonar.core.test.Test.NestedMsgOrBuilder> getNestedFieldBuilder() { if (nestedBuilder_ == null) { nestedBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.sonar.core.test.Test.NestedJsonTest, org.sonar.core.test.Test.NestedJsonTest.Builder, org.sonar.core.test.Test.NestedJsonTestOrBuilder>( + org.sonar.core.test.Test.NestedMsg, org.sonar.core.test.Test.NestedMsg.Builder, org.sonar.core.test.Test.NestedMsgOrBuilder>( getNested(), getParentForChildren(), isClean()); @@ -1877,186 +1752,161 @@ public final class Test { return nestedBuilder_; } - private com.google.protobuf.LazyStringList anArray_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAnArrayIsMutable() { - if (!((bitField0_ & 0x00000100) == 0x00000100)) { - anArray_ = new com.google.protobuf.LazyStringArrayList(anArray_); - bitField0_ |= 0x00000100; - } - } - /** - * repeated string anArray = 9; - */ - public com.google.protobuf.ProtocolStringList - getAnArrayList() { - return anArray_.getUnmodifiableView(); - } - /** - * repeated string anArray = 9; - */ - public int getAnArrayCount() { - return anArray_.size(); - } - /** - * repeated string anArray = 9; - */ - public java.lang.String getAnArray(int index) { - return anArray_.get(index); - } - /** - * repeated string anArray = 9; - */ - public com.google.protobuf.ByteString - getAnArrayBytes(int index) { - return anArray_.getByteString(index); - } - /** - * repeated string anArray = 9; - */ - public Builder setAnArray( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnArrayIsMutable(); - anArray_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string anArray = 9; - */ - public Builder addAnArray( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnArrayIsMutable(); - anArray_.add(value); - onChanged(); - return this; - } - /** - * repeated string anArray = 9; - */ - public Builder addAllAnArray( - java.lang.Iterable values) { - ensureAnArrayIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, anArray_); - onChanged(); - return this; - } - /** - * repeated string anArray = 9; - */ - public Builder clearAnArray() { - anArray_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - /** - * repeated string anArray = 9; - */ - public Builder addAnArrayBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnArrayIsMutable(); - anArray_.add(value); - onChanged(); - return this; + // @@protoc_insertion_point(builder_scope:PrimitiveTypeMsg) + } + + // @@protoc_insertion_point(class_scope:PrimitiveTypeMsg) + private static final org.sonar.core.test.Test.PrimitiveTypeMsg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.sonar.core.test.Test.PrimitiveTypeMsg(); + } + + public static org.sonar.core.test.Test.PrimitiveTypeMsg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public PrimitiveTypeMsg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new PrimitiveTypeMsg(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } } + }; - // @@protoc_insertion_point(builder_scope:JsonTest) + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - static { - defaultInstance = new JsonTest(true); - defaultInstance.initFields(); + public org.sonar.core.test.Test.PrimitiveTypeMsg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:JsonTest) } - public interface JsonArrayTestOrBuilder extends - // @@protoc_insertion_point(interface_extends:JsonArrayTest) + public interface ArrayFieldMsgOrBuilder extends + // @@protoc_insertion_point(interface_extends:ArrayFieldMsg) com.google.protobuf.MessageOrBuilder { /** - * optional bool aNullableArrayPresentIfEmpty = 1; + * repeated string strings = 1; + */ + com.google.protobuf.ProtocolStringList + getStringsList(); + /** + * repeated string strings = 1; + */ + int getStringsCount(); + /** + * repeated string strings = 1; + */ + java.lang.String getStrings(int index); + /** + * repeated string strings = 1; + */ + com.google.protobuf.ByteString + getStringsBytes(int index); + + /** + * repeated .NestedMsg nesteds = 2; + */ + java.util.List + getNestedsList(); + /** + * repeated .NestedMsg nesteds = 2; + */ + org.sonar.core.test.Test.NestedMsg getNesteds(int index); + /** + * repeated .NestedMsg nesteds = 2; + */ + int getNestedsCount(); + /** + * repeated .NestedMsg nesteds = 2; + */ + java.util.List + getNestedsOrBuilderList(); + /** + * repeated .NestedMsg nesteds = 2; + */ + org.sonar.core.test.Test.NestedMsgOrBuilder getNestedsOrBuilder( + int index); + + /** + * optional bool nullableArrayPresentIfEmpty = 3; * *
      * naming convention. A boolean field is used
-     * to know if the array field is present.
+     * to know if the repeated field is present.
      * 
*/ - boolean hasANullableArrayPresentIfEmpty(); + boolean hasNullableArrayPresentIfEmpty(); /** - * optional bool aNullableArrayPresentIfEmpty = 1; + * optional bool nullableArrayPresentIfEmpty = 3; * *
      * naming convention. A boolean field is used
-     * to know if the array field is present.
+     * to know if the repeated field is present.
      * 
*/ - boolean getANullableArrayPresentIfEmpty(); + boolean getNullableArrayPresentIfEmpty(); /** - * repeated string aNullableArray = 2; + * repeated string nullableArray = 4; */ com.google.protobuf.ProtocolStringList - getANullableArrayList(); + getNullableArrayList(); /** - * repeated string aNullableArray = 2; + * repeated string nullableArray = 4; */ - int getANullableArrayCount(); + int getNullableArrayCount(); /** - * repeated string aNullableArray = 2; + * repeated string nullableArray = 4; */ - java.lang.String getANullableArray(int index); + java.lang.String getNullableArray(int index); /** - * repeated string aNullableArray = 2; + * repeated string nullableArray = 4; */ com.google.protobuf.ByteString - getANullableArrayBytes(int index); + getNullableArrayBytes(int index); } /** - * Protobuf type {@code JsonArrayTest} + * Protobuf type {@code ArrayFieldMsg} */ - public static final class JsonArrayTest extends + public static final class ArrayFieldMsg extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:JsonArrayTest) - JsonArrayTestOrBuilder { - // Use JsonArrayTest.newBuilder() to construct. - private JsonArrayTest(com.google.protobuf.GeneratedMessage.Builder builder) { + // @@protoc_insertion_point(message_implements:ArrayFieldMsg) + ArrayFieldMsgOrBuilder { + // Use ArrayFieldMsg.newBuilder() to construct. + private ArrayFieldMsg(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private JsonArrayTest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final JsonArrayTest defaultInstance; - public static JsonArrayTest getDefaultInstance() { - return defaultInstance; } - - public JsonArrayTest getDefaultInstanceForType() { - return defaultInstance; + private ArrayFieldMsg() { + strings_ = com.google.protobuf.LazyStringArrayList.EMPTY; + nesteds_ = java.util.Collections.emptyList(); + nullableArrayPresentIfEmpty_ = false; + nullableArray_ = com.google.protobuf.LazyStringArrayList.EMPTY; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } - private JsonArrayTest( + private ArrayFieldMsg( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -2075,30 +1925,54 @@ public final class Test { } break; } - case 8: { - bitField0_ |= 0x00000001; - aNullableArrayPresentIfEmpty_ = input.readBool(); + case 10: { + com.google.protobuf.ByteString bs = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + strings_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + strings_.add(bs); break; } case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - aNullableArray_ = new com.google.protobuf.LazyStringArrayList(); + nesteds_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } - aNullableArray_.add(bs); + nesteds_.add(input.readMessage(org.sonar.core.test.Test.NestedMsg.PARSER, extensionRegistry)); + break; + } + case 24: { + bitField0_ |= 0x00000001; + nullableArrayPresentIfEmpty_ = input.readBool(); + break; + } + case 34: { + com.google.protobuf.ByteString bs = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + nullableArray_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + nullableArray_.add(bs); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + strings_ = strings_.getUnmodifiableView(); + } if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - aNullableArray_ = aNullableArray_.getUnmodifiableView(); + nesteds_ = java.util.Collections.unmodifiableList(nesteds_); + } + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + nullableArray_ = nullableArray_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -2106,90 +1980,135 @@ public final class Test { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.core.test.Test.internal_static_JsonArrayTest_descriptor; + return org.sonar.core.test.Test.internal_static_ArrayFieldMsg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.core.test.Test.internal_static_JsonArrayTest_fieldAccessorTable + return org.sonar.core.test.Test.internal_static_ArrayFieldMsg_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.core.test.Test.JsonArrayTest.class, org.sonar.core.test.Test.JsonArrayTest.Builder.class); + org.sonar.core.test.Test.ArrayFieldMsg.class, org.sonar.core.test.Test.ArrayFieldMsg.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public JsonArrayTest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new JsonArrayTest(input, extensionRegistry); - } - }; + private int bitField0_; + public static final int STRINGS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList strings_; + /** + * repeated string strings = 1; + */ + public com.google.protobuf.ProtocolStringList + getStringsList() { + return strings_; + } + /** + * repeated string strings = 1; + */ + public int getStringsCount() { + return strings_.size(); + } + /** + * repeated string strings = 1; + */ + public java.lang.String getStrings(int index) { + return strings_.get(index); + } + /** + * repeated string strings = 1; + */ + public com.google.protobuf.ByteString + getStringsBytes(int index) { + return strings_.getByteString(index); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public static final int NESTEDS_FIELD_NUMBER = 2; + private java.util.List nesteds_; + /** + * repeated .NestedMsg nesteds = 2; + */ + public java.util.List getNestedsList() { + return nesteds_; + } + /** + * repeated .NestedMsg nesteds = 2; + */ + public java.util.List + getNestedsOrBuilderList() { + return nesteds_; + } + /** + * repeated .NestedMsg nesteds = 2; + */ + public int getNestedsCount() { + return nesteds_.size(); + } + /** + * repeated .NestedMsg nesteds = 2; + */ + public org.sonar.core.test.Test.NestedMsg getNesteds(int index) { + return nesteds_.get(index); + } + /** + * repeated .NestedMsg nesteds = 2; + */ + public org.sonar.core.test.Test.NestedMsgOrBuilder getNestedsOrBuilder( + int index) { + return nesteds_.get(index); } - private int bitField0_; - public static final int ANULLABLEARRAYPRESENTIFEMPTY_FIELD_NUMBER = 1; - private boolean aNullableArrayPresentIfEmpty_; + public static final int NULLABLEARRAYPRESENTIFEMPTY_FIELD_NUMBER = 3; + private boolean nullableArrayPresentIfEmpty_; /** - * optional bool aNullableArrayPresentIfEmpty = 1; + * optional bool nullableArrayPresentIfEmpty = 3; * *
      * naming convention. A boolean field is used
-     * to know if the array field is present.
+     * to know if the repeated field is present.
      * 
*/ - public boolean hasANullableArrayPresentIfEmpty() { + public boolean hasNullableArrayPresentIfEmpty() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional bool aNullableArrayPresentIfEmpty = 1; + * optional bool nullableArrayPresentIfEmpty = 3; * *
      * naming convention. A boolean field is used
-     * to know if the array field is present.
+     * to know if the repeated field is present.
      * 
*/ - public boolean getANullableArrayPresentIfEmpty() { - return aNullableArrayPresentIfEmpty_; + public boolean getNullableArrayPresentIfEmpty() { + return nullableArrayPresentIfEmpty_; } - public static final int ANULLABLEARRAY_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList aNullableArray_; + public static final int NULLABLEARRAY_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList nullableArray_; /** - * repeated string aNullableArray = 2; + * repeated string nullableArray = 4; */ public com.google.protobuf.ProtocolStringList - getANullableArrayList() { - return aNullableArray_; + getNullableArrayList() { + return nullableArray_; } /** - * repeated string aNullableArray = 2; + * repeated string nullableArray = 4; */ - public int getANullableArrayCount() { - return aNullableArray_.size(); + public int getNullableArrayCount() { + return nullableArray_.size(); } /** - * repeated string aNullableArray = 2; + * repeated string nullableArray = 4; */ - public java.lang.String getANullableArray(int index) { - return aNullableArray_.get(index); + public java.lang.String getNullableArray(int index) { + return nullableArray_.get(index); } /** - * repeated string aNullableArray = 2; + * repeated string nullableArray = 4; */ public com.google.protobuf.ByteString - getANullableArrayBytes(int index) { - return aNullableArray_.getByteString(index); + getNullableArrayBytes(int index) { + return nullableArray_.getByteString(index); } - private void initFields() { - aNullableArrayPresentIfEmpty_ = false; - aNullableArray_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -2202,14 +2121,19 @@ public final class Test { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); + for (int i = 0; i < strings_.size(); i++) { + output.writeBytes(1, strings_.getByteString(i)); + } + for (int i = 0; i < nesteds_.size(); i++) { + output.writeMessage(2, nesteds_.get(i)); + } if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBool(1, aNullableArrayPresentIfEmpty_); + output.writeBool(3, nullableArrayPresentIfEmpty_); } - for (int i = 0; i < aNullableArray_.size(); i++) { - output.writeBytes(2, aNullableArray_.getByteString(i)); + for (int i = 0; i < nullableArray_.size(); i++) { + output.writeBytes(4, nullableArray_.getByteString(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -2218,90 +2142,102 @@ public final class Test { if (size != -1) return size; size = 0; + { + int dataSize = 0; + for (int i = 0; i < strings_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(strings_.getByteString(i)); + } + size += dataSize; + size += 1 * getStringsList().size(); + } + for (int i = 0; i < nesteds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, nesteds_.get(i)); + } if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, aNullableArrayPresentIfEmpty_); + .computeBoolSize(3, nullableArrayPresentIfEmpty_); } { int dataSize = 0; - for (int i = 0; i < aNullableArray_.size(); i++) { + for (int i = 0; i < nullableArray_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(aNullableArray_.getByteString(i)); + .computeBytesSizeNoTag(nullableArray_.getByteString(i)); } size += dataSize; - size += 1 * getANullableArrayList().size(); + size += 1 * getNullableArrayList().size(); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.core.test.Test.JsonArrayTest parseFrom( + public static org.sonar.core.test.Test.ArrayFieldMsg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonar.core.test.Test.JsonArrayTest parseFrom( + public static org.sonar.core.test.Test.ArrayFieldMsg 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.core.test.Test.JsonArrayTest parseFrom(byte[] data) + public static org.sonar.core.test.Test.ArrayFieldMsg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonar.core.test.Test.JsonArrayTest parseFrom( + public static org.sonar.core.test.Test.ArrayFieldMsg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonar.core.test.Test.JsonArrayTest parseFrom(java.io.InputStream input) + public static org.sonar.core.test.Test.ArrayFieldMsg parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonar.core.test.Test.JsonArrayTest parseFrom( + public static org.sonar.core.test.Test.ArrayFieldMsg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.sonar.core.test.Test.JsonArrayTest parseDelimitedFrom(java.io.InputStream input) + public static org.sonar.core.test.Test.ArrayFieldMsg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static org.sonar.core.test.Test.JsonArrayTest parseDelimitedFrom( + public static org.sonar.core.test.Test.ArrayFieldMsg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static org.sonar.core.test.Test.JsonArrayTest parseFrom( + public static org.sonar.core.test.Test.ArrayFieldMsg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonar.core.test.Test.JsonArrayTest parseFrom( + public static org.sonar.core.test.Test.ArrayFieldMsg 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.core.test.Test.JsonArrayTest prototype) { - return newBuilder().mergeFrom(prototype); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.sonar.core.test.Test.ArrayFieldMsg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -2310,25 +2246,25 @@ public final class Test { return builder; } /** - * Protobuf type {@code JsonArrayTest} + * Protobuf type {@code ArrayFieldMsg} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:JsonArrayTest) - org.sonar.core.test.Test.JsonArrayTestOrBuilder { + // @@protoc_insertion_point(builder_implements:ArrayFieldMsg) + org.sonar.core.test.Test.ArrayFieldMsgOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.core.test.Test.internal_static_JsonArrayTest_descriptor; + return org.sonar.core.test.Test.internal_static_ArrayFieldMsg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.core.test.Test.internal_static_JsonArrayTest_fieldAccessorTable + return org.sonar.core.test.Test.internal_static_ArrayFieldMsg_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.core.test.Test.JsonArrayTest.class, org.sonar.core.test.Test.JsonArrayTest.Builder.class); + org.sonar.core.test.Test.ArrayFieldMsg.class, org.sonar.core.test.Test.ArrayFieldMsg.Builder.class); } - // Construct using org.sonar.core.test.Test.JsonArrayTest.newBuilder() + // Construct using org.sonar.core.test.Test.ArrayFieldMsg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -2340,85 +2276,137 @@ public final class Test { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getNestedsFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); - aNullableArrayPresentIfEmpty_ = false; + strings_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); - aNullableArray_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); + if (nestedsBuilder_ == null) { + nesteds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + nestedsBuilder_.clear(); + } + nullableArrayPresentIfEmpty_ = false; + bitField0_ = (bitField0_ & ~0x00000004); + nullableArray_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return org.sonar.core.test.Test.internal_static_JsonArrayTest_descriptor; + return org.sonar.core.test.Test.internal_static_ArrayFieldMsg_descriptor; } - public org.sonar.core.test.Test.JsonArrayTest getDefaultInstanceForType() { - return org.sonar.core.test.Test.JsonArrayTest.getDefaultInstance(); + public org.sonar.core.test.Test.ArrayFieldMsg getDefaultInstanceForType() { + return org.sonar.core.test.Test.ArrayFieldMsg.getDefaultInstance(); } - public org.sonar.core.test.Test.JsonArrayTest build() { - org.sonar.core.test.Test.JsonArrayTest result = buildPartial(); + public org.sonar.core.test.Test.ArrayFieldMsg build() { + org.sonar.core.test.Test.ArrayFieldMsg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public org.sonar.core.test.Test.JsonArrayTest buildPartial() { - org.sonar.core.test.Test.JsonArrayTest result = new org.sonar.core.test.Test.JsonArrayTest(this); + public org.sonar.core.test.Test.ArrayFieldMsg buildPartial() { + org.sonar.core.test.Test.ArrayFieldMsg result = new org.sonar.core.test.Test.ArrayFieldMsg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + strings_ = strings_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.strings_ = strings_; + if (nestedsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + nesteds_ = java.util.Collections.unmodifiableList(nesteds_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.nesteds_ = nesteds_; + } else { + result.nesteds_ = nestedsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000001; } - result.aNullableArrayPresentIfEmpty_ = aNullableArrayPresentIfEmpty_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - aNullableArray_ = aNullableArray_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); + result.nullableArrayPresentIfEmpty_ = nullableArrayPresentIfEmpty_; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + nullableArray_ = nullableArray_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); } - result.aNullableArray_ = aNullableArray_; + result.nullableArray_ = nullableArray_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonar.core.test.Test.JsonArrayTest) { - return mergeFrom((org.sonar.core.test.Test.JsonArrayTest)other); + if (other instanceof org.sonar.core.test.Test.ArrayFieldMsg) { + return mergeFrom((org.sonar.core.test.Test.ArrayFieldMsg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.sonar.core.test.Test.JsonArrayTest other) { - if (other == org.sonar.core.test.Test.JsonArrayTest.getDefaultInstance()) return this; - if (other.hasANullableArrayPresentIfEmpty()) { - setANullableArrayPresentIfEmpty(other.getANullableArrayPresentIfEmpty()); + public Builder mergeFrom(org.sonar.core.test.Test.ArrayFieldMsg other) { + if (other == org.sonar.core.test.Test.ArrayFieldMsg.getDefaultInstance()) return this; + if (!other.strings_.isEmpty()) { + if (strings_.isEmpty()) { + strings_ = other.strings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureStringsIsMutable(); + strings_.addAll(other.strings_); + } + onChanged(); } - if (!other.aNullableArray_.isEmpty()) { - if (aNullableArray_.isEmpty()) { - aNullableArray_ = other.aNullableArray_; - bitField0_ = (bitField0_ & ~0x00000002); + if (nestedsBuilder_ == null) { + if (!other.nesteds_.isEmpty()) { + if (nesteds_.isEmpty()) { + nesteds_ = other.nesteds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureNestedsIsMutable(); + nesteds_.addAll(other.nesteds_); + } + onChanged(); + } + } else { + if (!other.nesteds_.isEmpty()) { + if (nestedsBuilder_.isEmpty()) { + nestedsBuilder_.dispose(); + nestedsBuilder_ = null; + nesteds_ = other.nesteds_; + bitField0_ = (bitField0_ & ~0x00000002); + nestedsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getNestedsFieldBuilder() : null; + } else { + nestedsBuilder_.addAllMessages(other.nesteds_); + } + } + } + if (other.hasNullableArrayPresentIfEmpty()) { + setNullableArrayPresentIfEmpty(other.getNullableArrayPresentIfEmpty()); + } + if (!other.nullableArray_.isEmpty()) { + if (nullableArray_.isEmpty()) { + nullableArray_ = other.nullableArray_; + bitField0_ = (bitField0_ & ~0x00000008); } else { - ensureANullableArrayIsMutable(); - aNullableArray_.addAll(other.aNullableArray_); + ensureNullableArrayIsMutable(); + nullableArray_.addAll(other.nullableArray_); } onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -2430,11 +2418,11 @@ public final class Test { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.sonar.core.test.Test.JsonArrayTest parsedMessage = null; + org.sonar.core.test.Test.ArrayFieldMsg parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonar.core.test.Test.JsonArrayTest) e.getUnfinishedMessage(); + parsedMessage = (org.sonar.core.test.Test.ArrayFieldMsg) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -2445,214 +2433,1054 @@ public final class Test { } private int bitField0_; - private boolean aNullableArrayPresentIfEmpty_ ; + private com.google.protobuf.LazyStringList strings_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureStringsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + strings_ = new com.google.protobuf.LazyStringArrayList(strings_); + bitField0_ |= 0x00000001; + } + } /** - * optional bool aNullableArrayPresentIfEmpty = 1; - * - *
-       * naming convention. A boolean field is used
-       * to know if the array field is present.
-       * 
+ * repeated string strings = 1; */ - public boolean hasANullableArrayPresentIfEmpty() { - return ((bitField0_ & 0x00000001) == 0x00000001); + public com.google.protobuf.ProtocolStringList + getStringsList() { + return strings_.getUnmodifiableView(); } /** - * optional bool aNullableArrayPresentIfEmpty = 1; - * - *
-       * naming convention. A boolean field is used
-       * to know if the array field is present.
-       * 
+ * repeated string strings = 1; */ - public boolean getANullableArrayPresentIfEmpty() { - return aNullableArrayPresentIfEmpty_; + public int getStringsCount() { + return strings_.size(); } /** - * optional bool aNullableArrayPresentIfEmpty = 1; - * - *
-       * naming convention. A boolean field is used
-       * to know if the array field is present.
-       * 
+ * repeated string strings = 1; + */ + public java.lang.String getStrings(int index) { + return strings_.get(index); + } + /** + * repeated string strings = 1; + */ + public com.google.protobuf.ByteString + getStringsBytes(int index) { + return strings_.getByteString(index); + } + /** + * repeated string strings = 1; */ - public Builder setANullableArrayPresentIfEmpty(boolean value) { - bitField0_ |= 0x00000001; - aNullableArrayPresentIfEmpty_ = value; + public Builder setStrings( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureStringsIsMutable(); + strings_.set(index, value); onChanged(); return this; } /** - * optional bool aNullableArrayPresentIfEmpty = 1; - * - *
-       * naming convention. A boolean field is used
-       * to know if the array field is present.
-       * 
+ * repeated string strings = 1; + */ + public Builder addStrings( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureStringsIsMutable(); + strings_.add(value); + onChanged(); + return this; + } + /** + * repeated string strings = 1; + */ + public Builder addAllStrings( + java.lang.Iterable values) { + ensureStringsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, strings_); + onChanged(); + return this; + } + /** + * repeated string strings = 1; */ - public Builder clearANullableArrayPresentIfEmpty() { + public Builder clearStrings() { + strings_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); - aNullableArrayPresentIfEmpty_ = false; + onChanged(); + return this; + } + /** + * repeated string strings = 1; + */ + public Builder addStringsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureStringsIsMutable(); + strings_.add(value); onChanged(); return this; } - private com.google.protobuf.LazyStringList aNullableArray_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureANullableArrayIsMutable() { + private java.util.List nesteds_ = + java.util.Collections.emptyList(); + private void ensureNestedsIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { - aNullableArray_ = new com.google.protobuf.LazyStringArrayList(aNullableArray_); + nesteds_ = new java.util.ArrayList(nesteds_); bitField0_ |= 0x00000002; } } + + private com.google.protobuf.RepeatedFieldBuilder< + org.sonar.core.test.Test.NestedMsg, org.sonar.core.test.Test.NestedMsg.Builder, org.sonar.core.test.Test.NestedMsgOrBuilder> nestedsBuilder_; + /** - * repeated string aNullableArray = 2; + * repeated .NestedMsg nesteds = 2; */ - public com.google.protobuf.ProtocolStringList - getANullableArrayList() { - return aNullableArray_.getUnmodifiableView(); + public java.util.List getNestedsList() { + if (nestedsBuilder_ == null) { + return java.util.Collections.unmodifiableList(nesteds_); + } else { + return nestedsBuilder_.getMessageList(); + } } /** - * repeated string aNullableArray = 2; + * repeated .NestedMsg nesteds = 2; */ - public int getANullableArrayCount() { - return aNullableArray_.size(); + public int getNestedsCount() { + if (nestedsBuilder_ == null) { + return nesteds_.size(); + } else { + return nestedsBuilder_.getCount(); + } } /** - * repeated string aNullableArray = 2; + * repeated .NestedMsg nesteds = 2; */ - public java.lang.String getANullableArray(int index) { - return aNullableArray_.get(index); + public org.sonar.core.test.Test.NestedMsg getNesteds(int index) { + if (nestedsBuilder_ == null) { + return nesteds_.get(index); + } else { + return nestedsBuilder_.getMessage(index); + } } /** - * repeated string aNullableArray = 2; + * repeated .NestedMsg nesteds = 2; */ - public com.google.protobuf.ByteString - getANullableArrayBytes(int index) { - return aNullableArray_.getByteString(index); + public Builder setNesteds( + int index, org.sonar.core.test.Test.NestedMsg value) { + if (nestedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNestedsIsMutable(); + nesteds_.set(index, value); + onChanged(); + } else { + nestedsBuilder_.setMessage(index, value); + } + return this; } /** - * repeated string aNullableArray = 2; + * repeated .NestedMsg nesteds = 2; */ - public Builder setANullableArray( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureANullableArrayIsMutable(); - aNullableArray_.set(index, value); - onChanged(); + public Builder setNesteds( + int index, org.sonar.core.test.Test.NestedMsg.Builder builderForValue) { + if (nestedsBuilder_ == null) { + ensureNestedsIsMutable(); + nesteds_.set(index, builderForValue.build()); + onChanged(); + } else { + nestedsBuilder_.setMessage(index, builderForValue.build()); + } return this; } /** - * repeated string aNullableArray = 2; + * repeated .NestedMsg nesteds = 2; */ - public Builder addANullableArray( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureANullableArrayIsMutable(); - aNullableArray_.add(value); - onChanged(); + public Builder addNesteds(org.sonar.core.test.Test.NestedMsg value) { + if (nestedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNestedsIsMutable(); + nesteds_.add(value); + onChanged(); + } else { + nestedsBuilder_.addMessage(value); + } return this; } /** - * repeated string aNullableArray = 2; + * repeated .NestedMsg nesteds = 2; */ - public Builder addAllANullableArray( - java.lang.Iterable values) { - ensureANullableArrayIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, aNullableArray_); + public Builder addNesteds( + int index, org.sonar.core.test.Test.NestedMsg value) { + if (nestedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNestedsIsMutable(); + nesteds_.add(index, value); + onChanged(); + } else { + nestedsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .NestedMsg nesteds = 2; + */ + public Builder addNesteds( + org.sonar.core.test.Test.NestedMsg.Builder builderForValue) { + if (nestedsBuilder_ == null) { + ensureNestedsIsMutable(); + nesteds_.add(builderForValue.build()); + onChanged(); + } else { + nestedsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .NestedMsg nesteds = 2; + */ + public Builder addNesteds( + int index, org.sonar.core.test.Test.NestedMsg.Builder builderForValue) { + if (nestedsBuilder_ == null) { + ensureNestedsIsMutable(); + nesteds_.add(index, builderForValue.build()); + onChanged(); + } else { + nestedsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .NestedMsg nesteds = 2; + */ + public Builder addAllNesteds( + java.lang.Iterable values) { + if (nestedsBuilder_ == null) { + ensureNestedsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, nesteds_); + onChanged(); + } else { + nestedsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .NestedMsg nesteds = 2; + */ + public Builder clearNesteds() { + if (nestedsBuilder_ == null) { + nesteds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + nestedsBuilder_.clear(); + } + return this; + } + /** + * repeated .NestedMsg nesteds = 2; + */ + public Builder removeNesteds(int index) { + if (nestedsBuilder_ == null) { + ensureNestedsIsMutable(); + nesteds_.remove(index); + onChanged(); + } else { + nestedsBuilder_.remove(index); + } + return this; + } + /** + * repeated .NestedMsg nesteds = 2; + */ + public org.sonar.core.test.Test.NestedMsg.Builder getNestedsBuilder( + int index) { + return getNestedsFieldBuilder().getBuilder(index); + } + /** + * repeated .NestedMsg nesteds = 2; + */ + public org.sonar.core.test.Test.NestedMsgOrBuilder getNestedsOrBuilder( + int index) { + if (nestedsBuilder_ == null) { + return nesteds_.get(index); } else { + return nestedsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .NestedMsg nesteds = 2; + */ + public java.util.List + getNestedsOrBuilderList() { + if (nestedsBuilder_ != null) { + return nestedsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nesteds_); + } + } + /** + * repeated .NestedMsg nesteds = 2; + */ + public org.sonar.core.test.Test.NestedMsg.Builder addNestedsBuilder() { + return getNestedsFieldBuilder().addBuilder( + org.sonar.core.test.Test.NestedMsg.getDefaultInstance()); + } + /** + * repeated .NestedMsg nesteds = 2; + */ + public org.sonar.core.test.Test.NestedMsg.Builder addNestedsBuilder( + int index) { + return getNestedsFieldBuilder().addBuilder( + index, org.sonar.core.test.Test.NestedMsg.getDefaultInstance()); + } + /** + * repeated .NestedMsg nesteds = 2; + */ + public java.util.List + getNestedsBuilderList() { + return getNestedsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.sonar.core.test.Test.NestedMsg, org.sonar.core.test.Test.NestedMsg.Builder, org.sonar.core.test.Test.NestedMsgOrBuilder> + getNestedsFieldBuilder() { + if (nestedsBuilder_ == null) { + nestedsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.sonar.core.test.Test.NestedMsg, org.sonar.core.test.Test.NestedMsg.Builder, org.sonar.core.test.Test.NestedMsgOrBuilder>( + nesteds_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + nesteds_ = null; + } + return nestedsBuilder_; + } + + private boolean nullableArrayPresentIfEmpty_ ; + /** + * optional bool nullableArrayPresentIfEmpty = 3; + * + *
+       * naming convention. A boolean field is used
+       * to know if the repeated field is present.
+       * 
+ */ + public boolean hasNullableArrayPresentIfEmpty() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool nullableArrayPresentIfEmpty = 3; + * + *
+       * naming convention. A boolean field is used
+       * to know if the repeated field is present.
+       * 
+ */ + public boolean getNullableArrayPresentIfEmpty() { + return nullableArrayPresentIfEmpty_; + } + /** + * optional bool nullableArrayPresentIfEmpty = 3; + * + *
+       * naming convention. A boolean field is used
+       * to know if the repeated field is present.
+       * 
+ */ + public Builder setNullableArrayPresentIfEmpty(boolean value) { + bitField0_ |= 0x00000004; + nullableArrayPresentIfEmpty_ = value; + onChanged(); + return this; + } + /** + * optional bool nullableArrayPresentIfEmpty = 3; + * + *
+       * naming convention. A boolean field is used
+       * to know if the repeated field is present.
+       * 
+ */ + public Builder clearNullableArrayPresentIfEmpty() { + bitField0_ = (bitField0_ & ~0x00000004); + nullableArrayPresentIfEmpty_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList nullableArray_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureNullableArrayIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + nullableArray_ = new com.google.protobuf.LazyStringArrayList(nullableArray_); + bitField0_ |= 0x00000008; + } + } + /** + * repeated string nullableArray = 4; + */ + public com.google.protobuf.ProtocolStringList + getNullableArrayList() { + return nullableArray_.getUnmodifiableView(); + } + /** + * repeated string nullableArray = 4; + */ + public int getNullableArrayCount() { + return nullableArray_.size(); + } + /** + * repeated string nullableArray = 4; + */ + public java.lang.String getNullableArray(int index) { + return nullableArray_.get(index); + } + /** + * repeated string nullableArray = 4; + */ + public com.google.protobuf.ByteString + getNullableArrayBytes(int index) { + return nullableArray_.getByteString(index); + } + /** + * repeated string nullableArray = 4; + */ + public Builder setNullableArray( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNullableArrayIsMutable(); + nullableArray_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string nullableArray = 4; + */ + public Builder addNullableArray( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNullableArrayIsMutable(); + nullableArray_.add(value); + onChanged(); + return this; + } + /** + * repeated string nullableArray = 4; + */ + public Builder addAllNullableArray( + java.lang.Iterable values) { + ensureNullableArrayIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, nullableArray_); + onChanged(); + return this; + } + /** + * repeated string nullableArray = 4; + */ + public Builder clearNullableArray() { + nullableArray_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * repeated string nullableArray = 4; + */ + public Builder addNullableArrayBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNullableArrayIsMutable(); + nullableArray_.add(value); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:ArrayFieldMsg) + } + + // @@protoc_insertion_point(class_scope:ArrayFieldMsg) + private static final org.sonar.core.test.Test.ArrayFieldMsg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.sonar.core.test.Test.ArrayFieldMsg(); + } + + public static org.sonar.core.test.Test.ArrayFieldMsg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ArrayFieldMsg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ArrayFieldMsg(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.core.test.Test.ArrayFieldMsg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface NestedMsgOrBuilder extends + // @@protoc_insertion_point(interface_extends:NestedMsg) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string label = 1; + */ + boolean hasLabel(); + /** + * optional string label = 1; + */ + java.lang.String getLabel(); + /** + * optional string label = 1; + */ + com.google.protobuf.ByteString + getLabelBytes(); + } + /** + * Protobuf type {@code NestedMsg} + */ + public static final class NestedMsg extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:NestedMsg) + NestedMsgOrBuilder { + // Use NestedMsg.newBuilder() to construct. + private NestedMsg(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private NestedMsg() { + label_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NestedMsg( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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 10: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + label_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + 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.core.test.Test.internal_static_NestedMsg_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonar.core.test.Test.internal_static_NestedMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonar.core.test.Test.NestedMsg.class, org.sonar.core.test.Test.NestedMsg.Builder.class); + } + + private int bitField0_; + public static final int LABEL_FIELD_NUMBER = 1; + private volatile java.lang.Object label_; + /** + * optional string label = 1; + */ + public boolean hasLabel() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string label = 1; + */ + public java.lang.String getLabel() { + java.lang.Object ref = label_; + 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()) { + label_ = s; + } + return s; + } + } + /** + * optional string label = 1; + */ + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getLabelBytes()); + } + unknownFields.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 + .computeBytesSize(1, getLabelBytes()); + } + size += unknownFields.getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static org.sonar.core.test.Test.NestedMsg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonar.core.test.Test.NestedMsg 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.core.test.Test.NestedMsg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonar.core.test.Test.NestedMsg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonar.core.test.Test.NestedMsg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonar.core.test.Test.NestedMsg parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.sonar.core.test.Test.NestedMsg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.sonar.core.test.Test.NestedMsg parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.sonar.core.test.Test.NestedMsg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonar.core.test.Test.NestedMsg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.sonar.core.test.Test.NestedMsg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code NestedMsg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:NestedMsg) + org.sonar.core.test.Test.NestedMsgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonar.core.test.Test.internal_static_NestedMsg_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonar.core.test.Test.internal_static_NestedMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonar.core.test.Test.NestedMsg.class, org.sonar.core.test.Test.NestedMsg.Builder.class); + } + + // Construct using org.sonar.core.test.Test.NestedMsg.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + label_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.sonar.core.test.Test.internal_static_NestedMsg_descriptor; + } + + public org.sonar.core.test.Test.NestedMsg getDefaultInstanceForType() { + return org.sonar.core.test.Test.NestedMsg.getDefaultInstance(); + } + + public org.sonar.core.test.Test.NestedMsg build() { + org.sonar.core.test.Test.NestedMsg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.sonar.core.test.Test.NestedMsg buildPartial() { + org.sonar.core.test.Test.NestedMsg result = new org.sonar.core.test.Test.NestedMsg(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.label_ = label_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.sonar.core.test.Test.NestedMsg) { + return mergeFrom((org.sonar.core.test.Test.NestedMsg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.sonar.core.test.Test.NestedMsg other) { + if (other == org.sonar.core.test.Test.NestedMsg.getDefaultInstance()) return this; + if (other.hasLabel()) { + bitField0_ |= 0x00000001; + label_ = other.label_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + 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.core.test.Test.NestedMsg parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.sonar.core.test.Test.NestedMsg) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object label_ = ""; + /** + * optional string label = 1; + */ + public boolean hasLabel() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string label = 1; + */ + public java.lang.String getLabel() { + java.lang.Object ref = label_; + 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()) { + label_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string label = 1; + */ + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string label = 1; + */ + public Builder setLabel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + label_ = value; onChanged(); return this; } /** - * repeated string aNullableArray = 2; + * optional string label = 1; */ - public Builder clearANullableArray() { - aNullableArray_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); + public Builder clearLabel() { + bitField0_ = (bitField0_ & ~0x00000001); + label_ = getDefaultInstance().getLabel(); onChanged(); return this; } /** - * repeated string aNullableArray = 2; + * optional string label = 1; */ - public Builder addANullableArrayBytes( + public Builder setLabelBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - ensureANullableArrayIsMutable(); - aNullableArray_.add(value); + bitField0_ |= 0x00000001; + label_ = value; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:JsonArrayTest) + // @@protoc_insertion_point(builder_scope:NestedMsg) } + // @@protoc_insertion_point(class_scope:NestedMsg) + private static final org.sonar.core.test.Test.NestedMsg DEFAULT_INSTANCE; static { - defaultInstance = new JsonArrayTest(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.core.test.Test.NestedMsg(); + } + + public static org.sonar.core.test.Test.NestedMsg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public NestedMsg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new NestedMsg(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.core.test.Test.NestedMsg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:JsonArrayTest) } - public interface NestedJsonTestOrBuilder extends - // @@protoc_insertion_point(interface_extends:NestedJsonTest) + public interface MapMsgOrBuilder extends + // @@protoc_insertion_point(interface_extends:MapMsg) com.google.protobuf.MessageOrBuilder { /** - * optional string label = 1; + * map<string, string> stringMap = 1; */ - boolean hasLabel(); + java.util.Map + getStringMap(); + /** - * optional string label = 1; + * map<string, .NestedMsg> nestedMap = 2; */ - java.lang.String getLabel(); + java.util.Map + getNestedMap(); + /** - * optional string label = 1; + * optional bool nullableStringMapPresentIfEmpty = 3; */ - com.google.protobuf.ByteString - getLabelBytes(); + boolean hasNullableStringMapPresentIfEmpty(); + /** + * optional bool nullableStringMapPresentIfEmpty = 3; + */ + boolean getNullableStringMapPresentIfEmpty(); + + /** + * map<string, string> nullableStringMap = 4; + */ + java.util.Map + getNullableStringMap(); } /** - * Protobuf type {@code NestedJsonTest} + * Protobuf type {@code MapMsg} */ - public static final class NestedJsonTest extends + public static final class MapMsg extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:NestedJsonTest) - NestedJsonTestOrBuilder { - // Use NestedJsonTest.newBuilder() to construct. - private NestedJsonTest(com.google.protobuf.GeneratedMessage.Builder builder) { + // @@protoc_insertion_point(message_implements:MapMsg) + MapMsgOrBuilder { + // Use MapMsg.newBuilder() to construct. + private MapMsg(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private NestedJsonTest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final NestedJsonTest defaultInstance; - public static NestedJsonTest getDefaultInstance() { - return defaultInstance; } - - public NestedJsonTest getDefaultInstanceForType() { - return defaultInstance; + private MapMsg() { + nullableStringMapPresentIfEmpty_ = false; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } - private NestedJsonTest( + private MapMsg( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -2672,18 +3500,54 @@ public final class Test { break; } case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + stringMap_ = com.google.protobuf.MapField.newMapField( + StringMapDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + stringMap = input.readMessage( + StringMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + stringMap_.getMutableMap().put(stringMap.getKey(), stringMap.getValue()); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + nestedMap_ = com.google.protobuf.MapField.newMapField( + NestedMapDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + nestedMap = input.readMessage( + NestedMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + nestedMap_.getMutableMap().put(nestedMap.getKey(), nestedMap.getValue()); + break; + } + case 24: { bitField0_ |= 0x00000001; - label_ = bs; + nullableStringMapPresentIfEmpty_ = input.readBool(); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + nullableStringMap_ = com.google.protobuf.MapField.newMapField( + NullableStringMapDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000008; + } + com.google.protobuf.MapEntry + nullableStringMap = input.readMessage( + NullableStringMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + nullableStringMap_.getMutableMap().put(nullableStringMap.getKey(), nullableStringMap.getValue()); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -2691,77 +3555,137 @@ public final class Test { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.core.test.Test.internal_static_NestedJsonTest_descriptor; + return org.sonar.core.test.Test.internal_static_MapMsg_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetStringMap(); + case 2: + return internalGetNestedMap(); + case 4: + return internalGetNullableStringMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.core.test.Test.internal_static_NestedJsonTest_fieldAccessorTable + return org.sonar.core.test.Test.internal_static_MapMsg_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.core.test.Test.NestedJsonTest.class, org.sonar.core.test.Test.NestedJsonTest.Builder.class); + org.sonar.core.test.Test.MapMsg.class, org.sonar.core.test.Test.MapMsg.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public NestedJsonTest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NestedJsonTest(input, extensionRegistry); - } - }; + private int bitField0_; + public static final int STRINGMAP_FIELD_NUMBER = 1; + private static final class StringMapDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.sonar.core.test.Test.internal_static_MapMsg_StringMapEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> stringMap_; + private com.google.protobuf.MapField + internalGetStringMap() { + if (stringMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + StringMapDefaultEntryHolder.defaultEntry); + } + return stringMap_; + } + /** + * map<string, string> stringMap = 1; + */ - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public java.util.Map getStringMap() { + return internalGetStringMap().getMap(); + } + + public static final int NESTEDMAP_FIELD_NUMBER = 2; + private static final class NestedMapDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, org.sonar.core.test.Test.NestedMsg> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.sonar.core.test.Test.internal_static_MapMsg_NestedMapEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.sonar.core.test.Test.NestedMsg.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, org.sonar.core.test.Test.NestedMsg> nestedMap_; + private com.google.protobuf.MapField + internalGetNestedMap() { + if (nestedMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + NestedMapDefaultEntryHolder.defaultEntry); + } + return nestedMap_; } + /** + * map<string, .NestedMsg> nestedMap = 2; + */ - private int bitField0_; - public static final int LABEL_FIELD_NUMBER = 1; - private java.lang.Object label_; + public java.util.Map getNestedMap() { + return internalGetNestedMap().getMap(); + } + + public static final int NULLABLESTRINGMAPPRESENTIFEMPTY_FIELD_NUMBER = 3; + private boolean nullableStringMapPresentIfEmpty_; /** - * optional string label = 1; + * optional bool nullableStringMapPresentIfEmpty = 3; */ - public boolean hasLabel() { + public boolean hasNullableStringMapPresentIfEmpty() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional string label = 1; + * optional bool nullableStringMapPresentIfEmpty = 3; */ - public java.lang.String getLabel() { - java.lang.Object ref = label_; - 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()) { - label_ = s; - } - return s; - } + public boolean getNullableStringMapPresentIfEmpty() { + return nullableStringMapPresentIfEmpty_; + } + + public static final int NULLABLESTRINGMAP_FIELD_NUMBER = 4; + private static final class NullableStringMapDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.sonar.core.test.Test.internal_static_MapMsg_NullableStringMapEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> nullableStringMap_; + private com.google.protobuf.MapField + internalGetNullableStringMap() { + if (nullableStringMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + NullableStringMapDefaultEntryHolder.defaultEntry); + } + return nullableStringMap_; } /** - * optional string label = 1; + * map<string, string> nullableStringMap = 4; */ - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - private void initFields() { - label_ = ""; + public java.util.Map getNullableStringMap() { + return internalGetNullableStringMap().getMap(); } + private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -2774,11 +3698,37 @@ public final class Test { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); + for (java.util.Map.Entry entry + : internalGetStringMap().getMap().entrySet()) { + com.google.protobuf.MapEntry + stringMap = StringMapDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + output.writeMessage(1, stringMap); + } + for (java.util.Map.Entry entry + : internalGetNestedMap().getMap().entrySet()) { + com.google.protobuf.MapEntry + nestedMap = NestedMapDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + output.writeMessage(2, nestedMap); + } if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getLabelBytes()); + output.writeBool(3, nullableStringMapPresentIfEmpty_); } - getUnknownFields().writeTo(output); + for (java.util.Map.Entry entry + : internalGetNullableStringMap().getMap().entrySet()) { + com.google.protobuf.MapEntry + nullableStringMap = NullableStringMapDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + output.writeMessage(4, nullableStringMap); + } + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -2787,81 +3737,110 @@ public final class Test { if (size != -1) return size; size = 0; + for (java.util.Map.Entry entry + : internalGetStringMap().getMap().entrySet()) { + com.google.protobuf.MapEntry + stringMap = StringMapDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, stringMap); + } + for (java.util.Map.Entry entry + : internalGetNestedMap().getMap().entrySet()) { + com.google.protobuf.MapEntry + nestedMap = NestedMapDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, nestedMap); + } if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getLabelBytes()); + .computeBoolSize(3, nullableStringMapPresentIfEmpty_); + } + for (java.util.Map.Entry entry + : internalGetNullableStringMap().getMap().entrySet()) { + com.google.protobuf.MapEntry + nullableStringMap = NullableStringMapDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, nullableStringMap); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.core.test.Test.NestedJsonTest parseFrom( + public static org.sonar.core.test.Test.MapMsg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonar.core.test.Test.NestedJsonTest parseFrom( + public static org.sonar.core.test.Test.MapMsg 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.core.test.Test.NestedJsonTest parseFrom(byte[] data) + public static org.sonar.core.test.Test.MapMsg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonar.core.test.Test.NestedJsonTest parseFrom( + public static org.sonar.core.test.Test.MapMsg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonar.core.test.Test.NestedJsonTest parseFrom(java.io.InputStream input) + public static org.sonar.core.test.Test.MapMsg parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonar.core.test.Test.NestedJsonTest parseFrom( + public static org.sonar.core.test.Test.MapMsg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.sonar.core.test.Test.NestedJsonTest parseDelimitedFrom(java.io.InputStream input) + public static org.sonar.core.test.Test.MapMsg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static org.sonar.core.test.Test.NestedJsonTest parseDelimitedFrom( + public static org.sonar.core.test.Test.MapMsg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static org.sonar.core.test.Test.NestedJsonTest parseFrom( + public static org.sonar.core.test.Test.MapMsg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonar.core.test.Test.NestedJsonTest parseFrom( + public static org.sonar.core.test.Test.MapMsg 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.core.test.Test.NestedJsonTest prototype) { - return newBuilder().mergeFrom(prototype); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.sonar.core.test.Test.MapMsg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -2870,25 +3849,55 @@ public final class Test { return builder; } /** - * Protobuf type {@code NestedJsonTest} + * Protobuf type {@code MapMsg} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:NestedJsonTest) - org.sonar.core.test.Test.NestedJsonTestOrBuilder { + // @@protoc_insertion_point(builder_implements:MapMsg) + org.sonar.core.test.Test.MapMsgOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.core.test.Test.internal_static_NestedJsonTest_descriptor; + return org.sonar.core.test.Test.internal_static_MapMsg_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetStringMap(); + case 2: + return internalGetNestedMap(); + case 4: + return internalGetNullableStringMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableStringMap(); + case 2: + return internalGetMutableNestedMap(); + case 4: + return internalGetMutableNullableStringMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.core.test.Test.internal_static_NestedJsonTest_fieldAccessorTable + return org.sonar.core.test.Test.internal_static_MapMsg_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.core.test.Test.NestedJsonTest.class, org.sonar.core.test.Test.NestedJsonTest.Builder.class); + org.sonar.core.test.Test.MapMsg.class, org.sonar.core.test.Test.MapMsg.Builder.class); } - // Construct using org.sonar.core.test.Test.NestedJsonTest.newBuilder() + // Construct using org.sonar.core.test.Test.MapMsg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -2902,68 +3911,74 @@ public final class Test { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); - label_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableStringMap().clear(); + internalGetMutableNestedMap().clear(); + nullableStringMapPresentIfEmpty_ = false; + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableNullableStringMap().clear(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return org.sonar.core.test.Test.internal_static_NestedJsonTest_descriptor; + return org.sonar.core.test.Test.internal_static_MapMsg_descriptor; } - public org.sonar.core.test.Test.NestedJsonTest getDefaultInstanceForType() { - return org.sonar.core.test.Test.NestedJsonTest.getDefaultInstance(); + public org.sonar.core.test.Test.MapMsg getDefaultInstanceForType() { + return org.sonar.core.test.Test.MapMsg.getDefaultInstance(); } - public org.sonar.core.test.Test.NestedJsonTest build() { - org.sonar.core.test.Test.NestedJsonTest result = buildPartial(); + public org.sonar.core.test.Test.MapMsg build() { + org.sonar.core.test.Test.MapMsg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public org.sonar.core.test.Test.NestedJsonTest buildPartial() { - org.sonar.core.test.Test.NestedJsonTest result = new org.sonar.core.test.Test.NestedJsonTest(this); + public org.sonar.core.test.Test.MapMsg buildPartial() { + org.sonar.core.test.Test.MapMsg result = new org.sonar.core.test.Test.MapMsg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + result.stringMap_ = internalGetStringMap(); + result.stringMap_.makeImmutable(); + result.nestedMap_ = internalGetNestedMap(); + result.nestedMap_.makeImmutable(); + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000001; } - result.label_ = label_; + result.nullableStringMapPresentIfEmpty_ = nullableStringMapPresentIfEmpty_; + result.nullableStringMap_ = internalGetNullableStringMap(); + result.nullableStringMap_.makeImmutable(); result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonar.core.test.Test.NestedJsonTest) { - return mergeFrom((org.sonar.core.test.Test.NestedJsonTest)other); + if (other instanceof org.sonar.core.test.Test.MapMsg) { + return mergeFrom((org.sonar.core.test.Test.MapMsg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.sonar.core.test.Test.NestedJsonTest other) { - if (other == org.sonar.core.test.Test.NestedJsonTest.getDefaultInstance()) return this; - if (other.hasLabel()) { - bitField0_ |= 0x00000001; - label_ = other.label_; - onChanged(); + public Builder mergeFrom(org.sonar.core.test.Test.MapMsg other) { + if (other == org.sonar.core.test.Test.MapMsg.getDefaultInstance()) return this; + internalGetMutableStringMap().mergeFrom( + other.internalGetStringMap()); + internalGetMutableNestedMap().mergeFrom( + other.internalGetNestedMap()); + if (other.hasNullableStringMapPresentIfEmpty()) { + setNullableStringMapPresentIfEmpty(other.getNullableStringMapPresentIfEmpty()); } - this.mergeUnknownFields(other.getUnknownFields()); + internalGetMutableNullableStringMap().mergeFrom( + other.internalGetNullableStringMap()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -2975,11 +3990,11 @@ public final class Test { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.sonar.core.test.Test.NestedJsonTest parsedMessage = null; + org.sonar.core.test.Test.MapMsg parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonar.core.test.Test.NestedJsonTest) e.getUnfinishedMessage(); + parsedMessage = (org.sonar.core.test.Test.MapMsg) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -2990,113 +4005,229 @@ public final class Test { } private int bitField0_; - private java.lang.Object label_ = ""; + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> stringMap_; + private com.google.protobuf.MapField + internalGetStringMap() { + if (stringMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + StringMapDefaultEntryHolder.defaultEntry); + } + return stringMap_; + } + private com.google.protobuf.MapField + internalGetMutableStringMap() { + onChanged();; + if (stringMap_ == null) { + stringMap_ = com.google.protobuf.MapField.newMapField( + StringMapDefaultEntryHolder.defaultEntry); + } + if (!stringMap_.isMutable()) { + stringMap_ = stringMap_.copy(); + } + return stringMap_; + } /** - * optional string label = 1; + * map<string, string> stringMap = 1; */ - public boolean hasLabel() { - return ((bitField0_ & 0x00000001) == 0x00000001); + public java.util.Map getStringMap() { + return internalGetStringMap().getMap(); } /** - * optional string label = 1; + * map<string, string> stringMap = 1; */ - public java.lang.String getLabel() { - java.lang.Object ref = label_; - 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()) { - label_ = s; - } - return s; - } else { - return (java.lang.String) ref; + public java.util.Map + getMutableStringMap() { + return internalGetMutableStringMap().getMutableMap(); + } + + private com.google.protobuf.MapField< + java.lang.String, org.sonar.core.test.Test.NestedMsg> nestedMap_; + private com.google.protobuf.MapField + internalGetNestedMap() { + if (nestedMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + NestedMapDefaultEntryHolder.defaultEntry); + } + return nestedMap_; + } + private com.google.protobuf.MapField + internalGetMutableNestedMap() { + onChanged();; + if (nestedMap_ == null) { + nestedMap_ = com.google.protobuf.MapField.newMapField( + NestedMapDefaultEntryHolder.defaultEntry); } + if (!nestedMap_.isMutable()) { + nestedMap_ = nestedMap_.copy(); + } + return nestedMap_; } /** - * optional string label = 1; + * map<string, .NestedMsg> nestedMap = 2; */ - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public java.util.Map getNestedMap() { + return internalGetNestedMap().getMap(); } /** - * optional string label = 1; + * map<string, .NestedMsg> nestedMap = 2; */ - public Builder setLabel( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - label_ = value; - onChanged(); - return this; + public java.util.Map + getMutableNestedMap() { + return internalGetMutableNestedMap().getMutableMap(); } + + private boolean nullableStringMapPresentIfEmpty_ ; /** - * optional string label = 1; + * optional bool nullableStringMapPresentIfEmpty = 3; */ - public Builder clearLabel() { - bitField0_ = (bitField0_ & ~0x00000001); - label_ = getDefaultInstance().getLabel(); + public boolean hasNullableStringMapPresentIfEmpty() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool nullableStringMapPresentIfEmpty = 3; + */ + public boolean getNullableStringMapPresentIfEmpty() { + return nullableStringMapPresentIfEmpty_; + } + /** + * optional bool nullableStringMapPresentIfEmpty = 3; + */ + public Builder setNullableStringMapPresentIfEmpty(boolean value) { + bitField0_ |= 0x00000004; + nullableStringMapPresentIfEmpty_ = value; onChanged(); return this; } /** - * optional string label = 1; + * optional bool nullableStringMapPresentIfEmpty = 3; */ - public Builder setLabelBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - label_ = value; + public Builder clearNullableStringMapPresentIfEmpty() { + bitField0_ = (bitField0_ & ~0x00000004); + nullableStringMapPresentIfEmpty_ = false; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:NestedJsonTest) + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> nullableStringMap_; + private com.google.protobuf.MapField + internalGetNullableStringMap() { + if (nullableStringMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + NullableStringMapDefaultEntryHolder.defaultEntry); + } + return nullableStringMap_; + } + private com.google.protobuf.MapField + internalGetMutableNullableStringMap() { + onChanged();; + if (nullableStringMap_ == null) { + nullableStringMap_ = com.google.protobuf.MapField.newMapField( + NullableStringMapDefaultEntryHolder.defaultEntry); + } + if (!nullableStringMap_.isMutable()) { + nullableStringMap_ = nullableStringMap_.copy(); + } + return nullableStringMap_; + } + /** + * map<string, string> nullableStringMap = 4; + */ + public java.util.Map getNullableStringMap() { + return internalGetNullableStringMap().getMap(); + } + /** + * map<string, string> nullableStringMap = 4; + */ + public java.util.Map + getMutableNullableStringMap() { + return internalGetMutableNullableStringMap().getMutableMap(); + } + + // @@protoc_insertion_point(builder_scope:MapMsg) } + // @@protoc_insertion_point(class_scope:MapMsg) + private static final org.sonar.core.test.Test.MapMsg DEFAULT_INSTANCE; static { - defaultInstance = new NestedJsonTest(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.core.test.Test.MapMsg(); + } + + public static org.sonar.core.test.Test.MapMsg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public MapMsg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new MapMsg(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.core.test.Test.MapMsg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:NestedJsonTest) } - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_Fake_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Fake_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_JsonTest_descriptor; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_PrimitiveTypeMsg_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_PrimitiveTypeMsg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_ArrayFieldMsg_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_ArrayFieldMsg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_NestedMsg_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_JsonTest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_JsonArrayTest_descriptor; + internal_static_NestedMsg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_MapMsg_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_JsonArrayTest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_NestedJsonTest_descriptor; + internal_static_MapMsg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_MapMsg_StringMapEntry_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_NestedJsonTest_fieldAccessorTable; + internal_static_MapMsg_StringMapEntry_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_MapMsg_NestedMapEntry_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_MapMsg_NestedMapEntry_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_MapMsg_NullableStringMapEntry_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_MapMsg_NullableStringMapEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -3107,17 +4238,26 @@ public final class Test { static { java.lang.String[] descriptorData = { "\n\ntest.proto\"#\n\004Fake\022\r\n\005label\030\001 \001(\t\022\014\n\004l" + - "ine\030\002 \001(\005\"\323\001\n\010JsonTest\022\023\n\013stringField\030\001 " + - "\001(\t\022\020\n\010intField\030\002 \001(\005\022\021\n\tlongField\030\003 \001(\003" + - "\022\023\n\013doubleField\030\004 \001(\001\022\024\n\014booleanField\030\005 " + - "\001(\010\022\034\n\tenumField\030\006 \001(\0162\t.FakeEnum\022\022\n\nbyt" + - "esField\030\007 \001(\014\022\037\n\006nested\030\010 \001(\0132\017.NestedJs" + - "onTest\022\017\n\007anArray\030\t \003(\t\"M\n\rJsonArrayTest" + - "\022$\n\034aNullableArrayPresentIfEmpty\030\001 \001(\010\022\026" + - "\n\016aNullableArray\030\002 \003(\t\"\037\n\016NestedJsonTest" + - "\022\r\n\005label\030\001 \001(\t*(\n\010FakeEnum\022\010\n\004BLUE\020\000\022\007\n", - "\003RED\020\001\022\t\n\005GREEN\020\002B\027\n\023org.sonar.core.test" + - "H\001" + "ine\030\002 \001(\005\"\305\001\n\020PrimitiveTypeMsg\022\023\n\013string" + + "Field\030\001 \001(\t\022\020\n\010intField\030\002 \001(\005\022\021\n\tlongFie" + + "ld\030\003 \001(\003\022\023\n\013doubleField\030\004 \001(\001\022\024\n\014boolean" + + "Field\030\005 \001(\010\022\034\n\tenumField\030\006 \001(\0162\t.FakeEnu" + + "m\022\022\n\nbytesField\030\007 \001(\014\022\032\n\006nested\030\010 \001(\0132\n." + + "NestedMsg\"y\n\rArrayFieldMsg\022\017\n\007strings\030\001 " + + "\003(\t\022\033\n\007nesteds\030\002 \003(\0132\n.NestedMsg\022#\n\033null" + + "ableArrayPresentIfEmpty\030\003 \001(\010\022\025\n\rnullabl" + + "eArray\030\004 \003(\t\"\032\n\tNestedMsg\022\r\n\005label\030\001 \001(\t", + "\"\354\002\n\006MapMsg\022)\n\tstringMap\030\001 \003(\0132\026.MapMsg." + + "StringMapEntry\022)\n\tnestedMap\030\002 \003(\0132\026.MapM" + + "sg.NestedMapEntry\022\'\n\037nullableStringMapPr" + + "esentIfEmpty\030\003 \001(\010\0229\n\021nullableStringMap\030" + + "\004 \003(\0132\036.MapMsg.NullableStringMapEntry\0320\n" + + "\016StringMapEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + + "\001(\t:\0028\001\032<\n\016NestedMapEntry\022\013\n\003key\030\001 \001(\t\022\031" + + "\n\005value\030\002 \001(\0132\n.NestedMsg:\0028\001\0328\n\026Nullabl" + + "eStringMapEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + + "\001(\t:\0028\001*(\n\010FakeEnum\022\010\n\004BLUE\020\000\022\007\n\003RED\020\001\022\t", + "\n\005GREEN\020\002B\027\n\023org.sonar.core.testH\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -3137,24 +4277,48 @@ public final class Test { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Fake_descriptor, new java.lang.String[] { "Label", "Line", }); - internal_static_JsonTest_descriptor = + internal_static_PrimitiveTypeMsg_descriptor = getDescriptor().getMessageTypes().get(1); - internal_static_JsonTest_fieldAccessorTable = new + internal_static_PrimitiveTypeMsg_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_JsonTest_descriptor, - new java.lang.String[] { "StringField", "IntField", "LongField", "DoubleField", "BooleanField", "EnumField", "BytesField", "Nested", "AnArray", }); - internal_static_JsonArrayTest_descriptor = + internal_static_PrimitiveTypeMsg_descriptor, + new java.lang.String[] { "StringField", "IntField", "LongField", "DoubleField", "BooleanField", "EnumField", "BytesField", "Nested", }); + internal_static_ArrayFieldMsg_descriptor = getDescriptor().getMessageTypes().get(2); - internal_static_JsonArrayTest_fieldAccessorTable = new + internal_static_ArrayFieldMsg_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_JsonArrayTest_descriptor, - new java.lang.String[] { "ANullableArrayPresentIfEmpty", "ANullableArray", }); - internal_static_NestedJsonTest_descriptor = + internal_static_ArrayFieldMsg_descriptor, + new java.lang.String[] { "Strings", "Nesteds", "NullableArrayPresentIfEmpty", "NullableArray", }); + internal_static_NestedMsg_descriptor = getDescriptor().getMessageTypes().get(3); - internal_static_NestedJsonTest_fieldAccessorTable = new + internal_static_NestedMsg_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_NestedJsonTest_descriptor, + internal_static_NestedMsg_descriptor, new java.lang.String[] { "Label", }); + internal_static_MapMsg_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_MapMsg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_MapMsg_descriptor, + new java.lang.String[] { "StringMap", "NestedMap", "NullableStringMapPresentIfEmpty", "NullableStringMap", }); + internal_static_MapMsg_StringMapEntry_descriptor = + internal_static_MapMsg_descriptor.getNestedTypes().get(0); + internal_static_MapMsg_StringMapEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_MapMsg_StringMapEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_MapMsg_NestedMapEntry_descriptor = + internal_static_MapMsg_descriptor.getNestedTypes().get(1); + internal_static_MapMsg_NestedMapEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_MapMsg_NestedMapEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_MapMsg_NullableStringMapEntry_descriptor = + internal_static_MapMsg_descriptor.getNestedTypes().get(2); + internal_static_MapMsg_NullableStringMapEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_MapMsg_NullableStringMapEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); } // @@protoc_insertion_point(outer_class_scope) diff --git a/sonar-core/src/test/java/org/sonar/core/util/ProtobufJsonFormatTest.java b/sonar-core/src/test/java/org/sonar/core/util/ProtobufJsonFormatTest.java index 19a4e09a176..93e0b95b951 100644 --- a/sonar-core/src/test/java/org/sonar/core/util/ProtobufJsonFormatTest.java +++ b/sonar-core/src/test/java/org/sonar/core/util/ProtobufJsonFormatTest.java @@ -25,10 +25,11 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.sonar.api.utils.text.JsonWriter; -import org.sonar.core.test.Test.JsonArrayTest; -import org.sonar.core.test.Test.JsonTest; +import org.sonar.core.test.Test.ArrayFieldMsg; +import org.sonar.core.test.Test.MapMsg; +import org.sonar.core.test.Test.PrimitiveTypeMsg; +import org.sonar.test.TestUtils; -import static java.util.Arrays.asList; import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.core.util.ProtobufJsonFormat.toJson; @@ -38,100 +39,127 @@ public class ProtobufJsonFormatTest { public ExpectedException expectedException = ExpectedException.none(); @Test - public void convert_protobuf_to_json() { - JsonTest protobuf = JsonTest.newBuilder() + public void test_conversion_of_primitive_types() { + PrimitiveTypeMsg protobuf = PrimitiveTypeMsg.newBuilder() .setStringField("foo") .setIntField(10) .setLongField(100L) .setDoubleField(3.14) .setBooleanField(true) .setEnumField(org.sonar.core.test.Test.FakeEnum.GREEN) - .addAllAnArray(asList("one", "two", "three")) - .setNested(org.sonar.core.test.Test.NestedJsonTest.newBuilder().setLabel("bar").build()) .build(); - assertThat(toJson(protobuf)) - .isEqualTo( - "{\"stringField\":\"foo\",\"intField\":10,\"longField\":100,\"doubleField\":3.14,\"booleanField\":true,\"enumField\":\"GREEN\",\"nested\":{\"label\":\"bar\"},\"anArray\":[\"one\",\"two\",\"three\"]}"); + assertThat(toJson(protobuf)).isEqualTo( + "{\"stringField\":\"foo\",\"intField\":10,\"longField\":100,\"doubleField\":3.14,\"booleanField\":true,\"enumField\":\"GREEN\"}"); } @Test - public void protobuf_bytes_field_can_not_be_converted_to_json() { + public void bytes_field_can_not_be_converted() { expectedException.expect(RuntimeException.class); expectedException.expectMessage("JSON format does not support type 'BYTE_STRING' of field 'bytesField'"); - JsonTest protobuf = JsonTest.newBuilder() - .setBytesField(ByteString.copyFrom(new byte[]{2, 4})) + PrimitiveTypeMsg protobuf = PrimitiveTypeMsg.newBuilder() + .setBytesField(ByteString.copyFrom(new byte[] {2, 4})) .build(); ProtobufJsonFormat.write(protobuf, JsonWriter.of(new StringWriter())); } @Test - public void protobuf_absent_fields_are_not_output() { - JsonTest msg = JsonTest.newBuilder().build(); + public void do_not_convert_absent_primitive_fields() { + PrimitiveTypeMsg msg = PrimitiveTypeMsg.newBuilder().build(); // fields are absent assertThat(msg.hasStringField()).isFalse(); assertThat(msg.hasIntField()).isFalse(); - - // the repeated field "anArray" is always present. This is the standard behavior of protobuf. It - // does not make the difference between null and empty arrays. - assertThat(toJson(msg)).isEqualTo("{\"anArray\":[]}"); } @Test - public void protobuf_present_and_empty_string_field_is_output() { - JsonTest msg = JsonTest.newBuilder().setStringField("").build(); + public void convert_empty_string() { + PrimitiveTypeMsg msg = PrimitiveTypeMsg.newBuilder().setStringField("").build(); // field is present assertThat(msg.hasStringField()).isTrue(); assertThat(msg.getStringField()).isEqualTo(""); - assertThat(toJson(msg)).contains("\"stringField\":\"\""); + assertThat(toJson(msg)).isEqualTo("{\"stringField\":\"\"}"); } - @Test - public void protobuf_empty_array_marked_as_present_is_output() { - JsonArrayTest msg = JsonArrayTest.newBuilder() - .setANullableArrayPresentIfEmpty(true) + public void convert_arrays() { + ArrayFieldMsg msg = ArrayFieldMsg.newBuilder() + .addStrings("one").addStrings("two") + .addNesteds(org.sonar.core.test.Test.NestedMsg.newBuilder().setLabel("nestedOne")).addNesteds(org.sonar.core.test.Test.NestedMsg.newBuilder().setLabel("nestedTwo")) + .addNullableArray("nullableOne").addNullableArray("nullableTwo") .build(); - // repeated field "aNullableArray" is marked as present through the boolean field "aNullableArrayPresentIfEmpty" - assertThat(msg.hasANullableArrayPresentIfEmpty()).isTrue(); - assertThat(msg.getANullableArrayPresentIfEmpty()).isTrue(); + assertThat(toJson(msg)) + .isEqualTo("{\"strings\":[\"one\",\"two\"],\"nesteds\":[{\"label\":\"nestedOne\"},{\"label\":\"nestedTwo\"}],\"nullableArray\":[\"nullableOne\",\"nullableTwo\"]}"); + } - // JSON contains the repeated field, but not the boolean marker field - assertThat(toJson(msg)).isEqualTo("{\"aNullableArray\":[]}"); + @Test + public void convert_empty_arrays() { + ArrayFieldMsg msg = ArrayFieldMsg.newBuilder() + .setNullableArrayPresentIfEmpty(true) + .build(); + + assertThat(toJson(msg)).isEqualTo("{\"strings\":[],\"nesteds\":[],\"nullableArray\":[]}"); } @Test - public void protobuf_empty_array_marked_as_absent_is_not_output() { - JsonArrayTest msg = JsonArrayTest.newBuilder() - .setANullableArrayPresentIfEmpty(false) + public void do_not_convert_empty_array_marked_as_absent() { + ArrayFieldMsg msg = ArrayFieldMsg.newBuilder() + .setNullableArrayPresentIfEmpty(false) .build(); - // repeated field "aNullableArray" is marked as absent through the boolean field "aNullableArrayPresentIfEmpty" - assertThat(msg.hasANullableArrayPresentIfEmpty()).isTrue(); - assertThat(msg.getANullableArrayPresentIfEmpty()).isFalse(); + assertThat(msg.hasNullableArrayPresentIfEmpty()).isTrue(); + assertThat(msg.getNullableArrayPresentIfEmpty()).isFalse(); - // JSON does not contain the array nor the boolean marker - assertThat(toJson(msg)).isEqualTo("{}"); + // nullableArray does not appear + assertThat(toJson(msg)).isEqualTo("{\"strings\":[],\"nesteds\":[]}"); } @Test - public void protobuf_non_empty_array_is_output_even_if_not_marked_as_present() { - JsonArrayTest msg = JsonArrayTest.newBuilder() - .addANullableArray("foo") + public void convert_non_empty_array_even_if_not_marked_as_present() { + ArrayFieldMsg msg = ArrayFieldMsg.newBuilder() + .addNullableArray("foo") .build(); - // repeated field "aNullableArray" is present, but the boolean marker "aNullableArrayPresentIfEmpty" + // repeated field "nullableArray" is present, but the boolean marker "nullableArrayPresentIfEmpty" // is not set. - assertThat(msg.hasANullableArrayPresentIfEmpty()).isFalse(); - assertThat(msg.getANullableArrayPresentIfEmpty()).isFalse(); + assertThat(msg.hasNullableArrayPresentIfEmpty()).isFalse(); + assertThat(msg.getNullableArrayPresentIfEmpty()).isFalse(); // JSON contains the array but not the boolean marker - assertThat(toJson(msg)).isEqualTo("{\"aNullableArray\":[\"foo\"]}"); + assertThat(toJson(msg)).contains("\"nullableArray\":[\"foo\"]"); + } + + @Test + public void convert_map() { + MapMsg.Builder builder = MapMsg.newBuilder(); + builder.getMutableStringMap().put("one", "un"); + builder.getMutableStringMap().put("two", "deux"); + builder.getMutableNestedMap().put("three", org.sonar.core.test.Test.NestedMsg.newBuilder().setLabel("trois").build()); + builder.getMutableNestedMap().put("four", org.sonar.core.test.Test.NestedMsg.newBuilder().setLabel("quatre").build()); + builder.setNullableStringMapPresentIfEmpty(false); + assertThat(toJson(builder.build())) + .isEqualTo("{\"stringMap\":{\"one\":\"un\",\"two\":\"deux\"},\"nestedMap\":{\"three\":{\"label\":\"trois\"},\"four\":{\"label\":\"quatre\"}}}"); + } + + @Test + public void convert_empty_map() { + MapMsg msg = MapMsg.newBuilder().build(); + assertThat(toJson(msg)).isEqualTo("{\"stringMap\":{},\"nestedMap\":{}}"); + } + + @Test + public void convert_nullable_empty_map_if_marked_as_present() { + MapMsg msg = MapMsg.newBuilder().setNullableStringMapPresentIfEmpty(true).build(); + assertThat(toJson(msg)).isEqualTo("{\"stringMap\":{},\"nestedMap\":{},\"nullableStringMap\":{}}"); + } + + @Test + public void constructor_is_private() throws Exception { + assertThat(TestUtils.hasOnlyPrivateConstructors(ProtobufJsonFormat.class)).isTrue(); } } diff --git a/sonar-core/src/test/protobuf/test.proto b/sonar-core/src/test/protobuf/test.proto index 2e1c09a00ae..fc86fe39521 100644 --- a/sonar-core/src/test/protobuf/test.proto +++ b/sonar-core/src/test/protobuf/test.proto @@ -34,7 +34,7 @@ enum FakeEnum { GREEN = 2; } -message JsonTest { +message PrimitiveTypeMsg { optional string stringField = 1; optional int32 intField = 2; optional int64 longField = 3; @@ -42,17 +42,27 @@ message JsonTest { optional bool booleanField = 5; optional FakeEnum enumField = 6; optional bytes bytesField = 7; - optional NestedJsonTest nested = 8; - repeated string anArray = 9; + optional NestedMsg nested = 8; } -message JsonArrayTest { -// naming convention. A boolean field is used - // to know if the array field is present. - optional bool aNullableArrayPresentIfEmpty = 1; - repeated string aNullableArray = 2; +message ArrayFieldMsg { + repeated string strings = 1; + repeated NestedMsg nesteds = 2; + + // naming convention. A boolean field is used + // to know if the repeated field is present. + optional bool nullableArrayPresentIfEmpty = 3; + repeated string nullableArray = 4; } -message NestedJsonTest { +message NestedMsg { optional string label = 1; } + +message MapMsg { + map stringMap = 1; + map nestedMap = 2; + + optional bool nullableStringMapPresentIfEmpty = 3; + map nullableStringMap = 4; +} diff --git a/sonar-db/src/main/gen-java/org/sonar/db/protobuf/DbCommons.java b/sonar-db/src/main/gen-java/org/sonar/db/protobuf/DbCommons.java index e5880a32d83..11d2d85200a 100644 --- a/sonar-db/src/main/gen-java/org/sonar/db/protobuf/DbCommons.java +++ b/sonar-db/src/main/gen-java/org/sonar/db/protobuf/DbCommons.java @@ -87,37 +87,30 @@ public final class DbCommons { * Lines start at 1 and line offsets start at 0 * */ - public static final class TextRange extends + public static final class TextRange extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.db.commons.TextRange) TextRangeOrBuilder { // Use TextRange.newBuilder() to construct. - private TextRange(com.google.protobuf.GeneratedMessage.Builder builder) { + private TextRange(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private TextRange(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final TextRange defaultInstance; - public static TextRange getDefaultInstance() { - return defaultInstance; - } - - public TextRange getDefaultInstanceForType() { - return defaultInstance; + private TextRange() { + startLine_ = 0; + endLine_ = 0; + startOffset_ = 0; + endOffset_ = 0; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private TextRange( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -159,10 +152,11 @@ public final class DbCommons { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -180,21 +174,6 @@ public final class DbCommons { org.sonar.db.protobuf.DbCommons.TextRange.class, org.sonar.db.protobuf.DbCommons.TextRange.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public TextRange parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextRange(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int START_LINE_FIELD_NUMBER = 1; private int startLine_; @@ -288,12 +267,6 @@ public final class DbCommons { return endOffset_; } - private void initFields() { - startLine_ = 0; - endLine_ = 0; - startOffset_ = 0; - endOffset_ = 0; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -306,7 +279,6 @@ public final class DbCommons { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt32(1, startLine_); } @@ -319,7 +291,7 @@ public final class DbCommons { if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeInt32(4, endOffset_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -344,18 +316,12 @@ public final class DbCommons { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, endOffset_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.db.protobuf.DbCommons.TextRange parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -409,12 +375,17 @@ public final class DbCommons { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.db.protobuf.DbCommons.TextRange prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -459,10 +430,6 @@ public final class DbCommons { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); startLine_ = 0; @@ -476,10 +443,6 @@ public final class DbCommons { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonar.db.protobuf.DbCommons.internal_static_sonarqube_db_commons_TextRange_descriptor; @@ -545,7 +508,8 @@ public final class DbCommons { if (other.hasEndOffset()) { setEndOffset(other.getEndOffset()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -767,15 +731,47 @@ public final class DbCommons { // @@protoc_insertion_point(builder_scope:sonarqube.db.commons.TextRange) } + // @@protoc_insertion_point(class_scope:sonarqube.db.commons.TextRange) + private static final org.sonar.db.protobuf.DbCommons.TextRange DEFAULT_INSTANCE; static { - defaultInstance = new TextRange(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.db.protobuf.DbCommons.TextRange(); + } + + public static org.sonar.db.protobuf.DbCommons.TextRange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public TextRange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new TextRange(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.db.protobuf.DbCommons.TextRange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.db.commons.TextRange) } - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_db_commons_TextRange_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable diff --git a/sonar-db/src/main/gen-java/org/sonar/db/protobuf/DbFileSources.java b/sonar-db/src/main/gen-java/org/sonar/db/protobuf/DbFileSources.java index 5942e13c3ba..165dc22f58f 100644 --- a/sonar-db/src/main/gen-java/org/sonar/db/protobuf/DbFileSources.java +++ b/sonar-db/src/main/gen-java/org/sonar/db/protobuf/DbFileSources.java @@ -233,37 +233,43 @@ public final class DbFileSources { /** * Protobuf type {@code org.sonar.server.source.db.Line} */ - public static final class Line extends + public static final class Line extends 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) { + 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 static final Line defaultInstance; - public static Line getDefaultInstance() { - return defaultInstance; - } - - public Line getDefaultInstanceForType() { - return defaultInstance; + private Line() { + line_ = 0; + source_ = ""; + scmRevision_ = ""; + scmAuthor_ = ""; + scmDate_ = 0L; + utLineHits_ = 0; + utConditions_ = 0; + utCoveredConditions_ = 0; + itLineHits_ = 0; + itConditions_ = 0; + itCoveredConditions_ = 0; + overallLineHits_ = 0; + overallConditions_ = 0; + overallCoveredConditions_ = 0; + highlighting_ = ""; + symbols_ = ""; + duplication_ = java.util.Collections.emptyList(); } - 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 { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -391,10 +397,11 @@ public final class DbFileSources { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00010000) == 0x00010000)) { duplication_ = java.util.Collections.unmodifiableList(duplication_); @@ -415,21 +422,6 @@ public final class DbFileSources { org.sonar.db.protobuf.DbFileSources.Line.class, org.sonar.db.protobuf.DbFileSources.Line.Builder.class); } - public static com.google.protobuf.Parser PARSER = - 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); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int LINE_FIELD_NUMBER = 1; private int line_; @@ -447,7 +439,7 @@ public final class DbFileSources { } public static final int SOURCE_FIELD_NUMBER = 2; - private java.lang.Object source_; + private volatile java.lang.Object source_; /** * optional string source = 2; */ @@ -489,7 +481,7 @@ public final class DbFileSources { } public static final int SCM_REVISION_FIELD_NUMBER = 3; - private java.lang.Object scmRevision_; + private volatile java.lang.Object scmRevision_; /** * optional string scm_revision = 3; * @@ -543,7 +535,7 @@ public final class DbFileSources { } public static final int SCM_AUTHOR_FIELD_NUMBER = 4; - private java.lang.Object scmAuthor_; + private volatile java.lang.Object scmAuthor_; /** * optional string scm_author = 4; */ @@ -759,7 +751,7 @@ public final class DbFileSources { } public static final int HIGHLIGHTING_FIELD_NUMBER = 15; - private java.lang.Object highlighting_; + private volatile java.lang.Object highlighting_; /** * optional string highlighting = 15; */ @@ -801,7 +793,7 @@ public final class DbFileSources { } public static final int SYMBOLS_FIELD_NUMBER = 16; - private java.lang.Object symbols_; + private volatile java.lang.Object symbols_; /** * optional string symbols = 16; */ @@ -865,25 +857,6 @@ public final class DbFileSources { } private int duplicationMemoizedSerializedSize = -1; - private void initFields() { - line_ = 0; - source_ = ""; - scmRevision_ = ""; - scmAuthor_ = ""; - scmDate_ = 0L; - utLineHits_ = 0; - utConditions_ = 0; - utCoveredConditions_ = 0; - itLineHits_ = 0; - itConditions_ = 0; - itCoveredConditions_ = 0; - overallLineHits_ = 0; - overallConditions_ = 0; - overallCoveredConditions_ = 0; - highlighting_ = ""; - symbols_ = ""; - duplication_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -952,7 +925,7 @@ public final class DbFileSources { for (int i = 0; i < duplication_.size(); i++) { output.writeInt32NoTag(duplication_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -1039,18 +1012,12 @@ public final class DbFileSources { } duplicationMemoizedSerializedSize = dataSize; } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.db.protobuf.DbFileSources.Line parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1104,12 +1071,17 @@ public final class DbFileSources { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.db.protobuf.DbFileSources.Line prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -1150,10 +1122,6 @@ public final class DbFileSources { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); line_ = 0; @@ -1193,10 +1161,6 @@ public final class DbFileSources { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonar.db.protobuf.DbFileSources.internal_static_org_sonar_server_source_db_Line_descriptor; @@ -1371,7 +1335,8 @@ public final class DbFileSources { } onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -2271,12 +2236,44 @@ public final class DbFileSources { // @@protoc_insertion_point(builder_scope:org.sonar.server.source.db.Line) } + // @@protoc_insertion_point(class_scope:org.sonar.server.source.db.Line) + private static final org.sonar.db.protobuf.DbFileSources.Line DEFAULT_INSTANCE; static { - defaultInstance = new Line(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.db.protobuf.DbFileSources.Line(); + } + + public static org.sonar.db.protobuf.DbFileSources.Line getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Line parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Line(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.db.protobuf.DbFileSources.Line getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:org.sonar.server.source.db.Line) } public interface DataOrBuilder extends @@ -2314,37 +2311,27 @@ public final class DbFileSources { * TODO should be dropped as it prevents streaming * */ - public static final class Data extends + public static final class Data extends 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) { + 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 static final Data defaultInstance; - public static Data getDefaultInstance() { - return defaultInstance; } - - public Data getDefaultInstanceForType() { - return defaultInstance; + private Data() { + lines_ = java.util.Collections.emptyList(); } - 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 { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -2374,10 +2361,11 @@ public final class DbFileSources { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { lines_ = java.util.Collections.unmodifiableList(lines_); @@ -2398,21 +2386,6 @@ public final class DbFileSources { org.sonar.db.protobuf.DbFileSources.Data.class, org.sonar.db.protobuf.DbFileSources.Data.Builder.class); } - public static com.google.protobuf.Parser PARSER = - 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); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - public static final int LINES_FIELD_NUMBER = 1; private java.util.List lines_; /** @@ -2448,9 +2421,6 @@ public final class DbFileSources { return lines_.get(index); } - private void initFields() { - lines_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -2463,11 +2433,10 @@ public final class DbFileSources { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); for (int i = 0; i < lines_.size(); i++) { output.writeMessage(1, lines_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -2480,18 +2449,12 @@ public final class DbFileSources { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, lines_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.db.protobuf.DbFileSources.Data parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -2545,12 +2508,17 @@ public final class DbFileSources { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.db.protobuf.DbFileSources.Data prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -2596,10 +2564,6 @@ public final class DbFileSources { getLinesFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); if (linesBuilder_ == null) { @@ -2611,10 +2575,6 @@ public final class DbFileSources { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonar.db.protobuf.DbFileSources.internal_static_org_sonar_server_source_db_Data_descriptor; @@ -2685,7 +2645,8 @@ public final class DbFileSources { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -2955,12 +2916,44 @@ public final class DbFileSources { // @@protoc_insertion_point(builder_scope:org.sonar.server.source.db.Data) } + // @@protoc_insertion_point(class_scope:org.sonar.server.source.db.Data) + private static final org.sonar.db.protobuf.DbFileSources.Data DEFAULT_INSTANCE; static { - defaultInstance = new Data(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.db.protobuf.DbFileSources.Data(); + } + + public static org.sonar.db.protobuf.DbFileSources.Data getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Data parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Data(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.db.protobuf.DbFileSources.Data getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:org.sonar.server.source.db.Data) } public interface TestOrBuilder extends @@ -3068,37 +3061,33 @@ public final class DbFileSources { /** * Protobuf type {@code org.sonar.server.source.db.Test} */ - public static final class Test extends + public static final class Test extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:org.sonar.server.source.db.Test) TestOrBuilder { // Use Test.newBuilder() to construct. - private Test(com.google.protobuf.GeneratedMessage.Builder builder) { + private Test(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private Test(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Test defaultInstance; - public static Test getDefaultInstance() { - return defaultInstance; - } - - public Test getDefaultInstanceForType() { - return defaultInstance; + private Test() { + uuid_ = ""; + name_ = ""; + status_ = 1; + executionTimeMs_ = 0L; + stacktrace_ = ""; + msg_ = ""; + coveredFile_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Test( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -3136,7 +3125,7 @@ public final class DbFileSources { unknownFields.mergeVarintField(3, rawValue); } else { bitField0_ |= 0x00000004; - status_ = value; + status_ = rawValue; } break; } @@ -3168,10 +3157,11 @@ public final class DbFileSources { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { coveredFile_ = java.util.Collections.unmodifiableList(coveredFile_); @@ -3192,21 +3182,6 @@ public final class DbFileSources { org.sonar.db.protobuf.DbFileSources.Test.class, org.sonar.db.protobuf.DbFileSources.Test.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Test parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Test(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - /** * Protobuf enum {@code org.sonar.server.source.db.Test.TestStatus} */ @@ -3248,7 +3223,9 @@ public final class DbFileSources { public static final int SKIPPED_VALUE = 4; - public final int getNumber() { return value; } + public final int getNumber() { + return value; + } public static TestStatus valueOf(int value) { switch (value) { @@ -3341,37 +3318,28 @@ public final class DbFileSources { /** * Protobuf type {@code org.sonar.server.source.db.Test.CoveredFile} */ - public static final class CoveredFile extends + public static final class CoveredFile extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:org.sonar.server.source.db.Test.CoveredFile) CoveredFileOrBuilder { // Use CoveredFile.newBuilder() to construct. - private CoveredFile(com.google.protobuf.GeneratedMessage.Builder builder) { + private CoveredFile(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private CoveredFile(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final CoveredFile defaultInstance; - public static CoveredFile getDefaultInstance() { - return defaultInstance; } - - public CoveredFile getDefaultInstanceForType() { - return defaultInstance; + private CoveredFile() { + fileUuid_ = ""; + coveredLine_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private CoveredFile( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -3420,10 +3388,11 @@ public final class DbFileSources { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { coveredLine_ = java.util.Collections.unmodifiableList(coveredLine_); @@ -3444,24 +3413,9 @@ public final class DbFileSources { org.sonar.db.protobuf.DbFileSources.Test.CoveredFile.class, org.sonar.db.protobuf.DbFileSources.Test.CoveredFile.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public CoveredFile parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CoveredFile(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int FILE_UUID_FIELD_NUMBER = 1; - private java.lang.Object fileUuid_; + private volatile java.lang.Object fileUuid_; /** * optional string file_uuid = 1; */ @@ -3525,10 +3479,6 @@ public final class DbFileSources { } private int coveredLineMemoizedSerializedSize = -1; - private void initFields() { - fileUuid_ = ""; - coveredLine_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -3552,7 +3502,7 @@ public final class DbFileSources { for (int i = 0; i < coveredLine_.size(); i++) { output.writeInt32NoTag(coveredLine_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -3579,18 +3529,12 @@ public final class DbFileSources { } coveredLineMemoizedSerializedSize = dataSize; } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.db.protobuf.DbFileSources.Test.CoveredFile parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -3644,12 +3588,17 @@ public final class DbFileSources { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.db.protobuf.DbFileSources.Test.CoveredFile prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -3690,10 +3639,6 @@ public final class DbFileSources { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); fileUuid_ = ""; @@ -3703,10 +3648,6 @@ public final class DbFileSources { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonar.db.protobuf.DbFileSources.internal_static_org_sonar_server_source_db_Test_CoveredFile_descriptor; @@ -3768,7 +3709,8 @@ public final class DbFileSources { } onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -3940,17 +3882,49 @@ public final class DbFileSources { // @@protoc_insertion_point(builder_scope:org.sonar.server.source.db.Test.CoveredFile) } + // @@protoc_insertion_point(class_scope:org.sonar.server.source.db.Test.CoveredFile) + private static final org.sonar.db.protobuf.DbFileSources.Test.CoveredFile DEFAULT_INSTANCE; static { - defaultInstance = new CoveredFile(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.db.protobuf.DbFileSources.Test.CoveredFile(); + } + + public static org.sonar.db.protobuf.DbFileSources.Test.CoveredFile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public CoveredFile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new CoveredFile(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.db.protobuf.DbFileSources.Test.CoveredFile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:org.sonar.server.source.db.Test.CoveredFile) } private int bitField0_; public static final int UUID_FIELD_NUMBER = 1; - private java.lang.Object uuid_; + private volatile java.lang.Object uuid_; /** * optional string uuid = 1; */ @@ -3992,7 +3966,7 @@ public final class DbFileSources { } public static final int NAME_FIELD_NUMBER = 2; - private java.lang.Object name_; + private volatile java.lang.Object name_; /** * optional string name = 2; */ @@ -4034,7 +4008,7 @@ public final class DbFileSources { } public static final int STATUS_FIELD_NUMBER = 3; - private org.sonar.db.protobuf.DbFileSources.Test.TestStatus status_; + private int status_; /** * optional .org.sonar.server.source.db.Test.TestStatus status = 3; */ @@ -4045,7 +4019,8 @@ public final class DbFileSources { * optional .org.sonar.server.source.db.Test.TestStatus status = 3; */ public org.sonar.db.protobuf.DbFileSources.Test.TestStatus getStatus() { - return status_; + org.sonar.db.protobuf.DbFileSources.Test.TestStatus result = org.sonar.db.protobuf.DbFileSources.Test.TestStatus.valueOf(status_); + return result == null ? org.sonar.db.protobuf.DbFileSources.Test.TestStatus.OK : result; } public static final int EXECUTION_TIME_MS_FIELD_NUMBER = 4; @@ -4064,7 +4039,7 @@ public final class DbFileSources { } public static final int STACKTRACE_FIELD_NUMBER = 5; - private java.lang.Object stacktrace_; + private volatile java.lang.Object stacktrace_; /** * optional string stacktrace = 5; */ @@ -4106,7 +4081,7 @@ public final class DbFileSources { } public static final int MSG_FIELD_NUMBER = 6; - private java.lang.Object msg_; + private volatile java.lang.Object msg_; /** * optional string msg = 6; */ @@ -4182,15 +4157,6 @@ public final class DbFileSources { return coveredFile_.get(index); } - private void initFields() { - uuid_ = ""; - name_ = ""; - status_ = org.sonar.db.protobuf.DbFileSources.Test.TestStatus.OK; - executionTimeMs_ = 0L; - stacktrace_ = ""; - msg_ = ""; - coveredFile_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -4203,7 +4169,6 @@ public final class DbFileSources { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getUuidBytes()); } @@ -4211,7 +4176,7 @@ public final class DbFileSources { output.writeBytes(2, getNameBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeEnum(3, status_.getNumber()); + output.writeEnum(3, status_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeInt64(4, executionTimeMs_); @@ -4225,7 +4190,7 @@ public final class DbFileSources { for (int i = 0; i < coveredFile_.size(); i++) { output.writeMessage(7, coveredFile_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -4244,7 +4209,7 @@ public final class DbFileSources { } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, status_.getNumber()); + .computeEnumSize(3, status_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream @@ -4262,18 +4227,12 @@ public final class DbFileSources { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, coveredFile_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.db.protobuf.DbFileSources.Test parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -4327,12 +4286,17 @@ public final class DbFileSources { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.db.protobuf.DbFileSources.Test prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -4374,17 +4338,13 @@ public final class DbFileSources { getCoveredFileFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); uuid_ = ""; bitField0_ = (bitField0_ & ~0x00000001); name_ = ""; bitField0_ = (bitField0_ & ~0x00000002); - status_ = org.sonar.db.protobuf.DbFileSources.Test.TestStatus.OK; + status_ = 1; bitField0_ = (bitField0_ & ~0x00000004); executionTimeMs_ = 0L; bitField0_ = (bitField0_ & ~0x00000008); @@ -4401,10 +4361,6 @@ public final class DbFileSources { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonar.db.protobuf.DbFileSources.internal_static_org_sonar_server_source_db_Test_descriptor; @@ -4527,7 +4483,8 @@ public final class DbFileSources { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -4706,7 +4663,7 @@ public final class DbFileSources { return this; } - private org.sonar.db.protobuf.DbFileSources.Test.TestStatus status_ = org.sonar.db.protobuf.DbFileSources.Test.TestStatus.OK; + private int status_ = 1; /** * optional .org.sonar.server.source.db.Test.TestStatus status = 3; */ @@ -4717,7 +4674,8 @@ public final class DbFileSources { * optional .org.sonar.server.source.db.Test.TestStatus status = 3; */ public org.sonar.db.protobuf.DbFileSources.Test.TestStatus getStatus() { - return status_; + org.sonar.db.protobuf.DbFileSources.Test.TestStatus result = org.sonar.db.protobuf.DbFileSources.Test.TestStatus.valueOf(status_); + return result == null ? org.sonar.db.protobuf.DbFileSources.Test.TestStatus.OK : result; } /** * optional .org.sonar.server.source.db.Test.TestStatus status = 3; @@ -4727,7 +4685,7 @@ public final class DbFileSources { throw new NullPointerException(); } bitField0_ |= 0x00000004; - status_ = value; + status_ = value.getNumber(); onChanged(); return this; } @@ -4736,7 +4694,7 @@ public final class DbFileSources { */ public Builder clearStatus() { bitField0_ = (bitField0_ & ~0x00000004); - status_ = org.sonar.db.protobuf.DbFileSources.Test.TestStatus.OK; + status_ = 1; onChanged(); return this; } @@ -5168,30 +5126,62 @@ public final class DbFileSources { // @@protoc_insertion_point(builder_scope:org.sonar.server.source.db.Test) } + // @@protoc_insertion_point(class_scope:org.sonar.server.source.db.Test) + private static final org.sonar.db.protobuf.DbFileSources.Test DEFAULT_INSTANCE; static { - defaultInstance = new Test(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.db.protobuf.DbFileSources.Test(); + } + + public static org.sonar.db.protobuf.DbFileSources.Test getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Test parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Test(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.db.protobuf.DbFileSources.Test getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:org.sonar.server.source.db.Test) } - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_sonar_server_source_db_Line_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_sonar_server_source_db_Line_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_sonar_server_source_db_Data_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_sonar_server_source_db_Data_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_sonar_server_source_db_Test_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_sonar_server_source_db_Test_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_sonar_server_source_db_Test_CoveredFile_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable diff --git a/sonar-db/src/main/gen-java/org/sonar/db/protobuf/DbIssues.java b/sonar-db/src/main/gen-java/org/sonar/db/protobuf/DbIssues.java index d7230c43d14..1baa250436a 100644 --- a/sonar-db/src/main/gen-java/org/sonar/db/protobuf/DbIssues.java +++ b/sonar-db/src/main/gen-java/org/sonar/db/protobuf/DbIssues.java @@ -52,37 +52,27 @@ public final class DbIssues { /** * Protobuf type {@code sonarqube.db.issues.Locations} */ - public static final class Locations extends + public static final class Locations extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.db.issues.Locations) LocationsOrBuilder { // Use Locations.newBuilder() to construct. - private Locations(com.google.protobuf.GeneratedMessage.Builder builder) { + private Locations(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private Locations(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Locations defaultInstance; - public static Locations getDefaultInstance() { - return defaultInstance; - } - - public Locations getDefaultInstanceForType() { - return defaultInstance; + private Locations() { + flow_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Locations( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -125,10 +115,11 @@ public final class DbIssues { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { flow_ = java.util.Collections.unmodifiableList(flow_); @@ -149,21 +140,6 @@ public final class DbIssues { org.sonar.db.protobuf.DbIssues.Locations.class, org.sonar.db.protobuf.DbIssues.Locations.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Locations parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Locations(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int TEXT_RANGE_FIELD_NUMBER = 1; private org.sonar.db.protobuf.DbCommons.TextRange textRange_; @@ -177,13 +153,13 @@ public final class DbIssues { * optional .sonarqube.db.commons.TextRange text_range = 1; */ public org.sonar.db.protobuf.DbCommons.TextRange getTextRange() { - return textRange_; + return textRange_ == null ? org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance() : textRange_; } /** * optional .sonarqube.db.commons.TextRange text_range = 1; */ public org.sonar.db.protobuf.DbCommons.TextRangeOrBuilder getTextRangeOrBuilder() { - return textRange_; + return textRange_ == null ? org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance() : textRange_; } public static final int FLOW_FIELD_NUMBER = 2; @@ -221,10 +197,6 @@ public final class DbIssues { return flow_.get(index); } - private void initFields() { - textRange_ = org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance(); - flow_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -237,14 +209,13 @@ public final class DbIssues { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, textRange_); + output.writeMessage(1, getTextRange()); } for (int i = 0; i < flow_.size(); i++) { output.writeMessage(2, flow_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -255,24 +226,18 @@ public final class DbIssues { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, textRange_); + .computeMessageSize(1, getTextRange()); } for (int i = 0; i < flow_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, flow_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.db.protobuf.DbIssues.Locations parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -326,12 +291,17 @@ public final class DbIssues { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.db.protobuf.DbIssues.Locations prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -374,14 +344,10 @@ public final class DbIssues { getFlowFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); if (textRangeBuilder_ == null) { - textRange_ = org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance(); + textRange_ = null; } else { textRangeBuilder_.clear(); } @@ -395,10 +361,6 @@ public final class DbIssues { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonar.db.protobuf.DbIssues.internal_static_sonarqube_db_issues_Locations_descriptor; @@ -482,7 +444,8 @@ public final class DbIssues { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -509,7 +472,7 @@ public final class DbIssues { } private int bitField0_; - private org.sonar.db.protobuf.DbCommons.TextRange textRange_ = org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance(); + private org.sonar.db.protobuf.DbCommons.TextRange textRange_ = null; private com.google.protobuf.SingleFieldBuilder< org.sonar.db.protobuf.DbCommons.TextRange, org.sonar.db.protobuf.DbCommons.TextRange.Builder, org.sonar.db.protobuf.DbCommons.TextRangeOrBuilder> textRangeBuilder_; /** @@ -523,7 +486,7 @@ public final class DbIssues { */ public org.sonar.db.protobuf.DbCommons.TextRange getTextRange() { if (textRangeBuilder_ == null) { - return textRange_; + return textRange_ == null ? org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance() : textRange_; } else { return textRangeBuilder_.getMessage(); } @@ -564,6 +527,7 @@ public final class DbIssues { public Builder mergeTextRange(org.sonar.db.protobuf.DbCommons.TextRange value) { if (textRangeBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && + textRange_ != null && textRange_ != org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance()) { textRange_ = org.sonar.db.protobuf.DbCommons.TextRange.newBuilder(textRange_).mergeFrom(value).buildPartial(); @@ -582,7 +546,7 @@ public final class DbIssues { */ public Builder clearTextRange() { if (textRangeBuilder_ == null) { - textRange_ = org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance(); + textRange_ = null; onChanged(); } else { textRangeBuilder_.clear(); @@ -605,7 +569,8 @@ public final class DbIssues { if (textRangeBuilder_ != null) { return textRangeBuilder_.getMessageOrBuilder(); } else { - return textRange_; + return textRange_ == null ? + org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance() : textRange_; } } /** @@ -868,12 +833,44 @@ public final class DbIssues { // @@protoc_insertion_point(builder_scope:sonarqube.db.issues.Locations) } + // @@protoc_insertion_point(class_scope:sonarqube.db.issues.Locations) + private static final org.sonar.db.protobuf.DbIssues.Locations DEFAULT_INSTANCE; static { - defaultInstance = new Locations(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.db.protobuf.DbIssues.Locations(); + } + + public static org.sonar.db.protobuf.DbIssues.Locations getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Locations parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Locations(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.db.protobuf.DbIssues.Locations getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.db.issues.Locations) } public interface FlowOrBuilder extends @@ -907,37 +904,27 @@ public final class DbIssues { /** * Protobuf type {@code sonarqube.db.issues.Flow} */ - public static final class Flow extends + public static final class Flow extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.db.issues.Flow) FlowOrBuilder { // Use Flow.newBuilder() to construct. - private Flow(com.google.protobuf.GeneratedMessage.Builder builder) { + private Flow(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Flow(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Flow defaultInstance; - public static Flow getDefaultInstance() { - return defaultInstance; } - - public Flow getDefaultInstanceForType() { - return defaultInstance; + private Flow() { + location_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Flow( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -967,10 +954,11 @@ public final class DbIssues { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { location_ = java.util.Collections.unmodifiableList(location_); @@ -991,21 +979,6 @@ public final class DbIssues { org.sonar.db.protobuf.DbIssues.Flow.class, org.sonar.db.protobuf.DbIssues.Flow.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Flow parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Flow(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - public static final int LOCATION_FIELD_NUMBER = 1; private java.util.List location_; /** @@ -1041,9 +1014,6 @@ public final class DbIssues { return location_.get(index); } - private void initFields() { - location_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -1056,11 +1026,10 @@ public final class DbIssues { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); for (int i = 0; i < location_.size(); i++) { output.writeMessage(1, location_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -1073,18 +1042,12 @@ public final class DbIssues { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, location_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.db.protobuf.DbIssues.Flow parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1138,12 +1101,17 @@ public final class DbIssues { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.db.protobuf.DbIssues.Flow prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -1185,10 +1153,6 @@ public final class DbIssues { getLocationFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); if (locationBuilder_ == null) { @@ -1200,10 +1164,6 @@ public final class DbIssues { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonar.db.protobuf.DbIssues.internal_static_sonarqube_db_issues_Flow_descriptor; @@ -1274,7 +1234,8 @@ public final class DbIssues { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -1544,12 +1505,44 @@ public final class DbIssues { // @@protoc_insertion_point(builder_scope:sonarqube.db.issues.Flow) } + // @@protoc_insertion_point(class_scope:sonarqube.db.issues.Flow) + private static final org.sonar.db.protobuf.DbIssues.Flow DEFAULT_INSTANCE; static { - defaultInstance = new Flow(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.db.protobuf.DbIssues.Flow(); + } + + public static org.sonar.db.protobuf.DbIssues.Flow getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Flow parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Flow(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.db.protobuf.DbIssues.Flow getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.db.issues.Flow) } public interface LocationOrBuilder extends @@ -1612,37 +1605,28 @@ public final class DbIssues { /** * Protobuf type {@code sonarqube.db.issues.Location} */ - public static final class Location extends + public static final class Location extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.db.issues.Location) LocationOrBuilder { // Use Location.newBuilder() to construct. - private Location(com.google.protobuf.GeneratedMessage.Builder builder) { + private Location(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private Location(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Location defaultInstance; - public static Location getDefaultInstance() { - return defaultInstance; - } - - public Location getDefaultInstanceForType() { - return defaultInstance; + private Location() { + componentId_ = ""; + msg_ = ""; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Location( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -1689,10 +1673,11 @@ public final class DbIssues { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -1710,24 +1695,9 @@ public final class DbIssues { org.sonar.db.protobuf.DbIssues.Location.class, org.sonar.db.protobuf.DbIssues.Location.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Location parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Location(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int COMPONENT_ID_FIELD_NUMBER = 1; - private java.lang.Object componentId_; + private volatile java.lang.Object componentId_; /** * optional string component_id = 1; */ @@ -1788,7 +1758,7 @@ public final class DbIssues { * */ public org.sonar.db.protobuf.DbCommons.TextRange getTextRange() { - return textRange_; + return textRange_ == null ? org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance() : textRange_; } /** * optional .sonarqube.db.commons.TextRange text_range = 2; @@ -1798,11 +1768,11 @@ public final class DbIssues { * */ public org.sonar.db.protobuf.DbCommons.TextRangeOrBuilder getTextRangeOrBuilder() { - return textRange_; + return textRange_ == null ? org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance() : textRange_; } public static final int MSG_FIELD_NUMBER = 3; - private java.lang.Object msg_; + private volatile java.lang.Object msg_; /** * optional string msg = 3; */ @@ -1843,11 +1813,6 @@ public final class DbIssues { } } - private void initFields() { - componentId_ = ""; - textRange_ = org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance(); - msg_ = ""; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -1860,17 +1825,16 @@ public final class DbIssues { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getComponentIdBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, textRange_); + output.writeMessage(2, getTextRange()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getMsgBytes()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -1885,24 +1849,18 @@ public final class DbIssues { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, textRange_); + .computeMessageSize(2, getTextRange()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getMsgBytes()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.db.protobuf.DbIssues.Location parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1956,12 +1914,17 @@ public final class DbIssues { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonar.db.protobuf.DbIssues.Location prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -2003,16 +1966,12 @@ public final class DbIssues { getTextRangeFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); componentId_ = ""; bitField0_ = (bitField0_ & ~0x00000001); if (textRangeBuilder_ == null) { - textRange_ = org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance(); + textRange_ = null; } else { textRangeBuilder_.clear(); } @@ -2022,10 +1981,6 @@ public final class DbIssues { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonar.db.protobuf.DbIssues.internal_static_sonarqube_db_issues_Location_descriptor; @@ -2092,7 +2047,8 @@ public final class DbIssues { msg_ = other.msg_; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -2195,7 +2151,7 @@ public final class DbIssues { return this; } - private org.sonar.db.protobuf.DbCommons.TextRange textRange_ = org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance(); + private org.sonar.db.protobuf.DbCommons.TextRange textRange_ = null; private com.google.protobuf.SingleFieldBuilder< org.sonar.db.protobuf.DbCommons.TextRange, org.sonar.db.protobuf.DbCommons.TextRange.Builder, org.sonar.db.protobuf.DbCommons.TextRangeOrBuilder> textRangeBuilder_; /** @@ -2217,7 +2173,7 @@ public final class DbIssues { */ public org.sonar.db.protobuf.DbCommons.TextRange getTextRange() { if (textRangeBuilder_ == null) { - return textRange_; + return textRange_ == null ? org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance() : textRange_; } else { return textRangeBuilder_.getMessage(); } @@ -2270,6 +2226,7 @@ public final class DbIssues { public Builder mergeTextRange(org.sonar.db.protobuf.DbCommons.TextRange value) { if (textRangeBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && + textRange_ != null && textRange_ != org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance()) { textRange_ = org.sonar.db.protobuf.DbCommons.TextRange.newBuilder(textRange_).mergeFrom(value).buildPartial(); @@ -2292,7 +2249,7 @@ public final class DbIssues { */ public Builder clearTextRange() { if (textRangeBuilder_ == null) { - textRange_ = org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance(); + textRange_ = null; onChanged(); } else { textRangeBuilder_.clear(); @@ -2323,7 +2280,8 @@ public final class DbIssues { if (textRangeBuilder_ != null) { return textRangeBuilder_.getMessageOrBuilder(); } else { - return textRange_; + return textRange_ == null ? + org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance() : textRange_; } } /** @@ -2426,25 +2384,57 @@ public final class DbIssues { // @@protoc_insertion_point(builder_scope:sonarqube.db.issues.Location) } + // @@protoc_insertion_point(class_scope:sonarqube.db.issues.Location) + private static final org.sonar.db.protobuf.DbIssues.Location DEFAULT_INSTANCE; static { - defaultInstance = new Location(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonar.db.protobuf.DbIssues.Location(); + } + + public static org.sonar.db.protobuf.DbIssues.Location getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Location parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Location(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonar.db.protobuf.DbIssues.Location getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.db.issues.Location) } - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_db_issues_Locations_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_db_issues_Locations_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_db_issues_Flow_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_db_issues_Flow_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_db_issues_Location_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable diff --git a/sonar-ws/src/main/gen-java/org/sonarqube/ws/Common.java b/sonar-ws/src/main/gen-java/org/sonarqube/ws/Common.java index 910a5297e82..7483d52b914 100644 --- a/sonar-ws/src/main/gen-java/org/sonarqube/ws/Common.java +++ b/sonar-ws/src/main/gen-java/org/sonarqube/ws/Common.java @@ -57,7 +57,9 @@ public final class Common { 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) { @@ -158,7 +160,9 @@ public final class Common { public static final int REMOVED_VALUE = 3; - public final int getNumber() { return value; } + public final int getNumber() { + return value; + } public static RuleStatus valueOf(int value) { switch (value) { @@ -251,37 +255,29 @@ public final class Common { /** * Protobuf type {@code sonarqube.ws.commons.Paging} */ - public static final class Paging extends + public static final class Paging extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.commons.Paging) PagingOrBuilder { // Use Paging.newBuilder() to construct. - private Paging(com.google.protobuf.GeneratedMessage.Builder builder) { + private Paging(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Paging(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Paging defaultInstance; - public static Paging getDefaultInstance() { - return defaultInstance; } - - public Paging getDefaultInstanceForType() { - return defaultInstance; + private Paging() { + pageIndex_ = 0; + pageSize_ = 0; + total_ = 0; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Paging( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -318,10 +314,11 @@ public final class Common { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -339,21 +336,6 @@ public final class Common { org.sonarqube.ws.Common.Paging.class, org.sonarqube.ws.Common.Paging.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Paging parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Paging(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int PAGEINDEX_FIELD_NUMBER = 1; private int pageIndex_; @@ -400,11 +382,6 @@ public final class Common { return total_; } - private void initFields() { - pageIndex_ = 0; - pageSize_ = 0; - total_ = 0; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -417,7 +394,6 @@ public final class Common { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt32(1, pageIndex_); } @@ -427,7 +403,7 @@ public final class Common { if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeInt32(3, total_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -448,18 +424,12 @@ public final class Common { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, total_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Common.Paging parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -513,12 +483,17 @@ public final class Common { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Common.Paging prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -559,10 +534,6 @@ public final class Common { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); pageIndex_ = 0; @@ -574,10 +545,6 @@ public final class Common { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Common.internal_static_sonarqube_ws_commons_Paging_descriptor; @@ -636,7 +603,8 @@ public final class Common { if (other.hasTotal()) { setTotal(other.getTotal()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -762,12 +730,44 @@ public final class Common { // @@protoc_insertion_point(builder_scope:sonarqube.ws.commons.Paging) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.commons.Paging) + private static final org.sonarqube.ws.Common.Paging DEFAULT_INSTANCE; static { - defaultInstance = new Paging(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Common.Paging(); + } + + public static org.sonarqube.ws.Common.Paging getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Paging parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Paging(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Common.Paging getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.commons.Paging) } public interface FacetOrBuilder extends @@ -827,37 +827,28 @@ public final class Common { /** * Protobuf type {@code sonarqube.ws.commons.Facet} */ - public static final class Facet extends + public static final class Facet extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.commons.Facet) FacetOrBuilder { // Use Facet.newBuilder() to construct. - private Facet(com.google.protobuf.GeneratedMessage.Builder builder) { + private Facet(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private Facet(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Facet defaultInstance; - public static Facet getDefaultInstance() { - return defaultInstance; - } - - public Facet getDefaultInstanceForType() { - return defaultInstance; + private Facet() { + property_ = ""; + values_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Facet( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -893,10 +884,11 @@ public final class Common { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { values_ = java.util.Collections.unmodifiableList(values_); @@ -917,24 +909,9 @@ public final class Common { org.sonarqube.ws.Common.Facet.class, org.sonarqube.ws.Common.Facet.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Facet parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Facet(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int PROPERTY_FIELD_NUMBER = 1; - private java.lang.Object property_; + private volatile java.lang.Object property_; /** * optional string property = 1; * @@ -1022,10 +999,6 @@ public final class Common { return values_.get(index); } - private void initFields() { - property_ = ""; - values_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -1038,14 +1011,13 @@ public final class Common { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getPropertyBytes()); } for (int i = 0; i < values_.size(); i++) { output.writeMessage(2, values_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -1062,18 +1034,12 @@ public final class Common { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, values_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Common.Facet parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1127,12 +1093,17 @@ public final class Common { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Common.Facet prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -1174,10 +1145,6 @@ public final class Common { getValuesFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); property_ = ""; @@ -1191,10 +1158,6 @@ public final class Common { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Common.internal_static_sonarqube_ws_commons_Facet_descriptor; @@ -1276,7 +1239,8 @@ public final class Common { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -1646,12 +1610,44 @@ public final class Common { // @@protoc_insertion_point(builder_scope:sonarqube.ws.commons.Facet) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.commons.Facet) + private static final org.sonarqube.ws.Common.Facet DEFAULT_INSTANCE; static { - defaultInstance = new Facet(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Common.Facet(); + } + + public static org.sonarqube.ws.Common.Facet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Facet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Facet(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Common.Facet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.commons.Facet) } public interface FacetValueOrBuilder extends @@ -1684,37 +1680,28 @@ public final class Common { /** * Protobuf type {@code sonarqube.ws.commons.FacetValue} */ - public static final class FacetValue extends + public static final class FacetValue extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.commons.FacetValue) FacetValueOrBuilder { // Use FacetValue.newBuilder() to construct. - private FacetValue(com.google.protobuf.GeneratedMessage.Builder builder) { + private FacetValue(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private FacetValue(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final FacetValue defaultInstance; - public static FacetValue getDefaultInstance() { - return defaultInstance; - } - - public FacetValue getDefaultInstanceForType() { - return defaultInstance; + private FacetValue() { + val_ = ""; + count_ = 0L; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private FacetValue( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -1747,10 +1734,11 @@ public final class Common { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -1768,24 +1756,9 @@ public final class Common { org.sonarqube.ws.Common.FacetValue.class, org.sonarqube.ws.Common.FacetValue.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public FacetValue parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FacetValue(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int VAL_FIELD_NUMBER = 1; - private java.lang.Object val_; + private volatile java.lang.Object val_; /** * optional string val = 1; */ @@ -1841,10 +1814,6 @@ public final class Common { return count_; } - private void initFields() { - val_ = ""; - count_ = 0L; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -1857,14 +1826,13 @@ public final class Common { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getValBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeInt64(2, count_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -1881,18 +1849,12 @@ public final class Common { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, count_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Common.FacetValue parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1946,12 +1908,17 @@ public final class Common { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Common.FacetValue prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -1992,10 +1959,6 @@ public final class Common { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); val_ = ""; @@ -2005,10 +1968,6 @@ public final class Common { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Common.internal_static_sonarqube_ws_commons_FacetValue_descriptor; @@ -2062,7 +2021,8 @@ public final class Common { if (other.hasCount()) { setCount(other.getCount()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -2200,12 +2160,44 @@ public final class Common { // @@protoc_insertion_point(builder_scope:sonarqube.ws.commons.FacetValue) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.commons.FacetValue) + private static final org.sonarqube.ws.Common.FacetValue DEFAULT_INSTANCE; static { - defaultInstance = new FacetValue(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Common.FacetValue(); + } + + public static org.sonarqube.ws.Common.FacetValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public FacetValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new FacetValue(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Common.FacetValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.commons.FacetValue) } public interface RuleOrBuilder extends @@ -2280,37 +2272,31 @@ public final class Common { /** * Protobuf type {@code sonarqube.ws.commons.Rule} */ - public static final class Rule extends + public static final class Rule extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.commons.Rule) RuleOrBuilder { // Use Rule.newBuilder() to construct. - private Rule(com.google.protobuf.GeneratedMessage.Builder builder) { + private Rule(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Rule(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Rule defaultInstance; - public static Rule getDefaultInstance() { - return defaultInstance; } - - public Rule getDefaultInstanceForType() { - return defaultInstance; + private Rule() { + key_ = ""; + name_ = ""; + lang_ = ""; + status_ = 0; + langName_ = ""; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Rule( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -2354,7 +2340,7 @@ public final class Common { unknownFields.mergeVarintField(4, rawValue); } else { bitField0_ |= 0x00000008; - status_ = value; + status_ = rawValue; } break; } @@ -2367,10 +2353,11 @@ public final class Common { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -2388,24 +2375,9 @@ public final class Common { org.sonarqube.ws.Common.Rule.class, org.sonarqube.ws.Common.Rule.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Rule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Rule(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int KEY_FIELD_NUMBER = 1; - private java.lang.Object key_; + private volatile java.lang.Object key_; /** * optional string key = 1; */ @@ -2447,7 +2419,7 @@ public final class Common { } public static final int NAME_FIELD_NUMBER = 2; - private java.lang.Object name_; + private volatile java.lang.Object name_; /** * optional string name = 2; */ @@ -2489,7 +2461,7 @@ public final class Common { } public static final int LANG_FIELD_NUMBER = 3; - private java.lang.Object lang_; + private volatile java.lang.Object lang_; /** * optional string lang = 3; */ @@ -2531,7 +2503,7 @@ public final class Common { } public static final int STATUS_FIELD_NUMBER = 4; - private org.sonarqube.ws.Common.RuleStatus status_; + private int status_; /** * optional .sonarqube.ws.commons.RuleStatus status = 4; */ @@ -2542,11 +2514,12 @@ public final class Common { * optional .sonarqube.ws.commons.RuleStatus status = 4; */ public org.sonarqube.ws.Common.RuleStatus getStatus() { - return status_; + org.sonarqube.ws.Common.RuleStatus result = org.sonarqube.ws.Common.RuleStatus.valueOf(status_); + return result == null ? org.sonarqube.ws.Common.RuleStatus.BETA : result; } public static final int LANGNAME_FIELD_NUMBER = 5; - private java.lang.Object langName_; + private volatile java.lang.Object langName_; /** * optional string langName = 5; */ @@ -2587,13 +2560,6 @@ public final class Common { } } - private void initFields() { - key_ = ""; - name_ = ""; - lang_ = ""; - status_ = org.sonarqube.ws.Common.RuleStatus.BETA; - langName_ = ""; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -2606,7 +2572,6 @@ public final class Common { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getKeyBytes()); } @@ -2617,12 +2582,12 @@ public final class Common { output.writeBytes(3, getLangBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeEnum(4, status_.getNumber()); + output.writeEnum(4, status_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(5, getLangNameBytes()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -2645,24 +2610,18 @@ public final class Common { } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, status_.getNumber()); + .computeEnumSize(4, status_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(5, getLangNameBytes()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Common.Rule parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -2716,12 +2675,17 @@ public final class Common { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Common.Rule prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -2762,10 +2726,6 @@ public final class Common { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); key_ = ""; @@ -2774,17 +2734,13 @@ public final class Common { bitField0_ = (bitField0_ & ~0x00000002); lang_ = ""; bitField0_ = (bitField0_ & ~0x00000004); - status_ = org.sonarqube.ws.Common.RuleStatus.BETA; + status_ = 0; bitField0_ = (bitField0_ & ~0x00000008); langName_ = ""; bitField0_ = (bitField0_ & ~0x00000010); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Common.internal_static_sonarqube_ws_commons_Rule_descriptor; @@ -2865,7 +2821,8 @@ public final class Common { langName_ = other.langName_; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -3120,7 +3077,7 @@ public final class Common { return this; } - private org.sonarqube.ws.Common.RuleStatus status_ = org.sonarqube.ws.Common.RuleStatus.BETA; + private int status_ = 0; /** * optional .sonarqube.ws.commons.RuleStatus status = 4; */ @@ -3131,7 +3088,8 @@ public final class Common { * optional .sonarqube.ws.commons.RuleStatus status = 4; */ public org.sonarqube.ws.Common.RuleStatus getStatus() { - return status_; + org.sonarqube.ws.Common.RuleStatus result = org.sonarqube.ws.Common.RuleStatus.valueOf(status_); + return result == null ? org.sonarqube.ws.Common.RuleStatus.BETA : result; } /** * optional .sonarqube.ws.commons.RuleStatus status = 4; @@ -3141,7 +3099,7 @@ public final class Common { throw new NullPointerException(); } bitField0_ |= 0x00000008; - status_ = value; + status_ = value.getNumber(); onChanged(); return this; } @@ -3150,7 +3108,7 @@ public final class Common { */ public Builder clearStatus() { bitField0_ = (bitField0_ & ~0x00000008); - status_ = org.sonarqube.ws.Common.RuleStatus.BETA; + status_ = 0; onChanged(); return this; } @@ -3234,12 +3192,44 @@ public final class Common { // @@protoc_insertion_point(builder_scope:sonarqube.ws.commons.Rule) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.commons.Rule) + private static final org.sonarqube.ws.Common.Rule DEFAULT_INSTANCE; static { - defaultInstance = new Rule(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Common.Rule(); + } + + public static org.sonarqube.ws.Common.Rule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Rule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Rule(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Common.Rule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.commons.Rule) } public interface UserOrBuilder extends @@ -3300,37 +3290,30 @@ public final class Common { /** * Protobuf type {@code sonarqube.ws.commons.User} */ - public static final class User extends + public static final class User extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.commons.User) UserOrBuilder { // Use User.newBuilder() to construct. - private User(com.google.protobuf.GeneratedMessage.Builder builder) { + private User(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private User(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final User defaultInstance; - public static User getDefaultInstance() { - return defaultInstance; } - - public User getDefaultInstanceForType() { - return defaultInstance; + private User() { + login_ = ""; + name_ = ""; + email_ = ""; + active_ = false; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private User( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -3375,10 +3358,11 @@ public final class Common { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -3396,24 +3380,9 @@ public final class Common { org.sonarqube.ws.Common.User.class, org.sonarqube.ws.Common.User.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public User parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new User(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int LOGIN_FIELD_NUMBER = 1; - private java.lang.Object login_; + private volatile java.lang.Object login_; /** * optional string login = 1; */ @@ -3455,7 +3424,7 @@ public final class Common { } public static final int NAME_FIELD_NUMBER = 2; - private java.lang.Object name_; + private volatile java.lang.Object name_; /** * optional string name = 2; */ @@ -3497,7 +3466,7 @@ public final class Common { } public static final int EMAIL_FIELD_NUMBER = 3; - private java.lang.Object email_; + private volatile java.lang.Object email_; /** * optional string email = 3; */ @@ -3553,12 +3522,6 @@ public final class Common { return active_; } - private void initFields() { - login_ = ""; - name_ = ""; - email_ = ""; - active_ = false; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -3571,7 +3534,6 @@ public final class Common { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getLoginBytes()); } @@ -3584,7 +3546,7 @@ public final class Common { if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBool(4, active_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -3609,18 +3571,12 @@ public final class Common { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, active_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Common.User parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -3674,12 +3630,17 @@ public final class Common { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Common.User prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -3720,10 +3681,6 @@ public final class Common { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); login_ = ""; @@ -3737,10 +3694,6 @@ public final class Common { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Common.internal_static_sonarqube_ws_commons_User_descriptor; @@ -3812,7 +3765,8 @@ public final class Common { if (other.hasActive()) { setActive(other.getActive()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -4102,12 +4056,44 @@ public final class Common { // @@protoc_insertion_point(builder_scope:sonarqube.ws.commons.User) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.commons.User) + private static final org.sonarqube.ws.Common.User DEFAULT_INSTANCE; static { - defaultInstance = new User(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Common.User(); + } + + public static org.sonarqube.ws.Common.User getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public User parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new User(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Common.User getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.commons.User) } public interface TextRangeOrBuilder extends @@ -4189,37 +4175,30 @@ public final class Common { * Lines start at 1 and line offsets start at 0 * */ - public static final class TextRange extends + public static final class TextRange extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.commons.TextRange) TextRangeOrBuilder { // Use TextRange.newBuilder() to construct. - private TextRange(com.google.protobuf.GeneratedMessage.Builder builder) { + private TextRange(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private TextRange(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final TextRange defaultInstance; - public static TextRange getDefaultInstance() { - return defaultInstance; - } - - public TextRange getDefaultInstanceForType() { - return defaultInstance; + private TextRange() { + startLine_ = 0; + endLine_ = 0; + startOffset_ = 0; + endOffset_ = 0; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private TextRange( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -4261,10 +4240,11 @@ public final class Common { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -4282,21 +4262,6 @@ public final class Common { org.sonarqube.ws.Common.TextRange.class, org.sonarqube.ws.Common.TextRange.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public TextRange parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextRange(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int STARTLINE_FIELD_NUMBER = 1; private int startLine_; @@ -4390,12 +4355,6 @@ public final class Common { return endOffset_; } - private void initFields() { - startLine_ = 0; - endLine_ = 0; - startOffset_ = 0; - endOffset_ = 0; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -4408,7 +4367,6 @@ public final class Common { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt32(1, startLine_); } @@ -4421,7 +4379,7 @@ public final class Common { if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeInt32(4, endOffset_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -4446,18 +4404,12 @@ public final class Common { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, endOffset_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Common.TextRange parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -4511,12 +4463,17 @@ public final class Common { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Common.TextRange prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -4561,10 +4518,6 @@ public final class Common { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); startLine_ = 0; @@ -4578,10 +4531,6 @@ public final class Common { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Common.internal_static_sonarqube_ws_commons_TextRange_descriptor; @@ -4647,7 +4596,8 @@ public final class Common { if (other.hasEndOffset()) { setEndOffset(other.getEndOffset()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -4869,40 +4819,72 @@ public final class Common { // @@protoc_insertion_point(builder_scope:sonarqube.ws.commons.TextRange) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.commons.TextRange) + private static final org.sonarqube.ws.Common.TextRange DEFAULT_INSTANCE; static { - defaultInstance = new TextRange(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Common.TextRange(); + } + + public static org.sonarqube.ws.Common.TextRange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public TextRange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new TextRange(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Common.TextRange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.commons.TextRange) } - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_commons_Paging_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_commons_Paging_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_commons_Facet_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_commons_Facet_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_commons_FacetValue_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_commons_FacetValue_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_commons_Rule_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_commons_Rule_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_commons_User_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_commons_User_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_commons_TextRange_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable diff --git a/sonar-ws/src/main/gen-java/org/sonarqube/ws/Issues.java b/sonar-ws/src/main/gen-java/org/sonarqube/ws/Issues.java index a53e9de74f1..413930f7f09 100644 --- a/sonar-ws/src/main/gen-java/org/sonarqube/ws/Issues.java +++ b/sonar-ws/src/main/gen-java/org/sonarqube/ws/Issues.java @@ -289,37 +289,42 @@ public final class Issues { * Response of GET api/issues/search * */ - public static final class Search extends + public static final class Search extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.issues.Search) SearchOrBuilder { // Use Search.newBuilder() to construct. - private Search(com.google.protobuf.GeneratedMessage.Builder builder) { + private Search(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private Search(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Search defaultInstance; - public static Search getDefaultInstance() { - return defaultInstance; - } - - public Search getDefaultInstanceForType() { - return defaultInstance; + private Search() { + total_ = 0L; + p_ = 0L; + ps_ = 0; + debtTotal_ = 0L; + issues_ = java.util.Collections.emptyList(); + components_ = java.util.Collections.emptyList(); + rulesPresentIfEmpty_ = false; + rules_ = java.util.Collections.emptyList(); + usersPresentIfEmpty_ = false; + users_ = java.util.Collections.emptyList(); + actionPlansPresentIfEmpty_ = false; + actionPlans_ = java.util.Collections.emptyList(); + languagesPresentIfEmpty_ = false; + languages_ = java.util.Collections.emptyList(); + facetsPresentIfEmpty_ = false; + facets_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Search( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -455,10 +460,11 @@ public final class Issues { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { issues_ = java.util.Collections.unmodifiableList(issues_); @@ -497,21 +503,6 @@ public final class Issues { org.sonarqube.ws.Issues.Search.class, org.sonarqube.ws.Issues.Search.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Search parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Search(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int TOTAL_FIELD_NUMBER = 1; private long total_; @@ -570,13 +561,13 @@ public final class Issues { * optional .sonarqube.ws.commons.Paging paging = 4; */ public org.sonarqube.ws.Common.Paging getPaging() { - return paging_; + return paging_ == null ? org.sonarqube.ws.Common.Paging.getDefaultInstance() : paging_; } /** * optional .sonarqube.ws.commons.Paging paging = 4; */ public org.sonarqube.ws.Common.PagingOrBuilder getPagingOrBuilder() { - return paging_; + return paging_ == null ? org.sonarqube.ws.Common.Paging.getDefaultInstance() : paging_; } public static final int DEBTTOTAL_FIELD_NUMBER = 5; @@ -922,25 +913,6 @@ public final class Issues { return facets_.get(index); } - private void initFields() { - total_ = 0L; - p_ = 0L; - ps_ = 0; - paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); - debtTotal_ = 0L; - issues_ = java.util.Collections.emptyList(); - components_ = java.util.Collections.emptyList(); - rulesPresentIfEmpty_ = false; - rules_ = java.util.Collections.emptyList(); - usersPresentIfEmpty_ = false; - users_ = java.util.Collections.emptyList(); - actionPlansPresentIfEmpty_ = false; - actionPlans_ = java.util.Collections.emptyList(); - languagesPresentIfEmpty_ = false; - languages_ = java.util.Collections.emptyList(); - facetsPresentIfEmpty_ = false; - facets_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -953,7 +925,6 @@ public final class Issues { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt64(1, total_); } @@ -964,7 +935,7 @@ public final class Issues { output.writeInt32(3, ps_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(4, paging_); + output.writeMessage(4, getPaging()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeInt64(5, debtTotal_); @@ -1005,7 +976,7 @@ public final class Issues { for (int i = 0; i < facets_.size(); i++) { output.writeMessage(17, facets_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -1028,7 +999,7 @@ public final class Issues { } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, paging_); + .computeMessageSize(4, getPaging()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream @@ -1082,18 +1053,12 @@ public final class Issues { size += com.google.protobuf.CodedOutputStream .computeMessageSize(17, facets_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Issues.Search parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1147,12 +1112,17 @@ public final class Issues { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Issues.Search prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -1205,10 +1175,6 @@ public final class Issues { getFacetsFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); total_ = 0L; @@ -1218,7 +1184,7 @@ public final class Issues { ps_ = 0; bitField0_ = (bitField0_ & ~0x00000004); if (pagingBuilder_ == null) { - paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); + paging_ = null; } else { pagingBuilder_.clear(); } @@ -1280,10 +1246,6 @@ public final class Issues { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Search_descriptor; @@ -1640,7 +1602,8 @@ public final class Issues { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -1763,7 +1726,7 @@ public final class Issues { return this; } - private org.sonarqube.ws.Common.Paging paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); + private org.sonarqube.ws.Common.Paging paging_ = null; private com.google.protobuf.SingleFieldBuilder< org.sonarqube.ws.Common.Paging, org.sonarqube.ws.Common.Paging.Builder, org.sonarqube.ws.Common.PagingOrBuilder> pagingBuilder_; /** @@ -1777,7 +1740,7 @@ public final class Issues { */ public org.sonarqube.ws.Common.Paging getPaging() { if (pagingBuilder_ == null) { - return paging_; + return paging_ == null ? org.sonarqube.ws.Common.Paging.getDefaultInstance() : paging_; } else { return pagingBuilder_.getMessage(); } @@ -1818,6 +1781,7 @@ public final class Issues { public Builder mergePaging(org.sonarqube.ws.Common.Paging value) { if (pagingBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008) && + paging_ != null && paging_ != org.sonarqube.ws.Common.Paging.getDefaultInstance()) { paging_ = org.sonarqube.ws.Common.Paging.newBuilder(paging_).mergeFrom(value).buildPartial(); @@ -1836,7 +1800,7 @@ public final class Issues { */ public Builder clearPaging() { if (pagingBuilder_ == null) { - paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); + paging_ = null; onChanged(); } else { pagingBuilder_.clear(); @@ -1859,7 +1823,8 @@ public final class Issues { if (pagingBuilder_ != null) { return pagingBuilder_.getMessageOrBuilder(); } else { - return paging_; + return paging_ == null ? + org.sonarqube.ws.Common.Paging.getDefaultInstance() : paging_; } } /** @@ -3770,12 +3735,44 @@ public final class Issues { // @@protoc_insertion_point(builder_scope:sonarqube.ws.issues.Search) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Search) + private static final org.sonarqube.ws.Issues.Search DEFAULT_INSTANCE; static { - defaultInstance = new Search(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Issues.Search(); + } + + public static org.sonarqube.ws.Issues.Search getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Search parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Search(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Issues.Search getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Search) } public interface OperationOrBuilder extends @@ -3898,37 +3895,30 @@ public final class Issues { * Response of most of POST/issues/{operation}, for instance assign, add_comment and set_severity * */ - public static final class Operation extends + public static final class Operation extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.issues.Operation) OperationOrBuilder { // Use Operation.newBuilder() to construct. - private Operation(com.google.protobuf.GeneratedMessage.Builder builder) { + private Operation(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Operation(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Operation defaultInstance; - public static Operation getDefaultInstance() { - return defaultInstance; } - - public Operation getDefaultInstanceForType() { - return defaultInstance; + private Operation() { + components_ = java.util.Collections.emptyList(); + rules_ = java.util.Collections.emptyList(); + users_ = java.util.Collections.emptyList(); + actionPlans_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Operation( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -3995,10 +3985,11 @@ public final class Issues { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { components_ = java.util.Collections.unmodifiableList(components_); @@ -4028,21 +4019,6 @@ public final class Issues { org.sonarqube.ws.Issues.Operation.class, org.sonarqube.ws.Issues.Operation.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Operation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Operation(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int ISSUE_FIELD_NUMBER = 1; private org.sonarqube.ws.Issues.Issue issue_; @@ -4056,13 +4032,13 @@ public final class Issues { * optional .sonarqube.ws.issues.Issue issue = 1; */ public org.sonarqube.ws.Issues.Issue getIssue() { - return issue_; + return issue_ == null ? org.sonarqube.ws.Issues.Issue.getDefaultInstance() : issue_; } /** * optional .sonarqube.ws.issues.Issue issue = 1; */ public org.sonarqube.ws.Issues.IssueOrBuilder getIssueOrBuilder() { - return issue_; + return issue_ == null ? org.sonarqube.ws.Issues.Issue.getDefaultInstance() : issue_; } public static final int COMPONENTS_FIELD_NUMBER = 2; @@ -4205,13 +4181,6 @@ public final class Issues { return actionPlans_.get(index); } - private void initFields() { - issue_ = org.sonarqube.ws.Issues.Issue.getDefaultInstance(); - components_ = java.util.Collections.emptyList(); - rules_ = java.util.Collections.emptyList(); - users_ = java.util.Collections.emptyList(); - actionPlans_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -4224,9 +4193,8 @@ public final class Issues { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, issue_); + output.writeMessage(1, getIssue()); } for (int i = 0; i < components_.size(); i++) { output.writeMessage(2, components_.get(i)); @@ -4240,7 +4208,7 @@ public final class Issues { for (int i = 0; i < actionPlans_.size(); i++) { output.writeMessage(5, actionPlans_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -4251,7 +4219,7 @@ public final class Issues { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, issue_); + .computeMessageSize(1, getIssue()); } for (int i = 0; i < components_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -4269,18 +4237,12 @@ public final class Issues { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, actionPlans_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Issues.Operation parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -4334,12 +4296,17 @@ public final class Issues { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Issues.Operation prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -4389,14 +4356,10 @@ public final class Issues { getActionPlansFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); if (issueBuilder_ == null) { - issue_ = org.sonarqube.ws.Issues.Issue.getDefaultInstance(); + issue_ = null; } else { issueBuilder_.clear(); } @@ -4428,10 +4391,6 @@ public final class Issues { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Operation_descriptor; @@ -4620,7 +4579,8 @@ public final class Issues { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -4647,7 +4607,7 @@ public final class Issues { } private int bitField0_; - private org.sonarqube.ws.Issues.Issue issue_ = org.sonarqube.ws.Issues.Issue.getDefaultInstance(); + private org.sonarqube.ws.Issues.Issue issue_ = null; private com.google.protobuf.SingleFieldBuilder< org.sonarqube.ws.Issues.Issue, org.sonarqube.ws.Issues.Issue.Builder, org.sonarqube.ws.Issues.IssueOrBuilder> issueBuilder_; /** @@ -4661,7 +4621,7 @@ public final class Issues { */ public org.sonarqube.ws.Issues.Issue getIssue() { if (issueBuilder_ == null) { - return issue_; + return issue_ == null ? org.sonarqube.ws.Issues.Issue.getDefaultInstance() : issue_; } else { return issueBuilder_.getMessage(); } @@ -4702,6 +4662,7 @@ public final class Issues { public Builder mergeIssue(org.sonarqube.ws.Issues.Issue value) { if (issueBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && + issue_ != null && issue_ != org.sonarqube.ws.Issues.Issue.getDefaultInstance()) { issue_ = org.sonarqube.ws.Issues.Issue.newBuilder(issue_).mergeFrom(value).buildPartial(); @@ -4720,7 +4681,7 @@ public final class Issues { */ public Builder clearIssue() { if (issueBuilder_ == null) { - issue_ = org.sonarqube.ws.Issues.Issue.getDefaultInstance(); + issue_ = null; onChanged(); } else { issueBuilder_.clear(); @@ -4743,7 +4704,8 @@ public final class Issues { if (issueBuilder_ != null) { return issueBuilder_.getMessageOrBuilder(); } else { - return issue_; + return issue_ == null ? + org.sonarqube.ws.Issues.Issue.getDefaultInstance() : issue_; } } /** @@ -5726,12 +5688,44 @@ public final class Issues { // @@protoc_insertion_point(builder_scope:sonarqube.ws.issues.Operation) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Operation) + private static final org.sonarqube.ws.Issues.Operation DEFAULT_INSTANCE; static { - defaultInstance = new Operation(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Issues.Operation(); + } + + public static org.sonarqube.ws.Issues.Operation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Operation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Operation(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Issues.Operation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Operation) } public interface IssueOrBuilder extends @@ -6188,37 +6182,55 @@ public final class Issues { /** * Protobuf type {@code sonarqube.ws.issues.Issue} */ - public static final class Issue extends + public static final class Issue extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.issues.Issue) IssueOrBuilder { // Use Issue.newBuilder() to construct. - private Issue(com.google.protobuf.GeneratedMessage.Builder builder) { + 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 static final Issue defaultInstance; - public static Issue getDefaultInstance() { - return defaultInstance; - } - - public Issue getDefaultInstanceForType() { - return defaultInstance; + private Issue() { + key_ = ""; + rule_ = ""; + severity_ = 0; + component_ = ""; + componentId_ = 0L; + project_ = ""; + subProject_ = ""; + line_ = 0; + flows_ = java.util.Collections.emptyList(); + resolution_ = ""; + status_ = ""; + message_ = ""; + debt_ = ""; + assignee_ = ""; + reporter_ = ""; + author_ = ""; + actionPlan_ = ""; + tagsPresentIfEmpty_ = false; + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + transitionsPresentIfEmpty_ = false; + transitions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + actionsPresentIfEmpty_ = false; + actions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + commentsPresentIfEmpty_ = false; + comments_ = java.util.Collections.emptyList(); + creationDate_ = ""; + updateDate_ = ""; + fUpdateAge_ = ""; + closeDate_ = ""; } - 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 { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -6256,7 +6268,7 @@ public final class Issues { unknownFields.mergeVarintField(3, rawValue); } else { bitField0_ |= 0x00000004; - severity_ = value; + severity_ = rawValue; } break; } @@ -6439,10 +6451,11 @@ public final class Issues { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) { flows_ = java.util.Collections.unmodifiableList(flows_); @@ -6475,24 +6488,9 @@ public final class Issues { org.sonarqube.ws.Issues.Issue.class, org.sonarqube.ws.Issues.Issue.Builder.class); } - public static com.google.protobuf.Parser PARSER = - 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); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int KEY_FIELD_NUMBER = 1; - private java.lang.Object key_; + private volatile java.lang.Object key_; /** * optional string key = 1; */ @@ -6534,7 +6532,7 @@ public final class Issues { } public static final int RULE_FIELD_NUMBER = 2; - private java.lang.Object rule_; + private volatile java.lang.Object rule_; /** * optional string rule = 2; */ @@ -6576,7 +6574,7 @@ public final class Issues { } public static final int SEVERITY_FIELD_NUMBER = 3; - private org.sonarqube.ws.Common.Severity severity_; + private int severity_; /** * optional .sonarqube.ws.commons.Severity severity = 3; */ @@ -6587,11 +6585,12 @@ public final class Issues { * optional .sonarqube.ws.commons.Severity severity = 3; */ public org.sonarqube.ws.Common.Severity getSeverity() { - return severity_; + org.sonarqube.ws.Common.Severity result = org.sonarqube.ws.Common.Severity.valueOf(severity_); + return result == null ? org.sonarqube.ws.Common.Severity.INFO : result; } public static final int COMPONENT_FIELD_NUMBER = 4; - private java.lang.Object component_; + private volatile java.lang.Object component_; /** * optional string component = 4; */ @@ -6648,7 +6647,7 @@ public final class Issues { } public static final int PROJECT_FIELD_NUMBER = 6; - private java.lang.Object project_; + private volatile java.lang.Object project_; /** * optional string project = 6; */ @@ -6690,7 +6689,7 @@ public final class Issues { } public static final int SUBPROJECT_FIELD_NUMBER = 7; - private java.lang.Object subProject_; + private volatile java.lang.Object subProject_; /** * optional string subProject = 7; */ @@ -6758,13 +6757,13 @@ public final class Issues { * optional .sonarqube.ws.commons.TextRange textRange = 9; */ public org.sonarqube.ws.Common.TextRange getTextRange() { - return textRange_; + return textRange_ == null ? org.sonarqube.ws.Common.TextRange.getDefaultInstance() : textRange_; } /** * optional .sonarqube.ws.commons.TextRange textRange = 9; */ public org.sonarqube.ws.Common.TextRangeOrBuilder getTextRangeOrBuilder() { - return textRange_; + return textRange_ == null ? org.sonarqube.ws.Common.TextRange.getDefaultInstance() : textRange_; } public static final int FLOWS_FIELD_NUMBER = 10; @@ -6803,7 +6802,7 @@ public final class Issues { } public static final int RESOLUTION_FIELD_NUMBER = 11; - private java.lang.Object resolution_; + private volatile java.lang.Object resolution_; /** * optional string resolution = 11; */ @@ -6845,7 +6844,7 @@ public final class Issues { } public static final int STATUS_FIELD_NUMBER = 12; - private java.lang.Object status_; + private volatile java.lang.Object status_; /** * optional string status = 12; */ @@ -6887,7 +6886,7 @@ public final class Issues { } public static final int MESSAGE_FIELD_NUMBER = 13; - private java.lang.Object message_; + private volatile java.lang.Object message_; /** * optional string message = 13; */ @@ -6929,7 +6928,7 @@ public final class Issues { } public static final int DEBT_FIELD_NUMBER = 14; - private java.lang.Object debt_; + private volatile java.lang.Object debt_; /** * optional string debt = 14; */ @@ -6971,7 +6970,7 @@ public final class Issues { } public static final int ASSIGNEE_FIELD_NUMBER = 15; - private java.lang.Object assignee_; + private volatile java.lang.Object assignee_; /** * optional string assignee = 15; */ @@ -7013,7 +7012,7 @@ public final class Issues { } public static final int REPORTER_FIELD_NUMBER = 16; - private java.lang.Object reporter_; + private volatile java.lang.Object reporter_; /** * optional string reporter = 16; */ @@ -7055,7 +7054,7 @@ public final class Issues { } public static final int AUTHOR_FIELD_NUMBER = 17; - private java.lang.Object author_; + private volatile java.lang.Object author_; /** * optional string author = 17; * @@ -7109,7 +7108,7 @@ public final class Issues { } public static final int ACTIONPLAN_FIELD_NUMBER = 18; - private java.lang.Object actionPlan_; + private volatile java.lang.Object actionPlan_; /** * optional string actionPlan = 18; */ @@ -7349,7 +7348,7 @@ public final class Issues { } public static final int CREATIONDATE_FIELD_NUMBER = 27; - private java.lang.Object creationDate_; + private volatile java.lang.Object creationDate_; /** * optional string creationDate = 27; */ @@ -7391,7 +7390,7 @@ public final class Issues { } public static final int UPDATEDATE_FIELD_NUMBER = 28; - private java.lang.Object updateDate_; + private volatile java.lang.Object updateDate_; /** * optional string updateDate = 28; */ @@ -7433,7 +7432,7 @@ public final class Issues { } public static final int FUPDATEAGE_FIELD_NUMBER = 29; - private java.lang.Object fUpdateAge_; + private volatile java.lang.Object fUpdateAge_; /** * optional string fUpdateAge = 29; */ @@ -7475,7 +7474,7 @@ public final class Issues { } public static final int CLOSEDATE_FIELD_NUMBER = 30; - private java.lang.Object closeDate_; + private volatile java.lang.Object closeDate_; /** * optional string closeDate = 30; */ @@ -7516,38 +7515,6 @@ public final class Issues { } } - private void initFields() { - key_ = ""; - rule_ = ""; - severity_ = org.sonarqube.ws.Common.Severity.INFO; - component_ = ""; - componentId_ = 0L; - project_ = ""; - subProject_ = ""; - line_ = 0; - textRange_ = org.sonarqube.ws.Common.TextRange.getDefaultInstance(); - flows_ = java.util.Collections.emptyList(); - resolution_ = ""; - status_ = ""; - message_ = ""; - debt_ = ""; - assignee_ = ""; - reporter_ = ""; - author_ = ""; - actionPlan_ = ""; - tagsPresentIfEmpty_ = false; - tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - transitionsPresentIfEmpty_ = false; - transitions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - actionsPresentIfEmpty_ = false; - actions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - commentsPresentIfEmpty_ = false; - comments_ = java.util.Collections.emptyList(); - creationDate_ = ""; - updateDate_ = ""; - fUpdateAge_ = ""; - closeDate_ = ""; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -7560,7 +7527,6 @@ public final class Issues { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getKeyBytes()); } @@ -7568,7 +7534,7 @@ public final class Issues { output.writeBytes(2, getRuleBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeEnum(3, severity_.getNumber()); + output.writeEnum(3, severity_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(4, getComponentBytes()); @@ -7586,7 +7552,7 @@ public final class Issues { output.writeInt32(8, line_); } if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeMessage(9, textRange_); + output.writeMessage(9, getTextRange()); } for (int i = 0; i < flows_.size(); i++) { output.writeMessage(10, flows_.get(i)); @@ -7651,7 +7617,7 @@ public final class Issues { if (((bitField0_ & 0x01000000) == 0x01000000)) { output.writeBytes(30, getCloseDateBytes()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -7670,7 +7636,7 @@ public final class Issues { } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, severity_.getNumber()); + .computeEnumSize(3, severity_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream @@ -7694,7 +7660,7 @@ public final class Issues { } if (((bitField0_ & 0x00000100) == 0x00000100)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, textRange_); + .computeMessageSize(9, getTextRange()); } for (int i = 0; i < flows_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -7795,18 +7761,12 @@ public final class Issues { size += com.google.protobuf.CodedOutputStream .computeBytesSize(30, getCloseDateBytes()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Issues.Issue parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -7860,12 +7820,17 @@ public final class Issues { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Issues.Issue prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -7909,17 +7874,13 @@ public final class Issues { getCommentsFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); key_ = ""; bitField0_ = (bitField0_ & ~0x00000001); rule_ = ""; bitField0_ = (bitField0_ & ~0x00000002); - severity_ = org.sonarqube.ws.Common.Severity.INFO; + severity_ = 0; bitField0_ = (bitField0_ & ~0x00000004); component_ = ""; bitField0_ = (bitField0_ & ~0x00000008); @@ -7932,7 +7893,7 @@ public final class Issues { line_ = 0; bitField0_ = (bitField0_ & ~0x00000080); if (textRangeBuilder_ == null) { - textRange_ = org.sonarqube.ws.Common.TextRange.getDefaultInstance(); + textRange_ = null; } else { textRangeBuilder_.clear(); } @@ -7990,10 +7951,6 @@ public final class Issues { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Issue_descriptor; @@ -8359,7 +8316,8 @@ public final class Issues { closeDate_ = other.closeDate_; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -8538,7 +8496,7 @@ public final class Issues { return this; } - private org.sonarqube.ws.Common.Severity severity_ = org.sonarqube.ws.Common.Severity.INFO; + private int severity_ = 0; /** * optional .sonarqube.ws.commons.Severity severity = 3; */ @@ -8549,7 +8507,8 @@ public final class Issues { * optional .sonarqube.ws.commons.Severity severity = 3; */ public org.sonarqube.ws.Common.Severity getSeverity() { - return severity_; + org.sonarqube.ws.Common.Severity result = org.sonarqube.ws.Common.Severity.valueOf(severity_); + return result == null ? org.sonarqube.ws.Common.Severity.INFO : result; } /** * optional .sonarqube.ws.commons.Severity severity = 3; @@ -8559,7 +8518,7 @@ public final class Issues { throw new NullPointerException(); } bitField0_ |= 0x00000004; - severity_ = value; + severity_ = value.getNumber(); onChanged(); return this; } @@ -8568,7 +8527,7 @@ public final class Issues { */ public Builder clearSeverity() { bitField0_ = (bitField0_ & ~0x00000004); - severity_ = org.sonarqube.ws.Common.Severity.INFO; + severity_ = 0; onChanged(); return this; } @@ -8865,7 +8824,7 @@ public final class Issues { return this; } - private org.sonarqube.ws.Common.TextRange textRange_ = org.sonarqube.ws.Common.TextRange.getDefaultInstance(); + private org.sonarqube.ws.Common.TextRange textRange_ = null; private com.google.protobuf.SingleFieldBuilder< org.sonarqube.ws.Common.TextRange, org.sonarqube.ws.Common.TextRange.Builder, org.sonarqube.ws.Common.TextRangeOrBuilder> textRangeBuilder_; /** @@ -8879,7 +8838,7 @@ public final class Issues { */ public org.sonarqube.ws.Common.TextRange getTextRange() { if (textRangeBuilder_ == null) { - return textRange_; + return textRange_ == null ? org.sonarqube.ws.Common.TextRange.getDefaultInstance() : textRange_; } else { return textRangeBuilder_.getMessage(); } @@ -8920,6 +8879,7 @@ public final class Issues { public Builder mergeTextRange(org.sonarqube.ws.Common.TextRange value) { if (textRangeBuilder_ == null) { if (((bitField0_ & 0x00000100) == 0x00000100) && + textRange_ != null && textRange_ != org.sonarqube.ws.Common.TextRange.getDefaultInstance()) { textRange_ = org.sonarqube.ws.Common.TextRange.newBuilder(textRange_).mergeFrom(value).buildPartial(); @@ -8938,7 +8898,7 @@ public final class Issues { */ public Builder clearTextRange() { if (textRangeBuilder_ == null) { - textRange_ = org.sonarqube.ws.Common.TextRange.getDefaultInstance(); + textRange_ = null; onChanged(); } else { textRangeBuilder_.clear(); @@ -8961,7 +8921,8 @@ public final class Issues { if (textRangeBuilder_ != null) { return textRangeBuilder_.getMessageOrBuilder(); } else { - return textRange_; + return textRange_ == null ? + org.sonarqube.ws.Common.TextRange.getDefaultInstance() : textRange_; } } /** @@ -10839,21 +10800,53 @@ public final class Issues { // @@protoc_insertion_point(builder_scope:sonarqube.ws.issues.Issue) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Issue) + private static final org.sonarqube.ws.Issues.Issue DEFAULT_INSTANCE; static { - defaultInstance = new Issue(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Issues.Issue(); } - // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Issue) - } + public static org.sonarqube.ws.Issues.Issue getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public interface FlowOrBuilder extends - // @@protoc_insertion_point(interface_extends:sonarqube.ws.issues.Flow) - com.google.protobuf.MessageOrBuilder { + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Issue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Issue(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; - /** - * repeated .sonarqube.ws.issues.Location locations = 1; - */ + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Issues.Issue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FlowOrBuilder extends + // @@protoc_insertion_point(interface_extends:sonarqube.ws.issues.Flow) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .sonarqube.ws.issues.Location locations = 1; + */ java.util.List getLocationsList(); /** @@ -10878,37 +10871,27 @@ public final class Issues { /** * Protobuf type {@code sonarqube.ws.issues.Flow} */ - public static final class Flow extends + public static final class Flow extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.issues.Flow) FlowOrBuilder { // Use Flow.newBuilder() to construct. - private Flow(com.google.protobuf.GeneratedMessage.Builder builder) { + private Flow(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private Flow(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Flow defaultInstance; - public static Flow getDefaultInstance() { - return defaultInstance; - } - - public Flow getDefaultInstanceForType() { - return defaultInstance; + private Flow() { + locations_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Flow( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -10938,10 +10921,11 @@ public final class Issues { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { locations_ = java.util.Collections.unmodifiableList(locations_); @@ -10962,21 +10946,6 @@ public final class Issues { org.sonarqube.ws.Issues.Flow.class, org.sonarqube.ws.Issues.Flow.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Flow parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Flow(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - public static final int LOCATIONS_FIELD_NUMBER = 1; private java.util.List locations_; /** @@ -11012,9 +10981,6 @@ public final class Issues { return locations_.get(index); } - private void initFields() { - locations_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -11027,11 +10993,10 @@ public final class Issues { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); for (int i = 0; i < locations_.size(); i++) { output.writeMessage(1, locations_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -11044,18 +11009,12 @@ public final class Issues { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, locations_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Issues.Flow parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -11109,12 +11068,17 @@ public final class Issues { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Issues.Flow prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -11156,10 +11120,6 @@ public final class Issues { getLocationsFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); if (locationsBuilder_ == null) { @@ -11171,10 +11131,6 @@ public final class Issues { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Flow_descriptor; @@ -11245,7 +11201,8 @@ public final class Issues { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -11515,12 +11472,44 @@ public final class Issues { // @@protoc_insertion_point(builder_scope:sonarqube.ws.issues.Flow) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Flow) + private static final org.sonarqube.ws.Issues.Flow DEFAULT_INSTANCE; static { - defaultInstance = new Flow(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Issues.Flow(); + } + + public static org.sonarqube.ws.Issues.Flow getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Flow parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Flow(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Issues.Flow getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Flow) } public interface LocationOrBuilder extends @@ -11583,37 +11572,28 @@ public final class Issues { /** * Protobuf type {@code sonarqube.ws.issues.Location} */ - public static final class Location extends + public static final class Location extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.issues.Location) LocationOrBuilder { // Use Location.newBuilder() to construct. - private Location(com.google.protobuf.GeneratedMessage.Builder builder) { + private Location(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private Location(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Location defaultInstance; - public static Location getDefaultInstance() { - return defaultInstance; - } - - public Location getDefaultInstanceForType() { - return defaultInstance; + private Location() { + componentId_ = ""; + msg_ = ""; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Location( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -11660,10 +11640,11 @@ public final class Issues { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -11681,24 +11662,9 @@ public final class Issues { org.sonarqube.ws.Issues.Location.class, org.sonarqube.ws.Issues.Location.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Location parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Location(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int COMPONENTID_FIELD_NUMBER = 1; - private java.lang.Object componentId_; + private volatile java.lang.Object componentId_; /** * optional string componentId = 1; */ @@ -11759,7 +11725,7 @@ public final class Issues { * */ public org.sonarqube.ws.Common.TextRange getTextRange() { - return textRange_; + return textRange_ == null ? org.sonarqube.ws.Common.TextRange.getDefaultInstance() : textRange_; } /** * optional .sonarqube.ws.commons.TextRange textRange = 2; @@ -11769,11 +11735,11 @@ public final class Issues { * */ public org.sonarqube.ws.Common.TextRangeOrBuilder getTextRangeOrBuilder() { - return textRange_; + return textRange_ == null ? org.sonarqube.ws.Common.TextRange.getDefaultInstance() : textRange_; } public static final int MSG_FIELD_NUMBER = 3; - private java.lang.Object msg_; + private volatile java.lang.Object msg_; /** * optional string msg = 3; */ @@ -11814,11 +11780,6 @@ public final class Issues { } } - private void initFields() { - componentId_ = ""; - textRange_ = org.sonarqube.ws.Common.TextRange.getDefaultInstance(); - msg_ = ""; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -11831,17 +11792,16 @@ public final class Issues { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getComponentIdBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, textRange_); + output.writeMessage(2, getTextRange()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getMsgBytes()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -11856,24 +11816,18 @@ public final class Issues { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, textRange_); + .computeMessageSize(2, getTextRange()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getMsgBytes()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Issues.Location parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -11927,12 +11881,17 @@ public final class Issues { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Issues.Location prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -11974,16 +11933,12 @@ public final class Issues { getTextRangeFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); componentId_ = ""; bitField0_ = (bitField0_ & ~0x00000001); if (textRangeBuilder_ == null) { - textRange_ = org.sonarqube.ws.Common.TextRange.getDefaultInstance(); + textRange_ = null; } else { textRangeBuilder_.clear(); } @@ -11993,10 +11948,6 @@ public final class Issues { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Location_descriptor; @@ -12063,7 +12014,8 @@ public final class Issues { msg_ = other.msg_; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -12166,7 +12118,7 @@ public final class Issues { return this; } - private org.sonarqube.ws.Common.TextRange textRange_ = org.sonarqube.ws.Common.TextRange.getDefaultInstance(); + private org.sonarqube.ws.Common.TextRange textRange_ = null; private com.google.protobuf.SingleFieldBuilder< org.sonarqube.ws.Common.TextRange, org.sonarqube.ws.Common.TextRange.Builder, org.sonarqube.ws.Common.TextRangeOrBuilder> textRangeBuilder_; /** @@ -12188,7 +12140,7 @@ public final class Issues { */ public org.sonarqube.ws.Common.TextRange getTextRange() { if (textRangeBuilder_ == null) { - return textRange_; + return textRange_ == null ? org.sonarqube.ws.Common.TextRange.getDefaultInstance() : textRange_; } else { return textRangeBuilder_.getMessage(); } @@ -12241,6 +12193,7 @@ public final class Issues { public Builder mergeTextRange(org.sonarqube.ws.Common.TextRange value) { if (textRangeBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && + textRange_ != null && textRange_ != org.sonarqube.ws.Common.TextRange.getDefaultInstance()) { textRange_ = org.sonarqube.ws.Common.TextRange.newBuilder(textRange_).mergeFrom(value).buildPartial(); @@ -12263,7 +12216,7 @@ public final class Issues { */ public Builder clearTextRange() { if (textRangeBuilder_ == null) { - textRange_ = org.sonarqube.ws.Common.TextRange.getDefaultInstance(); + textRange_ = null; onChanged(); } else { textRangeBuilder_.clear(); @@ -12294,7 +12247,8 @@ public final class Issues { if (textRangeBuilder_ != null) { return textRangeBuilder_.getMessageOrBuilder(); } else { - return textRange_; + return textRange_ == null ? + org.sonarqube.ws.Common.TextRange.getDefaultInstance() : textRange_; } } /** @@ -12397,12 +12351,44 @@ public final class Issues { // @@protoc_insertion_point(builder_scope:sonarqube.ws.issues.Location) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Location) + private static final org.sonarqube.ws.Issues.Location DEFAULT_INSTANCE; static { - defaultInstance = new Location(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Issues.Location(); + } + + public static org.sonarqube.ws.Issues.Location getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Location parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Location(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Issues.Location getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Location) } public interface CommentOrBuilder extends @@ -12555,37 +12541,34 @@ public final class Issues { /** * Protobuf type {@code sonarqube.ws.issues.Comment} */ - public static final class Comment extends + public static final class Comment extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.issues.Comment) CommentOrBuilder { // Use Comment.newBuilder() to construct. - private Comment(com.google.protobuf.GeneratedMessage.Builder builder) { + private Comment(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Comment(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Comment defaultInstance; - public static Comment getDefaultInstance() { - return defaultInstance; } - - public Comment getDefaultInstanceForType() { - return defaultInstance; + private Comment() { + key_ = ""; + login_ = ""; + email_ = ""; + userName_ = ""; + htmlText_ = ""; + markdown_ = ""; + updatable_ = false; + createdAt_ = ""; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Comment( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -12654,10 +12637,11 @@ public final class Issues { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -12675,24 +12659,9 @@ public final class Issues { org.sonarqube.ws.Issues.Comment.class, org.sonarqube.ws.Issues.Comment.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Comment parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Comment(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int KEY_FIELD_NUMBER = 1; - private java.lang.Object key_; + private volatile java.lang.Object key_; /** * optional string key = 1; */ @@ -12734,7 +12703,7 @@ public final class Issues { } public static final int LOGIN_FIELD_NUMBER = 2; - private java.lang.Object login_; + private volatile java.lang.Object login_; /** * optional string login = 2; */ @@ -12776,7 +12745,7 @@ public final class Issues { } public static final int EMAIL_FIELD_NUMBER = 3; - private java.lang.Object email_; + private volatile java.lang.Object email_; /** * optional string email = 3; * @@ -12830,7 +12799,7 @@ public final class Issues { } public static final int USERNAME_FIELD_NUMBER = 4; - private java.lang.Object userName_; + private volatile java.lang.Object userName_; /** * optional string userName = 4; * @@ -12884,7 +12853,7 @@ public final class Issues { } public static final int HTMLTEXT_FIELD_NUMBER = 5; - private java.lang.Object htmlText_; + private volatile java.lang.Object htmlText_; /** * optional string htmlText = 5; */ @@ -12926,7 +12895,7 @@ public final class Issues { } public static final int MARKDOWN_FIELD_NUMBER = 6; - private java.lang.Object markdown_; + private volatile java.lang.Object markdown_; /** * optional string markdown = 6; * @@ -12995,7 +12964,7 @@ public final class Issues { } public static final int CREATEDAT_FIELD_NUMBER = 8; - private java.lang.Object createdAt_; + private volatile java.lang.Object createdAt_; /** * optional string createdAt = 8; */ @@ -13036,16 +13005,6 @@ public final class Issues { } } - private void initFields() { - key_ = ""; - login_ = ""; - email_ = ""; - userName_ = ""; - htmlText_ = ""; - markdown_ = ""; - updatable_ = false; - createdAt_ = ""; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -13058,7 +13017,6 @@ public final class Issues { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getKeyBytes()); } @@ -13083,7 +13041,7 @@ public final class Issues { if (((bitField0_ & 0x00000080) == 0x00000080)) { output.writeBytes(8, getCreatedAtBytes()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -13124,18 +13082,12 @@ public final class Issues { size += com.google.protobuf.CodedOutputStream .computeBytesSize(8, getCreatedAtBytes()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Issues.Comment parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -13189,12 +13141,17 @@ public final class Issues { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Issues.Comment prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -13235,10 +13192,6 @@ public final class Issues { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); key_ = ""; @@ -13260,10 +13213,6 @@ public final class Issues { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Comment_descriptor; @@ -13371,7 +13320,8 @@ public final class Issues { createdAt_ = other.createdAt_; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -14037,12 +13987,44 @@ public final class Issues { // @@protoc_insertion_point(builder_scope:sonarqube.ws.issues.Comment) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Comment) + private static final org.sonarqube.ws.Issues.Comment DEFAULT_INSTANCE; static { - defaultInstance = new Comment(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Issues.Comment(); + } + + public static org.sonarqube.ws.Issues.Comment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Comment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Comment(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Issues.Comment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Comment) } public interface ActionPlanOrBuilder extends @@ -14146,37 +14128,31 @@ public final class Issues { /** * Protobuf type {@code sonarqube.ws.issues.ActionPlan} */ - public static final class ActionPlan extends + public static final class ActionPlan extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.issues.ActionPlan) ActionPlanOrBuilder { // Use ActionPlan.newBuilder() to construct. - private ActionPlan(com.google.protobuf.GeneratedMessage.Builder builder) { + private ActionPlan(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private ActionPlan(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final ActionPlan defaultInstance; - public static ActionPlan getDefaultInstance() { - return defaultInstance; - } - - public ActionPlan getDefaultInstanceForType() { - return defaultInstance; + private ActionPlan() { + key_ = ""; + name_ = ""; + status_ = ""; + deadLine_ = ""; + project_ = ""; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private ActionPlan( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -14228,10 +14204,11 @@ public final class Issues { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -14249,24 +14226,9 @@ public final class Issues { org.sonarqube.ws.Issues.ActionPlan.class, org.sonarqube.ws.Issues.ActionPlan.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public ActionPlan parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ActionPlan(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int KEY_FIELD_NUMBER = 1; - private java.lang.Object key_; + private volatile java.lang.Object key_; /** * optional string key = 1; */ @@ -14308,7 +14270,7 @@ public final class Issues { } public static final int NAME_FIELD_NUMBER = 2; - private java.lang.Object name_; + private volatile java.lang.Object name_; /** * optional string name = 2; */ @@ -14350,7 +14312,7 @@ public final class Issues { } public static final int STATUS_FIELD_NUMBER = 3; - private java.lang.Object status_; + private volatile java.lang.Object status_; /** * optional string status = 3; * @@ -14404,7 +14366,7 @@ public final class Issues { } public static final int DEADLINE_FIELD_NUMBER = 4; - private java.lang.Object deadLine_; + private volatile java.lang.Object deadLine_; /** * optional string deadLine = 4; */ @@ -14446,7 +14408,7 @@ public final class Issues { } public static final int PROJECT_FIELD_NUMBER = 5; - private java.lang.Object project_; + private volatile java.lang.Object project_; /** * optional string project = 5; * @@ -14499,13 +14461,6 @@ public final class Issues { } } - private void initFields() { - key_ = ""; - name_ = ""; - status_ = ""; - deadLine_ = ""; - project_ = ""; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -14518,7 +14473,6 @@ public final class Issues { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getKeyBytes()); } @@ -14534,7 +14488,7 @@ public final class Issues { if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(5, getProjectBytes()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -14563,18 +14517,12 @@ public final class Issues { size += com.google.protobuf.CodedOutputStream .computeBytesSize(5, getProjectBytes()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Issues.ActionPlan parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -14628,12 +14576,17 @@ public final class Issues { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Issues.ActionPlan prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -14674,10 +14627,6 @@ public final class Issues { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); key_ = ""; @@ -14693,10 +14642,6 @@ public final class Issues { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_ActionPlan_descriptor; @@ -14779,7 +14724,8 @@ public final class Issues { project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -15237,12 +15183,44 @@ public final class Issues { // @@protoc_insertion_point(builder_scope:sonarqube.ws.issues.ActionPlan) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.ActionPlan) + private static final org.sonarqube.ws.Issues.ActionPlan DEFAULT_INSTANCE; static { - defaultInstance = new ActionPlan(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Issues.ActionPlan(); + } + + public static org.sonarqube.ws.Issues.ActionPlan getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ActionPlan parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ActionPlan(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Issues.ActionPlan getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.ActionPlan) } public interface LanguageOrBuilder extends @@ -15280,37 +15258,28 @@ public final class Issues { /** * Protobuf type {@code sonarqube.ws.issues.Language} */ - public static final class Language extends + public static final class Language extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.issues.Language) LanguageOrBuilder { // Use Language.newBuilder() to construct. - private Language(com.google.protobuf.GeneratedMessage.Builder builder) { + private Language(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Language(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Language defaultInstance; - public static Language getDefaultInstance() { - return defaultInstance; } - - public Language getDefaultInstanceForType() { - return defaultInstance; + private Language() { + key_ = ""; + name_ = ""; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Language( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -15344,10 +15313,11 @@ public final class Issues { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -15365,24 +15335,9 @@ public final class Issues { org.sonarqube.ws.Issues.Language.class, org.sonarqube.ws.Issues.Language.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Language parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Language(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int KEY_FIELD_NUMBER = 1; - private java.lang.Object key_; + private volatile java.lang.Object key_; /** * optional string key = 1; */ @@ -15424,7 +15379,7 @@ public final class Issues { } public static final int NAME_FIELD_NUMBER = 2; - private java.lang.Object name_; + private volatile java.lang.Object name_; /** * optional string name = 2; */ @@ -15465,10 +15420,6 @@ public final class Issues { } } - private void initFields() { - key_ = ""; - name_ = ""; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -15481,14 +15432,13 @@ public final class Issues { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getKeyBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getNameBytes()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -15505,18 +15455,12 @@ public final class Issues { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getNameBytes()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Issues.Language parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -15570,12 +15514,17 @@ public final class Issues { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Issues.Language prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -15616,10 +15565,6 @@ public final class Issues { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); key_ = ""; @@ -15629,10 +15574,6 @@ public final class Issues { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Language_descriptor; @@ -15688,7 +15629,8 @@ public final class Issues { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -15870,12 +15812,44 @@ public final class Issues { // @@protoc_insertion_point(builder_scope:sonarqube.ws.issues.Language) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Language) + private static final org.sonarqube.ws.Issues.Language DEFAULT_INSTANCE; static { - defaultInstance = new Language(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Issues.Language(); + } + + public static org.sonarqube.ws.Issues.Language getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Language parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Language(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Issues.Language getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Language) } public interface ComponentOrBuilder extends @@ -16005,37 +15979,36 @@ public final class Issues { /** * Protobuf type {@code sonarqube.ws.issues.Component} */ - public static final class Component extends + public static final class Component extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.issues.Component) ComponentOrBuilder { // Use Component.newBuilder() to construct. - private Component(com.google.protobuf.GeneratedMessage.Builder builder) { + 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 Component() { + id_ = 0L; + key_ = ""; + uuid_ = ""; + enabled_ = false; + qualifier_ = ""; + name_ = ""; + longName_ = ""; + path_ = ""; + projectId_ = 0L; + subProjectId_ = 0L; } - 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 { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -16113,10 +16086,11 @@ public final class Issues { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -16134,21 +16108,6 @@ public final class Issues { org.sonarqube.ws.Issues.Component.class, org.sonarqube.ws.Issues.Component.Builder.class); } - public static com.google.protobuf.Parser PARSER = - 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); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int ID_FIELD_NUMBER = 1; private long id_; @@ -16166,7 +16125,7 @@ public final class Issues { } public static final int KEY_FIELD_NUMBER = 2; - private java.lang.Object key_; + private volatile java.lang.Object key_; /** * optional string key = 2; */ @@ -16208,7 +16167,7 @@ public final class Issues { } public static final int UUID_FIELD_NUMBER = 3; - private java.lang.Object uuid_; + private volatile java.lang.Object uuid_; /** * optional string uuid = 3; */ @@ -16265,7 +16224,7 @@ public final class Issues { } public static final int QUALIFIER_FIELD_NUMBER = 5; - private java.lang.Object qualifier_; + private volatile java.lang.Object qualifier_; /** * optional string qualifier = 5; */ @@ -16307,7 +16266,7 @@ public final class Issues { } public static final int NAME_FIELD_NUMBER = 6; - private java.lang.Object name_; + private volatile java.lang.Object name_; /** * optional string name = 6; */ @@ -16349,7 +16308,7 @@ public final class Issues { } public static final int LONGNAME_FIELD_NUMBER = 7; - private java.lang.Object longName_; + private volatile java.lang.Object longName_; /** * optional string longName = 7; */ @@ -16391,7 +16350,7 @@ public final class Issues { } public static final int PATH_FIELD_NUMBER = 8; - private java.lang.Object path_; + private volatile java.lang.Object path_; /** * optional string path = 8; */ @@ -16462,18 +16421,6 @@ public final class Issues { return subProjectId_; } - private void initFields() { - id_ = 0L; - key_ = ""; - uuid_ = ""; - enabled_ = false; - qualifier_ = ""; - name_ = ""; - longName_ = ""; - path_ = ""; - projectId_ = 0L; - subProjectId_ = 0L; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -16486,7 +16433,6 @@ public final class Issues { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt64(1, id_); } @@ -16517,7 +16463,7 @@ public final class Issues { if (((bitField0_ & 0x00000200) == 0x00000200)) { output.writeInt64(10, subProjectId_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -16566,18 +16512,12 @@ public final class Issues { size += com.google.protobuf.CodedOutputStream .computeInt64Size(10, subProjectId_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Issues.Component parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -16631,12 +16571,17 @@ public final class Issues { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Issues.Component prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -16677,10 +16622,6 @@ public final class Issues { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); id_ = 0L; @@ -16706,10 +16647,6 @@ public final class Issues { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Component_descriptor; @@ -16829,7 +16766,8 @@ public final class Issues { if (other.hasSubProjectId()) { setSubProjectId(other.getSubProjectId()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -17443,55 +17381,87 @@ public final class Issues { // @@protoc_insertion_point(builder_scope:sonarqube.ws.issues.Component) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Component) + private static final org.sonarqube.ws.Issues.Component DEFAULT_INSTANCE; static { - defaultInstance = new Component(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Issues.Component(); + } + + public static org.sonarqube.ws.Issues.Component getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Component parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Component(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Issues.Component getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Component) } - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_issues_Search_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_issues_Search_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_issues_Operation_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_issues_Operation_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_issues_Issue_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_issues_Issue_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_issues_Flow_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_issues_Flow_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_issues_Location_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_issues_Location_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_issues_Comment_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_issues_Comment_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_issues_ActionPlan_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_issues_ActionPlan_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_issues_Language_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_issues_Language_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_issues_Component_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable diff --git a/sonar-ws/src/main/gen-java/org/sonarqube/ws/Permissions.java b/sonar-ws/src/main/gen-java/org/sonarqube/ws/Permissions.java index 2378caf9e5b..7564f76c760 100644 --- a/sonar-ws/src/main/gen-java/org/sonarqube/ws/Permissions.java +++ b/sonar-ws/src/main/gen-java/org/sonarqube/ws/Permissions.java @@ -56,37 +56,27 @@ public final class Permissions { * WS api/permissions/users for internal use only * */ - public static final class WsUsersResponse extends + public static final class WsUsersResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.permissions.WsUsersResponse) WsUsersResponseOrBuilder { // Use WsUsersResponse.newBuilder() to construct. - private WsUsersResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + private WsUsersResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private WsUsersResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final WsUsersResponse defaultInstance; - public static WsUsersResponse getDefaultInstance() { - return defaultInstance; - } - - public WsUsersResponse getDefaultInstanceForType() { - return defaultInstance; + private WsUsersResponse() { + users_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private WsUsersResponse( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -129,10 +119,11 @@ public final class Permissions { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { users_ = java.util.Collections.unmodifiableList(users_); @@ -153,21 +144,6 @@ public final class Permissions { org.sonarqube.ws.Permissions.WsUsersResponse.class, org.sonarqube.ws.Permissions.WsUsersResponse.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public WsUsersResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WsUsersResponse(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - public interface UserOrBuilder extends // @@protoc_insertion_point(interface_extends:sonarqube.ws.permissions.WsUsersResponse.User) com.google.protobuf.MessageOrBuilder { @@ -226,37 +202,30 @@ public final class Permissions { /** * Protobuf type {@code sonarqube.ws.permissions.WsUsersResponse.User} */ - public static final class User extends + public static final class User extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.permissions.WsUsersResponse.User) UserOrBuilder { // Use User.newBuilder() to construct. - private User(com.google.protobuf.GeneratedMessage.Builder builder) { + private User(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private User(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final User defaultInstance; - public static User getDefaultInstance() { - return defaultInstance; } - - public User getDefaultInstanceForType() { - return defaultInstance; + private User() { + login_ = ""; + name_ = ""; + email_ = ""; + selected_ = false; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private User( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -301,10 +270,11 @@ public final class Permissions { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -322,24 +292,9 @@ public final class Permissions { org.sonarqube.ws.Permissions.WsUsersResponse.User.class, org.sonarqube.ws.Permissions.WsUsersResponse.User.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public User parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new User(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int LOGIN_FIELD_NUMBER = 1; - private java.lang.Object login_; + private volatile java.lang.Object login_; /** * optional string login = 1; */ @@ -381,7 +336,7 @@ public final class Permissions { } public static final int NAME_FIELD_NUMBER = 2; - private java.lang.Object name_; + private volatile java.lang.Object name_; /** * optional string name = 2; */ @@ -423,7 +378,7 @@ public final class Permissions { } public static final int EMAIL_FIELD_NUMBER = 3; - private java.lang.Object email_; + private volatile java.lang.Object email_; /** * optional string email = 3; */ @@ -479,12 +434,6 @@ public final class Permissions { return selected_; } - private void initFields() { - login_ = ""; - name_ = ""; - email_ = ""; - selected_ = false; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -497,7 +446,6 @@ public final class Permissions { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getLoginBytes()); } @@ -510,7 +458,7 @@ public final class Permissions { if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBool(4, selected_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -535,18 +483,12 @@ public final class Permissions { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, selected_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Permissions.WsUsersResponse.User parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -600,12 +542,17 @@ public final class Permissions { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Permissions.WsUsersResponse.User prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -646,10 +593,6 @@ public final class Permissions { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); login_ = ""; @@ -663,10 +606,6 @@ public final class Permissions { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_WsUsersResponse_User_descriptor; @@ -738,7 +677,8 @@ public final class Permissions { if (other.hasSelected()) { setSelected(other.getSelected()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -1028,12 +968,44 @@ public final class Permissions { // @@protoc_insertion_point(builder_scope:sonarqube.ws.permissions.WsUsersResponse.User) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsUsersResponse.User) + private static final org.sonarqube.ws.Permissions.WsUsersResponse.User DEFAULT_INSTANCE; static { - defaultInstance = new User(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Permissions.WsUsersResponse.User(); + } + + public static org.sonarqube.ws.Permissions.WsUsersResponse.User getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public User parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new User(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Permissions.WsUsersResponse.User getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsUsersResponse.User) } private int bitField0_; @@ -1049,13 +1021,13 @@ public final class Permissions { * optional .sonarqube.ws.commons.Paging paging = 1; */ public org.sonarqube.ws.Common.Paging getPaging() { - return paging_; + return paging_ == null ? org.sonarqube.ws.Common.Paging.getDefaultInstance() : paging_; } /** * optional .sonarqube.ws.commons.Paging paging = 1; */ public org.sonarqube.ws.Common.PagingOrBuilder getPagingOrBuilder() { - return paging_; + return paging_ == null ? org.sonarqube.ws.Common.Paging.getDefaultInstance() : paging_; } public static final int USERS_FIELD_NUMBER = 2; @@ -1093,10 +1065,6 @@ public final class Permissions { return users_.get(index); } - private void initFields() { - paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); - users_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -1109,14 +1077,13 @@ public final class Permissions { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, paging_); + output.writeMessage(1, getPaging()); } for (int i = 0; i < users_.size(); i++) { output.writeMessage(2, users_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -1127,24 +1094,18 @@ public final class Permissions { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, paging_); + .computeMessageSize(1, getPaging()); } for (int i = 0; i < users_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, users_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Permissions.WsUsersResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1198,12 +1159,17 @@ public final class Permissions { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Permissions.WsUsersResponse prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -1250,14 +1216,10 @@ public final class Permissions { getUsersFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); if (pagingBuilder_ == null) { - paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); + paging_ = null; } else { pagingBuilder_.clear(); } @@ -1271,10 +1233,6 @@ public final class Permissions { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_WsUsersResponse_descriptor; @@ -1358,7 +1316,8 @@ public final class Permissions { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -1385,7 +1344,7 @@ public final class Permissions { } private int bitField0_; - private org.sonarqube.ws.Common.Paging paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); + private org.sonarqube.ws.Common.Paging paging_ = null; private com.google.protobuf.SingleFieldBuilder< org.sonarqube.ws.Common.Paging, org.sonarqube.ws.Common.Paging.Builder, org.sonarqube.ws.Common.PagingOrBuilder> pagingBuilder_; /** @@ -1399,7 +1358,7 @@ public final class Permissions { */ public org.sonarqube.ws.Common.Paging getPaging() { if (pagingBuilder_ == null) { - return paging_; + return paging_ == null ? org.sonarqube.ws.Common.Paging.getDefaultInstance() : paging_; } else { return pagingBuilder_.getMessage(); } @@ -1440,6 +1399,7 @@ public final class Permissions { public Builder mergePaging(org.sonarqube.ws.Common.Paging value) { if (pagingBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && + paging_ != null && paging_ != org.sonarqube.ws.Common.Paging.getDefaultInstance()) { paging_ = org.sonarqube.ws.Common.Paging.newBuilder(paging_).mergeFrom(value).buildPartial(); @@ -1458,7 +1418,7 @@ public final class Permissions { */ public Builder clearPaging() { if (pagingBuilder_ == null) { - paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); + paging_ = null; onChanged(); } else { pagingBuilder_.clear(); @@ -1481,7 +1441,8 @@ public final class Permissions { if (pagingBuilder_ != null) { return pagingBuilder_.getMessageOrBuilder(); } else { - return paging_; + return paging_ == null ? + org.sonarqube.ws.Common.Paging.getDefaultInstance() : paging_; } } /** @@ -1744,12 +1705,44 @@ public final class Permissions { // @@protoc_insertion_point(builder_scope:sonarqube.ws.permissions.WsUsersResponse) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsUsersResponse) + private static final org.sonarqube.ws.Permissions.WsUsersResponse DEFAULT_INSTANCE; static { - defaultInstance = new WsUsersResponse(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Permissions.WsUsersResponse(); + } + + public static org.sonarqube.ws.Permissions.WsUsersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public WsUsersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new WsUsersResponse(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Permissions.WsUsersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsUsersResponse) } public interface WsGroupsResponseOrBuilder extends @@ -1800,37 +1793,27 @@ public final class Permissions { * WS api/permissions/groups for internal use only * */ - public static final class WsGroupsResponse extends + public static final class WsGroupsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.permissions.WsGroupsResponse) WsGroupsResponseOrBuilder { // Use WsGroupsResponse.newBuilder() to construct. - private WsGroupsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + private WsGroupsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private WsGroupsResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final WsGroupsResponse defaultInstance; - public static WsGroupsResponse getDefaultInstance() { - return defaultInstance; } - - public WsGroupsResponse getDefaultInstanceForType() { - return defaultInstance; + private WsGroupsResponse() { + groups_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private WsGroupsResponse( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -1873,10 +1856,11 @@ public final class Permissions { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { groups_ = java.util.Collections.unmodifiableList(groups_); @@ -1897,21 +1881,6 @@ public final class Permissions { org.sonarqube.ws.Permissions.WsGroupsResponse.class, org.sonarqube.ws.Permissions.WsGroupsResponse.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public WsGroupsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WsGroupsResponse(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - public interface GroupOrBuilder extends // @@protoc_insertion_point(interface_extends:sonarqube.ws.permissions.WsGroupsResponse.Group) com.google.protobuf.MessageOrBuilder { @@ -1970,37 +1939,30 @@ public final class Permissions { /** * Protobuf type {@code sonarqube.ws.permissions.WsGroupsResponse.Group} */ - public static final class Group extends + public static final class Group extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.permissions.WsGroupsResponse.Group) GroupOrBuilder { // Use Group.newBuilder() to construct. - private Group(com.google.protobuf.GeneratedMessage.Builder builder) { + private Group(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Group(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Group defaultInstance; - public static Group getDefaultInstance() { - return defaultInstance; } - - public Group getDefaultInstanceForType() { - return defaultInstance; + private Group() { + id_ = ""; + name_ = ""; + description_ = ""; + selected_ = false; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Group( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -2045,10 +2007,11 @@ public final class Permissions { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -2066,24 +2029,9 @@ public final class Permissions { org.sonarqube.ws.Permissions.WsGroupsResponse.Group.class, org.sonarqube.ws.Permissions.WsGroupsResponse.Group.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Group parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Group(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int ID_FIELD_NUMBER = 1; - private java.lang.Object id_; + private volatile java.lang.Object id_; /** * optional string id = 1; */ @@ -2125,7 +2073,7 @@ public final class Permissions { } public static final int NAME_FIELD_NUMBER = 2; - private java.lang.Object name_; + private volatile java.lang.Object name_; /** * optional string name = 2; */ @@ -2167,7 +2115,7 @@ public final class Permissions { } public static final int DESCRIPTION_FIELD_NUMBER = 3; - private java.lang.Object description_; + private volatile java.lang.Object description_; /** * optional string description = 3; */ @@ -2223,12 +2171,6 @@ public final class Permissions { return selected_; } - private void initFields() { - id_ = ""; - name_ = ""; - description_ = ""; - selected_ = false; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -2241,7 +2183,6 @@ public final class Permissions { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getIdBytes()); } @@ -2254,7 +2195,7 @@ public final class Permissions { if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBool(4, selected_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -2279,18 +2220,12 @@ public final class Permissions { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, selected_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Permissions.WsGroupsResponse.Group parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -2344,12 +2279,17 @@ public final class Permissions { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Permissions.WsGroupsResponse.Group prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -2390,10 +2330,6 @@ public final class Permissions { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); id_ = ""; @@ -2407,10 +2343,6 @@ public final class Permissions { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_WsGroupsResponse_Group_descriptor; @@ -2482,7 +2414,8 @@ public final class Permissions { if (other.hasSelected()) { setSelected(other.getSelected()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -2772,12 +2705,44 @@ public final class Permissions { // @@protoc_insertion_point(builder_scope:sonarqube.ws.permissions.WsGroupsResponse.Group) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsGroupsResponse.Group) + private static final org.sonarqube.ws.Permissions.WsGroupsResponse.Group DEFAULT_INSTANCE; static { - defaultInstance = new Group(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Permissions.WsGroupsResponse.Group(); + } + + public static org.sonarqube.ws.Permissions.WsGroupsResponse.Group getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Group parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Group(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Permissions.WsGroupsResponse.Group getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsGroupsResponse.Group) } private int bitField0_; @@ -2793,13 +2758,13 @@ public final class Permissions { * optional .sonarqube.ws.commons.Paging paging = 1; */ public org.sonarqube.ws.Common.Paging getPaging() { - return paging_; + return paging_ == null ? org.sonarqube.ws.Common.Paging.getDefaultInstance() : paging_; } /** * optional .sonarqube.ws.commons.Paging paging = 1; */ public org.sonarqube.ws.Common.PagingOrBuilder getPagingOrBuilder() { - return paging_; + return paging_ == null ? org.sonarqube.ws.Common.Paging.getDefaultInstance() : paging_; } public static final int GROUPS_FIELD_NUMBER = 2; @@ -2837,10 +2802,6 @@ public final class Permissions { return groups_.get(index); } - private void initFields() { - paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); - groups_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -2853,14 +2814,13 @@ public final class Permissions { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, paging_); + output.writeMessage(1, getPaging()); } for (int i = 0; i < groups_.size(); i++) { output.writeMessage(2, groups_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -2871,24 +2831,18 @@ public final class Permissions { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, paging_); + .computeMessageSize(1, getPaging()); } for (int i = 0; i < groups_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, groups_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Permissions.WsGroupsResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -2942,12 +2896,17 @@ public final class Permissions { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Permissions.WsGroupsResponse prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -2994,14 +2953,10 @@ public final class Permissions { getGroupsFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); if (pagingBuilder_ == null) { - paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); + paging_ = null; } else { pagingBuilder_.clear(); } @@ -3015,10 +2970,6 @@ public final class Permissions { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_WsGroupsResponse_descriptor; @@ -3102,7 +3053,8 @@ public final class Permissions { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -3129,7 +3081,7 @@ public final class Permissions { } private int bitField0_; - private org.sonarqube.ws.Common.Paging paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); + private org.sonarqube.ws.Common.Paging paging_ = null; private com.google.protobuf.SingleFieldBuilder< org.sonarqube.ws.Common.Paging, org.sonarqube.ws.Common.Paging.Builder, org.sonarqube.ws.Common.PagingOrBuilder> pagingBuilder_; /** @@ -3143,7 +3095,7 @@ public final class Permissions { */ public org.sonarqube.ws.Common.Paging getPaging() { if (pagingBuilder_ == null) { - return paging_; + return paging_ == null ? org.sonarqube.ws.Common.Paging.getDefaultInstance() : paging_; } else { return pagingBuilder_.getMessage(); } @@ -3184,6 +3136,7 @@ public final class Permissions { public Builder mergePaging(org.sonarqube.ws.Common.Paging value) { if (pagingBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && + paging_ != null && paging_ != org.sonarqube.ws.Common.Paging.getDefaultInstance()) { paging_ = org.sonarqube.ws.Common.Paging.newBuilder(paging_).mergeFrom(value).buildPartial(); @@ -3202,7 +3155,7 @@ public final class Permissions { */ public Builder clearPaging() { if (pagingBuilder_ == null) { - paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); + paging_ = null; onChanged(); } else { pagingBuilder_.clear(); @@ -3225,7 +3178,8 @@ public final class Permissions { if (pagingBuilder_ != null) { return pagingBuilder_.getMessageOrBuilder(); } else { - return paging_; + return paging_ == null ? + org.sonarqube.ws.Common.Paging.getDefaultInstance() : paging_; } } /** @@ -3488,12 +3442,44 @@ public final class Permissions { // @@protoc_insertion_point(builder_scope:sonarqube.ws.permissions.WsGroupsResponse) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsGroupsResponse) + private static final org.sonarqube.ws.Permissions.WsGroupsResponse DEFAULT_INSTANCE; static { - defaultInstance = new WsGroupsResponse(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Permissions.WsGroupsResponse(); + } + + public static org.sonarqube.ws.Permissions.WsGroupsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public WsGroupsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new WsGroupsResponse(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Permissions.WsGroupsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsGroupsResponse) } public interface PermissionOrBuilder extends @@ -3563,37 +3549,31 @@ public final class Permissions { /** * Protobuf type {@code sonarqube.ws.permissions.Permission} */ - public static final class Permission extends + public static final class Permission extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.permissions.Permission) PermissionOrBuilder { // Use Permission.newBuilder() to construct. - private Permission(com.google.protobuf.GeneratedMessage.Builder builder) { + private Permission(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Permission(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Permission defaultInstance; - public static Permission getDefaultInstance() { - return defaultInstance; } - - public Permission getDefaultInstanceForType() { - return defaultInstance; + private Permission() { + key_ = ""; + name_ = ""; + description_ = ""; + usersCount_ = 0; + groupsCount_ = 0; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Permission( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -3643,10 +3623,11 @@ public final class Permissions { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -3664,24 +3645,9 @@ public final class Permissions { org.sonarqube.ws.Permissions.Permission.class, org.sonarqube.ws.Permissions.Permission.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Permission parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Permission(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int KEY_FIELD_NUMBER = 1; - private java.lang.Object key_; + private volatile java.lang.Object key_; /** * optional string key = 1; */ @@ -3723,7 +3689,7 @@ public final class Permissions { } public static final int NAME_FIELD_NUMBER = 2; - private java.lang.Object name_; + private volatile java.lang.Object name_; /** * optional string name = 2; */ @@ -3765,7 +3731,7 @@ public final class Permissions { } public static final int DESCRIPTION_FIELD_NUMBER = 3; - private java.lang.Object description_; + private volatile java.lang.Object description_; /** * optional string description = 3; */ @@ -3836,13 +3802,6 @@ public final class Permissions { return groupsCount_; } - private void initFields() { - key_ = ""; - name_ = ""; - description_ = ""; - usersCount_ = 0; - groupsCount_ = 0; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -3855,7 +3814,6 @@ public final class Permissions { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getKeyBytes()); } @@ -3871,7 +3829,7 @@ public final class Permissions { if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeInt32(5, groupsCount_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -3900,18 +3858,12 @@ public final class Permissions { size += com.google.protobuf.CodedOutputStream .computeInt32Size(5, groupsCount_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Permissions.Permission parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -3965,12 +3917,17 @@ public final class Permissions { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Permissions.Permission prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -4011,10 +3968,6 @@ public final class Permissions { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); key_ = ""; @@ -4030,10 +3983,6 @@ public final class Permissions { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_Permission_descriptor; @@ -4112,7 +4061,8 @@ public final class Permissions { if (other.hasGroupsCount()) { setGroupsCount(other.getGroupsCount()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -4434,12 +4384,44 @@ public final class Permissions { // @@protoc_insertion_point(builder_scope:sonarqube.ws.permissions.Permission) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.Permission) + private static final org.sonarqube.ws.Permissions.Permission DEFAULT_INSTANCE; static { - defaultInstance = new Permission(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Permissions.Permission(); + } + + public static org.sonarqube.ws.Permissions.Permission getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Permission parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Permission(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Permissions.Permission getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.Permission) } public interface WsSearchGlobalPermissionsResponseOrBuilder extends @@ -4473,37 +4455,27 @@ public final class Permissions { /** * Protobuf type {@code sonarqube.ws.permissions.WsSearchGlobalPermissionsResponse} */ - public static final class WsSearchGlobalPermissionsResponse extends + public static final class WsSearchGlobalPermissionsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.permissions.WsSearchGlobalPermissionsResponse) WsSearchGlobalPermissionsResponseOrBuilder { // Use WsSearchGlobalPermissionsResponse.newBuilder() to construct. - private WsSearchGlobalPermissionsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + private WsSearchGlobalPermissionsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private WsSearchGlobalPermissionsResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final WsSearchGlobalPermissionsResponse defaultInstance; - public static WsSearchGlobalPermissionsResponse getDefaultInstance() { - return defaultInstance; } - - public WsSearchGlobalPermissionsResponse getDefaultInstanceForType() { - return defaultInstance; + private WsSearchGlobalPermissionsResponse() { + permissions_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private WsSearchGlobalPermissionsResponse( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -4533,10 +4505,11 @@ public final class Permissions { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { permissions_ = java.util.Collections.unmodifiableList(permissions_); @@ -4557,21 +4530,6 @@ public final class Permissions { org.sonarqube.ws.Permissions.WsSearchGlobalPermissionsResponse.class, org.sonarqube.ws.Permissions.WsSearchGlobalPermissionsResponse.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public WsSearchGlobalPermissionsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WsSearchGlobalPermissionsResponse(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - public static final int PERMISSIONS_FIELD_NUMBER = 1; private java.util.List permissions_; /** @@ -4607,9 +4565,6 @@ public final class Permissions { return permissions_.get(index); } - private void initFields() { - permissions_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -4622,11 +4577,10 @@ public final class Permissions { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); for (int i = 0; i < permissions_.size(); i++) { output.writeMessage(1, permissions_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -4639,18 +4593,12 @@ public final class Permissions { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, permissions_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Permissions.WsSearchGlobalPermissionsResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -4704,12 +4652,17 @@ public final class Permissions { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Permissions.WsSearchGlobalPermissionsResponse prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -4751,10 +4704,6 @@ public final class Permissions { getPermissionsFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); if (permissionsBuilder_ == null) { @@ -4766,10 +4715,6 @@ public final class Permissions { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_WsSearchGlobalPermissionsResponse_descriptor; @@ -4840,7 +4785,8 @@ public final class Permissions { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -5110,12 +5056,44 @@ public final class Permissions { // @@protoc_insertion_point(builder_scope:sonarqube.ws.permissions.WsSearchGlobalPermissionsResponse) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsSearchGlobalPermissionsResponse) + private static final org.sonarqube.ws.Permissions.WsSearchGlobalPermissionsResponse DEFAULT_INSTANCE; static { - defaultInstance = new WsSearchGlobalPermissionsResponse(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Permissions.WsSearchGlobalPermissionsResponse(); + } + + public static org.sonarqube.ws.Permissions.WsSearchGlobalPermissionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public WsSearchGlobalPermissionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new WsSearchGlobalPermissionsResponse(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Permissions.WsSearchGlobalPermissionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsSearchGlobalPermissionsResponse) } public interface WsSearchProjectPermissionsResponseOrBuilder extends @@ -5186,37 +5164,28 @@ public final class Permissions { /** * Protobuf type {@code sonarqube.ws.permissions.WsSearchProjectPermissionsResponse} */ - public static final class WsSearchProjectPermissionsResponse extends + public static final class WsSearchProjectPermissionsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.permissions.WsSearchProjectPermissionsResponse) WsSearchProjectPermissionsResponseOrBuilder { // Use WsSearchProjectPermissionsResponse.newBuilder() to construct. - private WsSearchProjectPermissionsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + private WsSearchProjectPermissionsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private WsSearchProjectPermissionsResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final WsSearchProjectPermissionsResponse defaultInstance; - public static WsSearchProjectPermissionsResponse getDefaultInstance() { - return defaultInstance; } - - public WsSearchProjectPermissionsResponse getDefaultInstanceForType() { - return defaultInstance; + private WsSearchProjectPermissionsResponse() { + projects_ = java.util.Collections.emptyList(); + permissions_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private WsSearchProjectPermissionsResponse( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -5267,10 +5236,11 @@ public final class Permissions { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { projects_ = java.util.Collections.unmodifiableList(projects_); @@ -5294,21 +5264,6 @@ public final class Permissions { org.sonarqube.ws.Permissions.WsSearchProjectPermissionsResponse.class, org.sonarqube.ws.Permissions.WsSearchProjectPermissionsResponse.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public WsSearchProjectPermissionsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WsSearchProjectPermissionsResponse(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - public interface ProjectOrBuilder extends // @@protoc_insertion_point(interface_extends:sonarqube.ws.permissions.WsSearchProjectPermissionsResponse.Project) com.google.protobuf.MessageOrBuilder { @@ -5396,37 +5351,31 @@ public final class Permissions { /** * Protobuf type {@code sonarqube.ws.permissions.WsSearchProjectPermissionsResponse.Project} */ - public static final class Project extends + public static final class Project extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.permissions.WsSearchProjectPermissionsResponse.Project) ProjectOrBuilder { // Use Project.newBuilder() to construct. - private Project(com.google.protobuf.GeneratedMessage.Builder builder) { + private Project(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Project(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Project defaultInstance; - public static Project getDefaultInstance() { - return defaultInstance; } - - public Project getDefaultInstanceForType() { - return defaultInstance; + private Project() { + id_ = ""; + key_ = ""; + qualifier_ = ""; + name_ = ""; + permissions_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Project( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -5480,10 +5429,11 @@ public final class Permissions { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { permissions_ = java.util.Collections.unmodifiableList(permissions_); @@ -5504,24 +5454,9 @@ public final class Permissions { org.sonarqube.ws.Permissions.WsSearchProjectPermissionsResponse.Project.class, org.sonarqube.ws.Permissions.WsSearchProjectPermissionsResponse.Project.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Project parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Project(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int ID_FIELD_NUMBER = 1; - private java.lang.Object id_; + private volatile java.lang.Object id_; /** * optional string id = 1; */ @@ -5563,7 +5498,7 @@ public final class Permissions { } public static final int KEY_FIELD_NUMBER = 2; - private java.lang.Object key_; + private volatile java.lang.Object key_; /** * optional string key = 2; */ @@ -5605,7 +5540,7 @@ public final class Permissions { } public static final int QUALIFIER_FIELD_NUMBER = 3; - private java.lang.Object qualifier_; + private volatile java.lang.Object qualifier_; /** * optional string qualifier = 3; */ @@ -5647,7 +5582,7 @@ public final class Permissions { } public static final int NAME_FIELD_NUMBER = 4; - private java.lang.Object name_; + private volatile java.lang.Object name_; /** * optional string name = 4; */ @@ -5723,13 +5658,6 @@ public final class Permissions { return permissions_.get(index); } - private void initFields() { - id_ = ""; - key_ = ""; - qualifier_ = ""; - name_ = ""; - permissions_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -5742,7 +5670,6 @@ public final class Permissions { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getIdBytes()); } @@ -5758,7 +5685,7 @@ public final class Permissions { for (int i = 0; i < permissions_.size(); i++) { output.writeMessage(5, permissions_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -5787,18 +5714,12 @@ public final class Permissions { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, permissions_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Permissions.WsSearchProjectPermissionsResponse.Project parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -5852,12 +5773,17 @@ public final class Permissions { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Permissions.WsSearchProjectPermissionsResponse.Project prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -5899,10 +5825,6 @@ public final class Permissions { getPermissionsFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); id_ = ""; @@ -5922,10 +5844,6 @@ public final class Permissions { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_WsSearchProjectPermissionsResponse_Project_descriptor; @@ -6034,7 +5952,8 @@ public final class Permissions { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -6608,12 +6527,44 @@ public final class Permissions { // @@protoc_insertion_point(builder_scope:sonarqube.ws.permissions.WsSearchProjectPermissionsResponse.Project) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsSearchProjectPermissionsResponse.Project) + private static final org.sonarqube.ws.Permissions.WsSearchProjectPermissionsResponse.Project DEFAULT_INSTANCE; static { - defaultInstance = new Project(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Permissions.WsSearchProjectPermissionsResponse.Project(); + } + + public static org.sonarqube.ws.Permissions.WsSearchProjectPermissionsResponse.Project getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Project parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Project(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Permissions.WsSearchProjectPermissionsResponse.Project getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsSearchProjectPermissionsResponse.Project) } private int bitField0_; @@ -6629,13 +6580,13 @@ public final class Permissions { * optional .sonarqube.ws.commons.Paging paging = 1; */ public org.sonarqube.ws.Common.Paging getPaging() { - return paging_; + return paging_ == null ? org.sonarqube.ws.Common.Paging.getDefaultInstance() : paging_; } /** * optional .sonarqube.ws.commons.Paging paging = 1; */ public org.sonarqube.ws.Common.PagingOrBuilder getPagingOrBuilder() { - return paging_; + return paging_ == null ? org.sonarqube.ws.Common.Paging.getDefaultInstance() : paging_; } public static final int PROJECTS_FIELD_NUMBER = 2; @@ -6708,11 +6659,6 @@ public final class Permissions { return permissions_.get(index); } - private void initFields() { - paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); - projects_ = java.util.Collections.emptyList(); - permissions_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -6725,9 +6671,8 @@ public final class Permissions { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, paging_); + output.writeMessage(1, getPaging()); } for (int i = 0; i < projects_.size(); i++) { output.writeMessage(2, projects_.get(i)); @@ -6735,7 +6680,7 @@ public final class Permissions { for (int i = 0; i < permissions_.size(); i++) { output.writeMessage(3, permissions_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -6746,7 +6691,7 @@ public final class Permissions { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, paging_); + .computeMessageSize(1, getPaging()); } for (int i = 0; i < projects_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -6756,18 +6701,12 @@ public final class Permissions { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, permissions_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Permissions.WsSearchProjectPermissionsResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -6821,12 +6760,17 @@ public final class Permissions { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Permissions.WsSearchProjectPermissionsResponse prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -6870,14 +6814,10 @@ public final class Permissions { getPermissionsFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); if (pagingBuilder_ == null) { - paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); + paging_ = null; } else { pagingBuilder_.clear(); } @@ -6897,10 +6837,6 @@ public final class Permissions { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_WsSearchProjectPermissionsResponse_descriptor; @@ -7019,7 +6955,8 @@ public final class Permissions { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -7046,7 +6983,7 @@ public final class Permissions { } private int bitField0_; - private org.sonarqube.ws.Common.Paging paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); + private org.sonarqube.ws.Common.Paging paging_ = null; private com.google.protobuf.SingleFieldBuilder< org.sonarqube.ws.Common.Paging, org.sonarqube.ws.Common.Paging.Builder, org.sonarqube.ws.Common.PagingOrBuilder> pagingBuilder_; /** @@ -7060,7 +6997,7 @@ public final class Permissions { */ public org.sonarqube.ws.Common.Paging getPaging() { if (pagingBuilder_ == null) { - return paging_; + return paging_ == null ? org.sonarqube.ws.Common.Paging.getDefaultInstance() : paging_; } else { return pagingBuilder_.getMessage(); } @@ -7101,6 +7038,7 @@ public final class Permissions { public Builder mergePaging(org.sonarqube.ws.Common.Paging value) { if (pagingBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && + paging_ != null && paging_ != org.sonarqube.ws.Common.Paging.getDefaultInstance()) { paging_ = org.sonarqube.ws.Common.Paging.newBuilder(paging_).mergeFrom(value).buildPartial(); @@ -7119,7 +7057,7 @@ public final class Permissions { */ public Builder clearPaging() { if (pagingBuilder_ == null) { - paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); + paging_ = null; onChanged(); } else { pagingBuilder_.clear(); @@ -7142,7 +7080,8 @@ public final class Permissions { if (pagingBuilder_ != null) { return pagingBuilder_.getMessageOrBuilder(); } else { - return paging_; + return paging_ == null ? + org.sonarqube.ws.Common.Paging.getDefaultInstance() : paging_; } } /** @@ -7645,12 +7584,44 @@ public final class Permissions { // @@protoc_insertion_point(builder_scope:sonarqube.ws.permissions.WsSearchProjectPermissionsResponse) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsSearchProjectPermissionsResponse) + private static final org.sonarqube.ws.Permissions.WsSearchProjectPermissionsResponse DEFAULT_INSTANCE; static { - defaultInstance = new WsSearchProjectPermissionsResponse(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Permissions.WsSearchProjectPermissionsResponse(); + } + + public static org.sonarqube.ws.Permissions.WsSearchProjectPermissionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public WsSearchProjectPermissionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new WsSearchProjectPermissionsResponse(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Permissions.WsSearchProjectPermissionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsSearchProjectPermissionsResponse) } public interface PermissionTemplateOrBuilder extends @@ -7801,37 +7772,34 @@ public final class Permissions { /** * Protobuf type {@code sonarqube.ws.permissions.PermissionTemplate} */ - public static final class PermissionTemplate extends + public static final class PermissionTemplate extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.permissions.PermissionTemplate) PermissionTemplateOrBuilder { // Use PermissionTemplate.newBuilder() to construct. - private PermissionTemplate(com.google.protobuf.GeneratedMessage.Builder builder) { + private PermissionTemplate(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PermissionTemplate(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final PermissionTemplate defaultInstance; - public static PermissionTemplate getDefaultInstance() { - return defaultInstance; } - - public PermissionTemplate getDefaultInstanceForType() { - return defaultInstance; + private PermissionTemplate() { + id_ = ""; + name_ = ""; + description_ = ""; + projectKeyPattern_ = ""; + createdAt_ = ""; + updatedAt_ = ""; + permissionsPresentIfEmpty_ = false; + permissions_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private PermissionTemplate( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -7902,10 +7870,11 @@ public final class Permissions { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { permissions_ = java.util.Collections.unmodifiableList(permissions_); @@ -7926,24 +7895,9 @@ public final class Permissions { org.sonarqube.ws.Permissions.PermissionTemplate.class, org.sonarqube.ws.Permissions.PermissionTemplate.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public PermissionTemplate parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PermissionTemplate(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int ID_FIELD_NUMBER = 1; - private java.lang.Object id_; + private volatile java.lang.Object id_; /** * optional string id = 1; */ @@ -7985,7 +7939,7 @@ public final class Permissions { } public static final int NAME_FIELD_NUMBER = 2; - private java.lang.Object name_; + private volatile java.lang.Object name_; /** * optional string name = 2; */ @@ -8027,7 +7981,7 @@ public final class Permissions { } public static final int DESCRIPTION_FIELD_NUMBER = 3; - private java.lang.Object description_; + private volatile java.lang.Object description_; /** * optional string description = 3; */ @@ -8069,7 +8023,7 @@ public final class Permissions { } public static final int PROJECTKEYPATTERN_FIELD_NUMBER = 4; - private java.lang.Object projectKeyPattern_; + private volatile java.lang.Object projectKeyPattern_; /** * optional string projectKeyPattern = 4; */ @@ -8111,7 +8065,7 @@ public final class Permissions { } public static final int CREATEDAT_FIELD_NUMBER = 5; - private java.lang.Object createdAt_; + private volatile java.lang.Object createdAt_; /** * optional string createdAt = 5; * @@ -8165,7 +8119,7 @@ public final class Permissions { } public static final int UPDATEDAT_FIELD_NUMBER = 6; - private java.lang.Object updatedAt_; + private volatile java.lang.Object updatedAt_; /** * optional string updatedAt = 6; * @@ -8267,17 +8221,7 @@ public final class Permissions { int index) { return permissions_.get(index); } - - private void initFields() { - id_ = ""; - name_ = ""; - description_ = ""; - projectKeyPattern_ = ""; - createdAt_ = ""; - updatedAt_ = ""; - permissionsPresentIfEmpty_ = false; - permissions_ = java.util.Collections.emptyList(); - } + private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -8290,7 +8234,6 @@ public final class Permissions { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getIdBytes()); } @@ -8315,7 +8258,7 @@ public final class Permissions { for (int i = 0; i < permissions_.size(); i++) { output.writeMessage(8, permissions_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -8356,18 +8299,12 @@ public final class Permissions { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, permissions_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Permissions.PermissionTemplate parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -8421,12 +8358,17 @@ public final class Permissions { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Permissions.PermissionTemplate prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -8468,10 +8410,6 @@ public final class Permissions { getPermissionsFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); id_ = ""; @@ -8497,10 +8435,6 @@ public final class Permissions { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_PermissionTemplate_descriptor; @@ -8634,7 +8568,8 @@ public final class Permissions { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -9440,12 +9375,44 @@ public final class Permissions { // @@protoc_insertion_point(builder_scope:sonarqube.ws.permissions.PermissionTemplate) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.PermissionTemplate) + private static final org.sonarqube.ws.Permissions.PermissionTemplate DEFAULT_INSTANCE; static { - defaultInstance = new PermissionTemplate(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Permissions.PermissionTemplate(); + } + + public static org.sonarqube.ws.Permissions.PermissionTemplate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public PermissionTemplate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new PermissionTemplate(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Permissions.PermissionTemplate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.PermissionTemplate) } public interface WsCreatePermissionTemplateResponseOrBuilder extends @@ -9468,37 +9435,26 @@ public final class Permissions { /** * Protobuf type {@code sonarqube.ws.permissions.WsCreatePermissionTemplateResponse} */ - public static final class WsCreatePermissionTemplateResponse extends + public static final class WsCreatePermissionTemplateResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.permissions.WsCreatePermissionTemplateResponse) WsCreatePermissionTemplateResponseOrBuilder { // Use WsCreatePermissionTemplateResponse.newBuilder() to construct. - private WsCreatePermissionTemplateResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + private WsCreatePermissionTemplateResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private WsCreatePermissionTemplateResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final WsCreatePermissionTemplateResponse defaultInstance; - public static WsCreatePermissionTemplateResponse getDefaultInstance() { - return defaultInstance; } - - public WsCreatePermissionTemplateResponse getDefaultInstanceForType() { - return defaultInstance; + private WsCreatePermissionTemplateResponse() { } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private WsCreatePermissionTemplateResponse( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -9533,10 +9489,11 @@ public final class Permissions { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -9554,21 +9511,6 @@ public final class Permissions { org.sonarqube.ws.Permissions.WsCreatePermissionTemplateResponse.class, org.sonarqube.ws.Permissions.WsCreatePermissionTemplateResponse.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public WsCreatePermissionTemplateResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WsCreatePermissionTemplateResponse(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int PERMISSIONTEMPLATE_FIELD_NUMBER = 1; private org.sonarqube.ws.Permissions.PermissionTemplate permissionTemplate_; @@ -9582,18 +9524,15 @@ public final class Permissions { * optional .sonarqube.ws.permissions.PermissionTemplate permissionTemplate = 1; */ public org.sonarqube.ws.Permissions.PermissionTemplate getPermissionTemplate() { - return permissionTemplate_; + return permissionTemplate_ == null ? org.sonarqube.ws.Permissions.PermissionTemplate.getDefaultInstance() : permissionTemplate_; } /** * optional .sonarqube.ws.permissions.PermissionTemplate permissionTemplate = 1; */ public org.sonarqube.ws.Permissions.PermissionTemplateOrBuilder getPermissionTemplateOrBuilder() { - return permissionTemplate_; + return permissionTemplate_ == null ? org.sonarqube.ws.Permissions.PermissionTemplate.getDefaultInstance() : permissionTemplate_; } - private void initFields() { - permissionTemplate_ = org.sonarqube.ws.Permissions.PermissionTemplate.getDefaultInstance(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -9606,11 +9545,10 @@ public final class Permissions { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, permissionTemplate_); + output.writeMessage(1, getPermissionTemplate()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -9621,20 +9559,14 @@ public final class Permissions { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, permissionTemplate_); + .computeMessageSize(1, getPermissionTemplate()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Permissions.WsCreatePermissionTemplateResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -9688,12 +9620,17 @@ public final class Permissions { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Permissions.WsCreatePermissionTemplateResponse prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -9735,14 +9672,10 @@ public final class Permissions { getPermissionTemplateFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); if (permissionTemplateBuilder_ == null) { - permissionTemplate_ = org.sonarqube.ws.Permissions.PermissionTemplate.getDefaultInstance(); + permissionTemplate_ = null; } else { permissionTemplateBuilder_.clear(); } @@ -9750,10 +9683,6 @@ public final class Permissions { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_WsCreatePermissionTemplateResponse_descriptor; @@ -9802,7 +9731,8 @@ public final class Permissions { if (other.hasPermissionTemplate()) { mergePermissionTemplate(other.getPermissionTemplate()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -9829,7 +9759,7 @@ public final class Permissions { } private int bitField0_; - private org.sonarqube.ws.Permissions.PermissionTemplate permissionTemplate_ = org.sonarqube.ws.Permissions.PermissionTemplate.getDefaultInstance(); + private org.sonarqube.ws.Permissions.PermissionTemplate permissionTemplate_ = null; private com.google.protobuf.SingleFieldBuilder< org.sonarqube.ws.Permissions.PermissionTemplate, org.sonarqube.ws.Permissions.PermissionTemplate.Builder, org.sonarqube.ws.Permissions.PermissionTemplateOrBuilder> permissionTemplateBuilder_; /** @@ -9843,7 +9773,7 @@ public final class Permissions { */ public org.sonarqube.ws.Permissions.PermissionTemplate getPermissionTemplate() { if (permissionTemplateBuilder_ == null) { - return permissionTemplate_; + return permissionTemplate_ == null ? org.sonarqube.ws.Permissions.PermissionTemplate.getDefaultInstance() : permissionTemplate_; } else { return permissionTemplateBuilder_.getMessage(); } @@ -9884,6 +9814,7 @@ public final class Permissions { public Builder mergePermissionTemplate(org.sonarqube.ws.Permissions.PermissionTemplate value) { if (permissionTemplateBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && + permissionTemplate_ != null && permissionTemplate_ != org.sonarqube.ws.Permissions.PermissionTemplate.getDefaultInstance()) { permissionTemplate_ = org.sonarqube.ws.Permissions.PermissionTemplate.newBuilder(permissionTemplate_).mergeFrom(value).buildPartial(); @@ -9902,7 +9833,7 @@ public final class Permissions { */ public Builder clearPermissionTemplate() { if (permissionTemplateBuilder_ == null) { - permissionTemplate_ = org.sonarqube.ws.Permissions.PermissionTemplate.getDefaultInstance(); + permissionTemplate_ = null; onChanged(); } else { permissionTemplateBuilder_.clear(); @@ -9925,7 +9856,8 @@ public final class Permissions { if (permissionTemplateBuilder_ != null) { return permissionTemplateBuilder_.getMessageOrBuilder(); } else { - return permissionTemplate_; + return permissionTemplate_ == null ? + org.sonarqube.ws.Permissions.PermissionTemplate.getDefaultInstance() : permissionTemplate_; } } /** @@ -9948,12 +9880,44 @@ public final class Permissions { // @@protoc_insertion_point(builder_scope:sonarqube.ws.permissions.WsCreatePermissionTemplateResponse) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsCreatePermissionTemplateResponse) + private static final org.sonarqube.ws.Permissions.WsCreatePermissionTemplateResponse DEFAULT_INSTANCE; static { - defaultInstance = new WsCreatePermissionTemplateResponse(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Permissions.WsCreatePermissionTemplateResponse(); + } + + public static org.sonarqube.ws.Permissions.WsCreatePermissionTemplateResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public WsCreatePermissionTemplateResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new WsCreatePermissionTemplateResponse(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Permissions.WsCreatePermissionTemplateResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsCreatePermissionTemplateResponse) } public interface WsUpdatePermissionTemplateResponseOrBuilder extends @@ -9976,37 +9940,26 @@ public final class Permissions { /** * Protobuf type {@code sonarqube.ws.permissions.WsUpdatePermissionTemplateResponse} */ - public static final class WsUpdatePermissionTemplateResponse extends + public static final class WsUpdatePermissionTemplateResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.permissions.WsUpdatePermissionTemplateResponse) WsUpdatePermissionTemplateResponseOrBuilder { // Use WsUpdatePermissionTemplateResponse.newBuilder() to construct. - private WsUpdatePermissionTemplateResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + private WsUpdatePermissionTemplateResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private WsUpdatePermissionTemplateResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final WsUpdatePermissionTemplateResponse defaultInstance; - public static WsUpdatePermissionTemplateResponse getDefaultInstance() { - return defaultInstance; - } - - public WsUpdatePermissionTemplateResponse getDefaultInstanceForType() { - return defaultInstance; + private WsUpdatePermissionTemplateResponse() { } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private WsUpdatePermissionTemplateResponse( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -10041,10 +9994,11 @@ public final class Permissions { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -10062,21 +10016,6 @@ public final class Permissions { org.sonarqube.ws.Permissions.WsUpdatePermissionTemplateResponse.class, org.sonarqube.ws.Permissions.WsUpdatePermissionTemplateResponse.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public WsUpdatePermissionTemplateResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WsUpdatePermissionTemplateResponse(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int PERMISSIONTEMPLATE_FIELD_NUMBER = 1; private org.sonarqube.ws.Permissions.PermissionTemplate permissionTemplate_; @@ -10090,18 +10029,15 @@ public final class Permissions { * optional .sonarqube.ws.permissions.PermissionTemplate permissionTemplate = 1; */ public org.sonarqube.ws.Permissions.PermissionTemplate getPermissionTemplate() { - return permissionTemplate_; + return permissionTemplate_ == null ? org.sonarqube.ws.Permissions.PermissionTemplate.getDefaultInstance() : permissionTemplate_; } /** * optional .sonarqube.ws.permissions.PermissionTemplate permissionTemplate = 1; */ public org.sonarqube.ws.Permissions.PermissionTemplateOrBuilder getPermissionTemplateOrBuilder() { - return permissionTemplate_; + return permissionTemplate_ == null ? org.sonarqube.ws.Permissions.PermissionTemplate.getDefaultInstance() : permissionTemplate_; } - private void initFields() { - permissionTemplate_ = org.sonarqube.ws.Permissions.PermissionTemplate.getDefaultInstance(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -10114,11 +10050,10 @@ public final class Permissions { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, permissionTemplate_); + output.writeMessage(1, getPermissionTemplate()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -10129,20 +10064,14 @@ public final class Permissions { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, permissionTemplate_); + .computeMessageSize(1, getPermissionTemplate()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Permissions.WsUpdatePermissionTemplateResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -10196,12 +10125,17 @@ public final class Permissions { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Permissions.WsUpdatePermissionTemplateResponse prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -10243,14 +10177,10 @@ public final class Permissions { getPermissionTemplateFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); if (permissionTemplateBuilder_ == null) { - permissionTemplate_ = org.sonarqube.ws.Permissions.PermissionTemplate.getDefaultInstance(); + permissionTemplate_ = null; } else { permissionTemplateBuilder_.clear(); } @@ -10258,10 +10188,6 @@ public final class Permissions { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_WsUpdatePermissionTemplateResponse_descriptor; @@ -10310,7 +10236,8 @@ public final class Permissions { if (other.hasPermissionTemplate()) { mergePermissionTemplate(other.getPermissionTemplate()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -10337,7 +10264,7 @@ public final class Permissions { } private int bitField0_; - private org.sonarqube.ws.Permissions.PermissionTemplate permissionTemplate_ = org.sonarqube.ws.Permissions.PermissionTemplate.getDefaultInstance(); + private org.sonarqube.ws.Permissions.PermissionTemplate permissionTemplate_ = null; private com.google.protobuf.SingleFieldBuilder< org.sonarqube.ws.Permissions.PermissionTemplate, org.sonarqube.ws.Permissions.PermissionTemplate.Builder, org.sonarqube.ws.Permissions.PermissionTemplateOrBuilder> permissionTemplateBuilder_; /** @@ -10351,7 +10278,7 @@ public final class Permissions { */ public org.sonarqube.ws.Permissions.PermissionTemplate getPermissionTemplate() { if (permissionTemplateBuilder_ == null) { - return permissionTemplate_; + return permissionTemplate_ == null ? org.sonarqube.ws.Permissions.PermissionTemplate.getDefaultInstance() : permissionTemplate_; } else { return permissionTemplateBuilder_.getMessage(); } @@ -10392,6 +10319,7 @@ public final class Permissions { public Builder mergePermissionTemplate(org.sonarqube.ws.Permissions.PermissionTemplate value) { if (permissionTemplateBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && + permissionTemplate_ != null && permissionTemplate_ != org.sonarqube.ws.Permissions.PermissionTemplate.getDefaultInstance()) { permissionTemplate_ = org.sonarqube.ws.Permissions.PermissionTemplate.newBuilder(permissionTemplate_).mergeFrom(value).buildPartial(); @@ -10410,7 +10338,7 @@ public final class Permissions { */ public Builder clearPermissionTemplate() { if (permissionTemplateBuilder_ == null) { - permissionTemplate_ = org.sonarqube.ws.Permissions.PermissionTemplate.getDefaultInstance(); + permissionTemplate_ = null; onChanged(); } else { permissionTemplateBuilder_.clear(); @@ -10433,7 +10361,8 @@ public final class Permissions { if (permissionTemplateBuilder_ != null) { return permissionTemplateBuilder_.getMessageOrBuilder(); } else { - return permissionTemplate_; + return permissionTemplate_ == null ? + org.sonarqube.ws.Permissions.PermissionTemplate.getDefaultInstance() : permissionTemplate_; } } /** @@ -10456,12 +10385,44 @@ public final class Permissions { // @@protoc_insertion_point(builder_scope:sonarqube.ws.permissions.WsUpdatePermissionTemplateResponse) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsUpdatePermissionTemplateResponse) + private static final org.sonarqube.ws.Permissions.WsUpdatePermissionTemplateResponse DEFAULT_INSTANCE; static { - defaultInstance = new WsUpdatePermissionTemplateResponse(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Permissions.WsUpdatePermissionTemplateResponse(); + } + + public static org.sonarqube.ws.Permissions.WsUpdatePermissionTemplateResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public WsUpdatePermissionTemplateResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new WsUpdatePermissionTemplateResponse(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Permissions.WsUpdatePermissionTemplateResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsUpdatePermissionTemplateResponse) } public interface WsSearchTemplatesResponseOrBuilder extends @@ -10543,37 +10504,29 @@ public final class Permissions { /** * Protobuf type {@code sonarqube.ws.permissions.WsSearchTemplatesResponse} */ - public static final class WsSearchTemplatesResponse extends + public static final class WsSearchTemplatesResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.permissions.WsSearchTemplatesResponse) WsSearchTemplatesResponseOrBuilder { // Use WsSearchTemplatesResponse.newBuilder() to construct. - private WsSearchTemplatesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + private WsSearchTemplatesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private WsSearchTemplatesResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final WsSearchTemplatesResponse defaultInstance; - public static WsSearchTemplatesResponse getDefaultInstance() { - return defaultInstance; } - - public WsSearchTemplatesResponse getDefaultInstanceForType() { - return defaultInstance; + private WsSearchTemplatesResponse() { + permissionTemplates_ = java.util.Collections.emptyList(); + defaultTemplates_ = java.util.Collections.emptyList(); + permissions_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private WsSearchTemplatesResponse( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -10619,10 +10572,11 @@ public final class Permissions { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { permissionTemplates_ = java.util.Collections.unmodifiableList(permissionTemplates_); @@ -10649,21 +10603,6 @@ public final class Permissions { org.sonarqube.ws.Permissions.WsSearchTemplatesResponse.class, org.sonarqube.ws.Permissions.WsSearchTemplatesResponse.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public WsSearchTemplatesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WsSearchTemplatesResponse(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - public interface TemplateIdQualifierOrBuilder extends // @@protoc_insertion_point(interface_extends:sonarqube.ws.permissions.WsSearchTemplatesResponse.TemplateIdQualifier) com.google.protobuf.MessageOrBuilder { @@ -10699,37 +10638,28 @@ public final class Permissions { /** * Protobuf type {@code sonarqube.ws.permissions.WsSearchTemplatesResponse.TemplateIdQualifier} */ - public static final class TemplateIdQualifier extends + public static final class TemplateIdQualifier extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.permissions.WsSearchTemplatesResponse.TemplateIdQualifier) TemplateIdQualifierOrBuilder { // Use TemplateIdQualifier.newBuilder() to construct. - private TemplateIdQualifier(com.google.protobuf.GeneratedMessage.Builder builder) { + private TemplateIdQualifier(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private TemplateIdQualifier(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final TemplateIdQualifier defaultInstance; - public static TemplateIdQualifier getDefaultInstance() { - return defaultInstance; } - - public TemplateIdQualifier getDefaultInstanceForType() { - return defaultInstance; + private TemplateIdQualifier() { + templateId_ = ""; + qualifier_ = ""; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private TemplateIdQualifier( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -10763,10 +10693,11 @@ public final class Permissions { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -10784,24 +10715,9 @@ public final class Permissions { org.sonarqube.ws.Permissions.WsSearchTemplatesResponse.TemplateIdQualifier.class, org.sonarqube.ws.Permissions.WsSearchTemplatesResponse.TemplateIdQualifier.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public TemplateIdQualifier parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TemplateIdQualifier(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int TEMPLATEID_FIELD_NUMBER = 1; - private java.lang.Object templateId_; + private volatile java.lang.Object templateId_; /** * optional string templateId = 1; */ @@ -10843,7 +10759,7 @@ public final class Permissions { } public static final int QUALIFIER_FIELD_NUMBER = 2; - private java.lang.Object qualifier_; + private volatile java.lang.Object qualifier_; /** * optional string qualifier = 2; */ @@ -10884,10 +10800,6 @@ public final class Permissions { } } - private void initFields() { - templateId_ = ""; - qualifier_ = ""; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -10900,14 +10812,13 @@ public final class Permissions { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getTemplateIdBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getQualifierBytes()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -10924,18 +10835,12 @@ public final class Permissions { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getQualifierBytes()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Permissions.WsSearchTemplatesResponse.TemplateIdQualifier parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -10989,12 +10894,17 @@ public final class Permissions { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Permissions.WsSearchTemplatesResponse.TemplateIdQualifier prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -11035,10 +10945,6 @@ public final class Permissions { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); templateId_ = ""; @@ -11048,10 +10954,6 @@ public final class Permissions { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_WsSearchTemplatesResponse_TemplateIdQualifier_descriptor; @@ -11107,7 +11009,8 @@ public final class Permissions { qualifier_ = other.qualifier_; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -11289,12 +11192,44 @@ public final class Permissions { // @@protoc_insertion_point(builder_scope:sonarqube.ws.permissions.WsSearchTemplatesResponse.TemplateIdQualifier) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsSearchTemplatesResponse.TemplateIdQualifier) + private static final org.sonarqube.ws.Permissions.WsSearchTemplatesResponse.TemplateIdQualifier DEFAULT_INSTANCE; static { - defaultInstance = new TemplateIdQualifier(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Permissions.WsSearchTemplatesResponse.TemplateIdQualifier(); + } + + public static org.sonarqube.ws.Permissions.WsSearchTemplatesResponse.TemplateIdQualifier getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public TemplateIdQualifier parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new TemplateIdQualifier(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Permissions.WsSearchTemplatesResponse.TemplateIdQualifier getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsSearchTemplatesResponse.TemplateIdQualifier) } public static final int PERMISSIONTEMPLATES_FIELD_NUMBER = 1; @@ -11402,11 +11337,6 @@ public final class Permissions { return permissions_.get(index); } - private void initFields() { - permissionTemplates_ = java.util.Collections.emptyList(); - defaultTemplates_ = java.util.Collections.emptyList(); - permissions_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -11419,7 +11349,6 @@ public final class Permissions { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); for (int i = 0; i < permissionTemplates_.size(); i++) { output.writeMessage(1, permissionTemplates_.get(i)); } @@ -11429,7 +11358,7 @@ public final class Permissions { for (int i = 0; i < permissions_.size(); i++) { output.writeMessage(3, permissions_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -11450,18 +11379,12 @@ public final class Permissions { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, permissions_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Permissions.WsSearchTemplatesResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -11515,12 +11438,17 @@ public final class Permissions { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Permissions.WsSearchTemplatesResponse prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -11564,10 +11492,6 @@ public final class Permissions { getPermissionsFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); if (permissionTemplatesBuilder_ == null) { @@ -11591,10 +11515,6 @@ public final class Permissions { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_WsSearchTemplatesResponse_descriptor; @@ -11735,7 +11655,8 @@ public final class Permissions { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -12485,75 +12406,107 @@ public final class Permissions { // @@protoc_insertion_point(builder_scope:sonarqube.ws.permissions.WsSearchTemplatesResponse) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsSearchTemplatesResponse) + private static final org.sonarqube.ws.Permissions.WsSearchTemplatesResponse DEFAULT_INSTANCE; static { - defaultInstance = new WsSearchTemplatesResponse(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Permissions.WsSearchTemplatesResponse(); + } + + public static org.sonarqube.ws.Permissions.WsSearchTemplatesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public WsSearchTemplatesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new WsSearchTemplatesResponse(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Permissions.WsSearchTemplatesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.WsSearchTemplatesResponse) } - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_permissions_WsUsersResponse_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_permissions_WsUsersResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_permissions_WsUsersResponse_User_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_permissions_WsUsersResponse_User_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_permissions_WsGroupsResponse_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_permissions_WsGroupsResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_permissions_WsGroupsResponse_Group_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_permissions_WsGroupsResponse_Group_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_permissions_Permission_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_permissions_Permission_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_permissions_WsSearchGlobalPermissionsResponse_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_permissions_WsSearchGlobalPermissionsResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_permissions_WsSearchProjectPermissionsResponse_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_permissions_WsSearchProjectPermissionsResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_permissions_WsSearchProjectPermissionsResponse_Project_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_permissions_WsSearchProjectPermissionsResponse_Project_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_permissions_PermissionTemplate_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_permissions_PermissionTemplate_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_permissions_WsCreatePermissionTemplateResponse_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_permissions_WsCreatePermissionTemplateResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_permissions_WsUpdatePermissionTemplateResponse_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_permissions_WsUpdatePermissionTemplateResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_permissions_WsSearchTemplatesResponse_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_permissions_WsSearchTemplatesResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_permissions_WsSearchTemplatesResponse_TemplateIdQualifier_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable diff --git a/sonar-ws/src/main/gen-java/org/sonarqube/ws/Rules.java b/sonar-ws/src/main/gen-java/org/sonarqube/ws/Rules.java index 7786e5aa761..42bacfc188a 100644 --- a/sonar-ws/src/main/gen-java/org/sonarqube/ws/Rules.java +++ b/sonar-ws/src/main/gen-java/org/sonarqube/ws/Rules.java @@ -43,37 +43,27 @@ public final class Rules { * WS api/rules/list for internal use only * */ - public static final class ListResponse extends + public static final class ListResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.rules.ListResponse) ListResponseOrBuilder { // Use ListResponse.newBuilder() to construct. - private ListResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + private ListResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private ListResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final ListResponse defaultInstance; - public static ListResponse getDefaultInstance() { - return defaultInstance; - } - - public ListResponse getDefaultInstanceForType() { - return defaultInstance; + private ListResponse() { + rules_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private ListResponse( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -103,10 +93,11 @@ public final class Rules { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { rules_ = java.util.Collections.unmodifiableList(rules_); @@ -127,21 +118,6 @@ public final class Rules { org.sonarqube.ws.Rules.ListResponse.class, org.sonarqube.ws.Rules.ListResponse.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public ListResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListResponse(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - public interface RuleOrBuilder extends // @@protoc_insertion_point(interface_extends:sonarqube.ws.rules.ListResponse.Rule) com.google.protobuf.MessageOrBuilder { @@ -205,37 +181,30 @@ public final class Rules { /** * Protobuf type {@code sonarqube.ws.rules.ListResponse.Rule} */ - public static final class Rule extends + public static final class Rule extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:sonarqube.ws.rules.ListResponse.Rule) RuleOrBuilder { // Use Rule.newBuilder() to construct. - private Rule(com.google.protobuf.GeneratedMessage.Builder builder) { + private Rule(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private Rule(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Rule defaultInstance; - public static Rule getDefaultInstance() { - return defaultInstance; - } - - public Rule getDefaultInstanceForType() { - return defaultInstance; + private Rule() { + repository_ = ""; + key_ = ""; + internalKey_ = ""; + name_ = ""; } - private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + getUnknownFields() { return this.unknownFields; } private Rule( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -281,10 +250,11 @@ public final class Rules { } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); + throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -302,24 +272,9 @@ public final class Rules { org.sonarqube.ws.Rules.ListResponse.Rule.class, org.sonarqube.ws.Rules.ListResponse.Rule.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Rule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Rule(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - private int bitField0_; public static final int REPOSITORY_FIELD_NUMBER = 1; - private java.lang.Object repository_; + private volatile java.lang.Object repository_; /** * optional string repository = 1; */ @@ -361,7 +316,7 @@ public final class Rules { } public static final int KEY_FIELD_NUMBER = 2; - private java.lang.Object key_; + private volatile java.lang.Object key_; /** * optional string key = 2; */ @@ -403,7 +358,7 @@ public final class Rules { } public static final int INTERNAL_KEY_FIELD_NUMBER = 3; - private java.lang.Object internalKey_; + private volatile java.lang.Object internalKey_; /** * optional string internal_key = 3; */ @@ -445,7 +400,7 @@ public final class Rules { } public static final int NAME_FIELD_NUMBER = 4; - private java.lang.Object name_; + private volatile java.lang.Object name_; /** * optional string name = 4; */ @@ -486,12 +441,6 @@ public final class Rules { } } - private void initFields() { - repository_ = ""; - key_ = ""; - internalKey_ = ""; - name_ = ""; - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -504,7 +453,6 @@ public final class Rules { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getRepositoryBytes()); } @@ -517,7 +465,7 @@ public final class Rules { if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(4, getNameBytes()); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -542,18 +490,12 @@ public final class Rules { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, getNameBytes()); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Rules.ListResponse.Rule parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -607,12 +549,17 @@ public final class Rules { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Rules.ListResponse.Rule prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -653,10 +600,6 @@ public final class Rules { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); repository_ = ""; @@ -670,10 +613,6 @@ public final class Rules { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_Rule_descriptor; @@ -747,7 +686,8 @@ public final class Rules { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -1081,12 +1021,44 @@ public final class Rules { // @@protoc_insertion_point(builder_scope:sonarqube.ws.rules.ListResponse.Rule) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.rules.ListResponse.Rule) + private static final org.sonarqube.ws.Rules.ListResponse.Rule DEFAULT_INSTANCE; static { - defaultInstance = new Rule(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Rules.ListResponse.Rule(); + } + + public static org.sonarqube.ws.Rules.ListResponse.Rule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Rule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Rule(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Rules.ListResponse.Rule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.rules.ListResponse.Rule) } public static final int RULES_FIELD_NUMBER = 1; @@ -1124,9 +1096,6 @@ public final class Rules { return rules_.get(index); } - private void initFields() { - rules_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -1139,11 +1108,10 @@ public final class Rules { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); for (int i = 0; i < rules_.size(); i++) { output.writeMessage(1, rules_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } private int memoizedSerializedSize = -1; @@ -1156,18 +1124,12 @@ public final class Rules { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, rules_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.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.sonarqube.ws.Rules.ListResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1221,12 +1183,17 @@ public final class Rules { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.sonarqube.ws.Rules.ListResponse prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -1272,10 +1239,6 @@ public final class Rules { getRulesFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - public Builder clear() { super.clear(); if (rulesBuilder_ == null) { @@ -1287,10 +1250,6 @@ public final class Rules { return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_descriptor; @@ -1361,7 +1320,8 @@ public final class Rules { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } @@ -1631,20 +1591,52 @@ public final class Rules { // @@protoc_insertion_point(builder_scope:sonarqube.ws.rules.ListResponse) } + // @@protoc_insertion_point(class_scope:sonarqube.ws.rules.ListResponse) + private static final org.sonarqube.ws.Rules.ListResponse DEFAULT_INSTANCE; static { - defaultInstance = new ListResponse(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new org.sonarqube.ws.Rules.ListResponse(); + } + + public static org.sonarqube.ws.Rules.ListResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ListResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ListResponse(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.sonarqube.ws.Rules.ListResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:sonarqube.ws.rules.ListResponse) } - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_rules_ListResponse_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_rules_ListResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_sonarqube_ws_rules_ListResponse_Rule_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable -- 2.39.5