Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7E6D2200B71 for ; Tue, 16 Aug 2016 19:42:21 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7D07B160ABA; Tue, 16 Aug 2016 17:42:21 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 778A6160A74 for ; Tue, 16 Aug 2016 19:42:20 +0200 (CEST) Received: (qmail 83034 invoked by uid 500); 16 Aug 2016 17:42:19 -0000 Mailing-List: contact commits-help@bookkeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: bookkeeper-dev@bookkeeper.apache.org Delivered-To: mailing list commits@bookkeeper.apache.org Received: (qmail 83024 invoked by uid 99); 16 Aug 2016 17:42:19 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Aug 2016 17:42:19 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8B5E4E188C; Tue, 16 Aug 2016 17:42:19 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sijie@apache.org To: commits@bookkeeper.apache.org Date: Tue, 16 Aug 2016 17:42:19 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/4] bookkeeper git commit: BOOKKEEPER-937: Upgrade protobuf to 2.6 archived-at: Tue, 16 Aug 2016 17:42:21 -0000 Repository: bookkeeper Updated Branches: refs/heads/master 64f596f45 -> 28f23e80b http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/28f23e80/bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestDataFormats.java ---------------------------------------------------------------------- diff --git a/bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestDataFormats.java b/bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestDataFormats.java index c3f675f..84e1a77 100644 --- a/bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestDataFormats.java +++ b/bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestDataFormats.java @@ -9,20 +9,41 @@ public final class TestDataFormats { com.google.protobuf.ExtensionRegistry registry) { registry.add(org.apache.bookkeeper.proto.TestDataFormats.messageType); } + /** + * Protobuf enum {@code AuthMessageType} + */ public enum AuthMessageType implements com.google.protobuf.ProtocolMessageEnum { + /** + * SUCCESS_RESPONSE = 1; + */ SUCCESS_RESPONSE(0, 1), + /** + * FAILURE_RESPONSE = 2; + */ FAILURE_RESPONSE(1, 2), + /** + * PAYLOAD_MESSAGE = 3; + */ PAYLOAD_MESSAGE(2, 3), ; - + + /** + * SUCCESS_RESPONSE = 1; + */ public static final int SUCCESS_RESPONSE_VALUE = 1; + /** + * FAILURE_RESPONSE = 2; + */ public static final int FAILURE_RESPONSE_VALUE = 2; + /** + * PAYLOAD_MESSAGE = 3; + */ public static final int PAYLOAD_MESSAGE_VALUE = 3; - - + + public final int getNumber() { return value; } - + public static AuthMessageType valueOf(int value) { switch (value) { case 1: return SUCCESS_RESPONSE; @@ -31,7 +52,7 @@ public final class TestDataFormats { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -43,7 +64,7 @@ public final class TestDataFormats { return AuthMessageType.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -56,11 +77,9 @@ public final class TestDataFormats { getDescriptor() { return org.apache.bookkeeper.proto.TestDataFormats.getDescriptor().getEnumTypes().get(0); } - - private static final AuthMessageType[] VALUES = { - SUCCESS_RESPONSE, FAILURE_RESPONSE, PAYLOAD_MESSAGE, - }; - + + private static final AuthMessageType[] VALUES = values(); + public static AuthMessageType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -69,19 +88,22 @@ public final class TestDataFormats { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private AuthMessageType(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:AuthMessageType) } - + public static final int MESSAGETYPE_FIELD_NUMBER = 1000; + /** + * extend .AuthMessage { ... } + */ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage, @@ -89,7 +111,7 @@ public final class TestDataFormats { .newFileScopedGeneratedExtension( org.apache.bookkeeper.proto.TestDataFormats.AuthMessageType.class, null); - + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -102,25 +124,26 @@ public final class TestDataFormats { "src/main/proto/BookkeeperProtocol.proto*" + "R\n\017AuthMessageType\022\024\n\020SUCCESS_RESPONSE\020\001" + "\022\024\n\020FAILURE_RESPONSE\020\002\022\023\n\017PAYLOAD_MESSAG" + - "E\020\003:4\n\013messageType\022\014.AuthMessage\030\350\007 \002(\0162" + + "E\020\003:4\n\013messageType\022\014.AuthMessage\030\350\007 \001(\0162" + "\020.AuthMessageTypeB\037\n\033org.apache.bookkeep" + "er.protoH\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - messageType.internalInit(descriptor.getExtensions().get(0)); - return null; - } - }; + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { org.apache.bookkeeper.proto.BookkeeperProtocol.getDescriptor(), }, assigner); + messageType.internalInit(descriptor.getExtensions().get(0)); + org.apache.bookkeeper.proto.BookkeeperProtocol.getDescriptor(); } - + // @@protoc_insertion_point(outer_class_scope) } http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/28f23e80/bookkeeper-server/src/test/proto/TestDataFormats.proto ---------------------------------------------------------------------- diff --git a/bookkeeper-server/src/test/proto/TestDataFormats.proto b/bookkeeper-server/src/test/proto/TestDataFormats.proto index 0c616d7..be149ed 100644 --- a/bookkeeper-server/src/test/proto/TestDataFormats.proto +++ b/bookkeeper-server/src/test/proto/TestDataFormats.proto @@ -30,5 +30,5 @@ enum AuthMessageType { * */ extend AuthMessage { - required AuthMessageType messageType = 1000; + optional AuthMessageType messageType = 1000; } http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/28f23e80/compat-deps/bookkeeper-server-compat-4.0.0/pom.xml ---------------------------------------------------------------------- diff --git a/compat-deps/bookkeeper-server-compat-4.0.0/pom.xml b/compat-deps/bookkeeper-server-compat-4.0.0/pom.xml index d84c64e..3530174 100644 --- a/compat-deps/bookkeeper-server-compat-4.0.0/pom.xml +++ b/compat-deps/bookkeeper-server-compat-4.0.0/pom.xml @@ -33,6 +33,11 @@ + com.google.protobuf + protobuf-java + 2.4.1 + + org.apache.bookkeeper bookkeeper-server 4.0.0 @@ -54,6 +59,7 @@ false + com.google.protobuf:protobuf-java org.apache.*:* org.jboss.*:* commons-*:* @@ -64,6 +70,10 @@ + com.google.protobuf + bk-shade.com.google.proto_bk_v4_0_0 + + org.apache org.apache.bk_v4_0_0 http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/28f23e80/compat-deps/bookkeeper-server-compat-4.1.0/pom.xml ---------------------------------------------------------------------- diff --git a/compat-deps/bookkeeper-server-compat-4.1.0/pom.xml b/compat-deps/bookkeeper-server-compat-4.1.0/pom.xml index 76b8b91..9b716e4 100644 --- a/compat-deps/bookkeeper-server-compat-4.1.0/pom.xml +++ b/compat-deps/bookkeeper-server-compat-4.1.0/pom.xml @@ -33,6 +33,11 @@ + com.google.protobuf + protobuf-java + 2.4.1 + + org.apache.bookkeeper bookkeeper-server 4.1.0 @@ -54,6 +59,7 @@ false + com.google.protobuf:protobuf-java org.apache.*:* org.jboss.*:* commons-*:* @@ -64,6 +70,10 @@ + com.google.protobuf + bk-shade.com.google.proto_bk_v4_1_0 + + org.apache.commons org.apache.bk_v4_1_0.commons http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/28f23e80/compat-deps/bookkeeper-server-compat-4.2.0/pom.xml ---------------------------------------------------------------------- diff --git a/compat-deps/bookkeeper-server-compat-4.2.0/pom.xml b/compat-deps/bookkeeper-server-compat-4.2.0/pom.xml index 8c3b44a..729d68b 100644 --- a/compat-deps/bookkeeper-server-compat-4.2.0/pom.xml +++ b/compat-deps/bookkeeper-server-compat-4.2.0/pom.xml @@ -33,6 +33,11 @@ + com.google.protobuf + protobuf-java + 2.4.1 + + org.apache.bookkeeper bookkeeper-server 4.2.0 @@ -54,6 +59,7 @@ false + com.google.protobuf:protobuf-java org.apache.*:* org.jboss.*:* commons-*:* @@ -64,6 +70,10 @@ + com.google.protobuf + bk-shade.com.google.proto_bk_v4_2_0 + + org.apache.commons org.apache.bk_v4_2_0.commons http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/28f23e80/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 27ffbf0..298520b 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ UTF-8 UTF-8 - 2.4.1 + 2.6.1 13.0.1 3.9.4.Final 3.4.6