Skip to content

Commit 5cc3e0b

Browse files
committed
fix java types
1 parent 50f7c75 commit 5cc3e0b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

http-generator-core/src/main/java/io/avaje/http/generator/core/UType.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ public Set<String> importTypes() {
202202
Set<String> set = new LinkedHashSet<>();
203203
for (String type : allTypes) {
204204
if (!type.startsWith("java.lang.") && type.indexOf('.') > -1) {
205-
set.add(innerTypesImport(type).replace("[]", ""));
205+
if (type.startsWith("java")) set.add(type.replace("[]", ""));
206+
else set.add(innerTypesImport(type).replace("[]", ""));
206207
}
207208
}
208209
return set;

http-generator-core/src/main/java/io/avaje/http/generator/core/Util.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ public static String shortName(String fullType) {
7575
int p = fullType.lastIndexOf('.');
7676
if (p == -1) {
7777
return fullType;
78+
} else if (fullType.startsWith("java")) {
79+
return fullType.substring(p + 1);
7880
} else {
7981
var result = "";
8082
var foundClass = false;

0 commit comments

Comments
 (0)