@@ -54,59 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
54
54
return this .unknownFields ;
55
55
}
56
56
57
- private AliasContext (
58
- com .google .protobuf .CodedInputStream input ,
59
- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
60
- throws com .google .protobuf .InvalidProtocolBufferException {
61
- this ();
62
- if (extensionRegistry == null ) {
63
- throw new java .lang .NullPointerException ();
64
- }
65
- com .google .protobuf .UnknownFieldSet .Builder unknownFields =
66
- com .google .protobuf .UnknownFieldSet .newBuilder ();
67
- try {
68
- boolean done = false ;
69
- while (!done ) {
70
- int tag = input .readTag ();
71
- switch (tag ) {
72
- case 0 :
73
- done = true ;
74
- break ;
75
- case 8 :
76
- {
77
- int rawValue = input .readEnum ();
78
-
79
- kind_ = rawValue ;
80
- break ;
81
- }
82
- case 18 :
83
- {
84
- java .lang .String s = input .readStringRequireUtf8 ();
85
-
86
- name_ = s ;
87
- break ;
88
- }
89
- default :
90
- {
91
- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
92
- done = true ;
93
- }
94
- break ;
95
- }
96
- }
97
- }
98
- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
99
- throw e .setUnfinishedMessage (this );
100
- } catch (com .google .protobuf .UninitializedMessageException e ) {
101
- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
102
- } catch (java .io .IOException e ) {
103
- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
104
- } finally {
105
- this .unknownFields = unknownFields .build ();
106
- makeExtensionsImmutable ();
107
- }
108
- }
109
-
110
57
public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
111
58
return io .grafeas .v1 .Provenance .internal_static_grafeas_v1_AliasContext_descriptor ;
112
59
}
@@ -404,7 +351,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
404
351
if (!com .google .protobuf .GeneratedMessageV3 .isStringEmpty (name_ )) {
405
352
com .google .protobuf .GeneratedMessageV3 .writeString (output , 2 , name_ );
406
353
}
407
- unknownFields .writeTo (output );
354
+ getUnknownFields () .writeTo (output );
408
355
}
409
356
410
357
@ java .lang .Override
@@ -419,7 +366,7 @@ public int getSerializedSize() {
419
366
if (!com .google .protobuf .GeneratedMessageV3 .isStringEmpty (name_ )) {
420
367
size += com .google .protobuf .GeneratedMessageV3 .computeStringSize (2 , name_ );
421
368
}
422
- size += unknownFields .getSerializedSize ();
369
+ size += getUnknownFields () .getSerializedSize ();
423
370
memoizedSize = size ;
424
371
return size ;
425
372
}
@@ -436,7 +383,7 @@ public boolean equals(final java.lang.Object obj) {
436
383
437
384
if (kind_ != other .kind_ ) return false ;
438
385
if (!getName ().equals (other .getName ())) return false ;
439
- if (!unknownFields .equals (other .unknownFields )) return false ;
386
+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
440
387
return true ;
441
388
}
442
389
@@ -451,7 +398,7 @@ public int hashCode() {
451
398
hash = (53 * hash ) + kind_ ;
452
399
hash = (37 * hash ) + NAME_FIELD_NUMBER ;
453
400
hash = (53 * hash ) + getName ().hashCode ();
454
- hash = (29 * hash ) + unknownFields .hashCode ();
401
+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
455
402
memoizedHashCode = hash ;
456
403
return hash ;
457
404
}
@@ -576,17 +523,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
576
523
}
577
524
578
525
// Construct using io.grafeas.v1.AliasContext.newBuilder()
579
- private Builder () {
580
- maybeForceBuilderInitialization ();
581
- }
526
+ private Builder () {}
582
527
583
528
private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
584
529
super (parent );
585
- maybeForceBuilderInitialization ();
586
- }
587
-
588
- private void maybeForceBuilderInitialization () {
589
- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
590
530
}
591
531
592
532
@ java .lang .Override
@@ -679,7 +619,7 @@ public Builder mergeFrom(io.grafeas.v1.AliasContext other) {
679
619
name_ = other .name_ ;
680
620
onChanged ();
681
621
}
682
- this .mergeUnknownFields (other .unknownFields );
622
+ this .mergeUnknownFields (other .getUnknownFields () );
683
623
onChanged ();
684
624
return this ;
685
625
}
@@ -694,17 +634,43 @@ public Builder mergeFrom(
694
634
com .google .protobuf .CodedInputStream input ,
695
635
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
696
636
throws java .io .IOException {
697
- io .grafeas .v1 .AliasContext parsedMessage = null ;
637
+ if (extensionRegistry == null ) {
638
+ throw new java .lang .NullPointerException ();
639
+ }
698
640
try {
699
- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
641
+ boolean done = false ;
642
+ while (!done ) {
643
+ int tag = input .readTag ();
644
+ switch (tag ) {
645
+ case 0 :
646
+ done = true ;
647
+ break ;
648
+ case 8 :
649
+ {
650
+ kind_ = input .readEnum ();
651
+
652
+ break ;
653
+ } // case 8
654
+ case 18 :
655
+ {
656
+ name_ = input .readStringRequireUtf8 ();
657
+
658
+ break ;
659
+ } // case 18
660
+ default :
661
+ {
662
+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
663
+ done = true ; // was an endgroup tag
664
+ }
665
+ break ;
666
+ } // default:
667
+ } // switch (tag)
668
+ } // while (!done)
700
669
} catch (com .google .protobuf .InvalidProtocolBufferException e ) {
701
- parsedMessage = (io .grafeas .v1 .AliasContext ) e .getUnfinishedMessage ();
702
670
throw e .unwrapIOException ();
703
671
} finally {
704
- if (parsedMessage != null ) {
705
- mergeFrom (parsedMessage );
706
- }
707
- }
672
+ onChanged ();
673
+ } // finally
708
674
return this ;
709
675
}
710
676
@@ -936,7 +902,18 @@ public AliasContext parsePartialFrom(
936
902
com .google .protobuf .CodedInputStream input ,
937
903
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
938
904
throws com .google .protobuf .InvalidProtocolBufferException {
939
- return new AliasContext (input , extensionRegistry );
905
+ Builder builder = newBuilder ();
906
+ try {
907
+ builder .mergeFrom (input , extensionRegistry );
908
+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
909
+ throw e .setUnfinishedMessage (builder .buildPartial ());
910
+ } catch (com .google .protobuf .UninitializedMessageException e ) {
911
+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
912
+ } catch (java .io .IOException e ) {
913
+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
914
+ .setUnfinishedMessage (builder .buildPartial ());
915
+ }
916
+ return builder .buildPartial ();
940
917
}
941
918
};
942
919
0 commit comments