Skip to content

Commit d7ac4f5

Browse files
committed
fix field creation
1 parent c31eab5 commit d7ac4f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

http-generator-nima/src/main/java/io/avaje/http/generator/helidon/nima/ControllerWriter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,13 @@ private static String createFieldName(String baseType, String fullType) {
221221
.substring(baseType.lastIndexOf('.') + 1)
222222
.transform(str -> str.substring(0, 1).toLowerCase() + str.substring(1));
223223

224-
if (shortType.length() <= 13) return shortType;
224+
if (fullType.length() <= 13) return shortType;
225225

226226
return switch (fullType.substring(0, 13)) {
227227
case "java.util.Lis" -> "List";
228228
case "java.util.Map" -> "Map";
229229
case "java.util.Set" -> "Set";
230-
default -> "";
230+
default -> shortType;
231231
};
232232
}
233233
}

0 commit comments

Comments
 (0)