From e7441711b3224ab726b0897cdd30daf6e1232615 Mon Sep 17 00:00:00 2001 From: Felix Schnabel Date: Mon, 12 Aug 2024 13:12:44 +0200 Subject: [PATCH] Use `getValue()` instead of directly accessing `Name.value` --- .../src/main/java/io/ballerina/protoc/builder/stub/Field.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }