I can't use protobuf compile a specifity java enum, and i don't known how to solve this problem

4 views
Skip to first unread message

Dongzhao Chen

unread,
Aug 5, 2019, 2:10:21 PM8/5/19
to protobuf-java-format
     now,I got a problem about protobuf, when  I use protobuf (version3) compile a java enum accoring to offical website,It is work well,  

But when I try to use protobuf compile a specifity java enum, It is always throw a Exception,and I find more document,but i don't got a

idea,plz help me.


    syntax = "proto2";

    option java_package = "io.demo.protobuf";

    option java_outer_classname = "Qos";

    enum qosBuf{
  
       AT_MOST_ONCE = 1;
       AT_LEAST_ONCE = 2;
       EXACTLY_ONCE = 3;

      required int32 val = AT_MOST_ONCE.value;   // here always can not compile
  
   }
   
Reply all
Reply to author
Forward
0 new messages