From 093e6d76c1b07733d2aa7469a50f81d04e71222f Mon Sep 17 00:00:00 2001 From: Michal Somora Date: Mon, 16 Oct 2023 11:55:01 +0200 Subject: [PATCH] Rename fromValue to fromString in Enum classes --- .../resources/templates/libraries/microprofile/enumClass.qute | 2 +- .../templates/libraries/microprofile/enumOuterClass.qute | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/src/main/resources/templates/libraries/microprofile/enumClass.qute b/deployment/src/main/resources/templates/libraries/microprofile/enumClass.qute index e492582e..6720cf67 100644 --- a/deployment/src/main/resources/templates/libraries/microprofile/enumClass.qute +++ b/deployment/src/main/resources/templates/libraries/microprofile/enumClass.qute @@ -31,7 +31,7 @@ } @com.fasterxml.jackson.annotation.JsonCreator - public static {e.enumName} fromValue(String v) { + public static {e.enumName} fromString(String v) { for ({#if e.enumName}{e.enumName}{#else}{e.classname}{/if} b : values) { if (String.valueOf(b.value).equalsIgnoreCase(v)) { return b; diff --git a/deployment/src/main/resources/templates/libraries/microprofile/enumOuterClass.qute b/deployment/src/main/resources/templates/libraries/microprofile/enumOuterClass.qute index 40a6511b..d7d61e91 100644 --- a/deployment/src/main/resources/templates/libraries/microprofile/enumOuterClass.qute +++ b/deployment/src/main/resources/templates/libraries/microprofile/enumOuterClass.qute @@ -28,7 +28,7 @@ import java.util.EnumSet; } @JsonCreator - public static {#if e.datatypeWithEnum}{e.datatypeWithEnum}{#else}{e.classname}{/if} fromValue(String text) { + public static {#if e.datatypeWithEnum}{e.datatypeWithEnum}{#else}{e.classname}{/if} fromString(String text) { for ({#if e.datatypeWithEnum}{e.datatypeWithEnum}{#else}{e.classname}{/if} b : values) { if (String.valueOf(b.value).equalsIgnoreCase(text)) { return b;