Skip to content

Commit

Permalink
Merge branch '7.0.x' into 7.1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
rayokota committed Sep 15, 2022
2 parents 940b619 + 0ed50cd commit 9d0af34
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.google.protobuf.Message;
import com.google.protobuf.util.JsonFormat;

import com.squareup.wire.Syntax;
import com.squareup.wire.schema.Field.Label;
import com.squareup.wire.schema.ProtoType;
import com.squareup.wire.schema.internal.parser.EnumConstantElement;
Expand Down Expand Up @@ -110,9 +111,11 @@ protected static String toString(ProtoFileElement protoFile) {
private static String toString(Context ctx, ProtoFileElement protoFile, boolean normalize) {
StringBuilder sb = new StringBuilder();
if (protoFile.getSyntax() != null) {
sb.append("syntax = \"");
sb.append(protoFile.getSyntax());
sb.append("\";\n");
if (!normalize || protoFile.getSyntax() == Syntax.PROTO_3) {
sb.append("syntax = \"");
sb.append(protoFile.getSyntax());
sb.append("\";\n");
}
}
if (protoFile.getPackageName() != null) {
sb.append("package ");
Expand Down

0 comments on commit 9d0af34

Please sign in to comment.