diff --git a/protoc-cli/src/main/java/io/ballerina/protoc/builder/stub/Field.java b/protoc-cli/src/main/java/io/ballerina/protoc/builder/stub/Field.java index 8a40113..ce6475c 100644 --- a/protoc-cli/src/main/java/io/ballerina/protoc/builder/stub/Field.java +++ b/protoc-cli/src/main/java/io/ballerina/protoc/builder/stub/Field.java @@ -120,7 +120,7 @@ public Field build() { fieldDefaultValue = fieldLabel; } String fieldName = fieldDescriptor.getName(); - if (Arrays.stream(RESERVED_LITERAL_NAMES).anyMatch(fieldName::equalsIgnoreCase) || Names.ERROR.value + if (Arrays.stream(RESERVED_LITERAL_NAMES).anyMatch(fieldName::equalsIgnoreCase) || Names.ERROR.getValue() .equalsIgnoreCase(fieldName)) { fieldName = "'" + fieldName; }