Skip to content

Commit

Permalink
return null for non-primitive
Browse files Browse the repository at this point in the history
  • Loading branch information
wagyourtail committed Jun 9, 2024
1 parent fb435ff commit 5dfd3a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion java-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ operator fun JavaVersion.minus(int: Int): JavaVersion {
}

val fromVersion = JavaVersion.toVersion(project.properties["stubFromVersion"]!!)
val toVersion = JavaVersion.toVersion(project.properties["stubToVersion"]!!)
val toVersion = JavaVersion.toVersion(project.properties["stubToVersion"]!!) + 1

sourceSets {
for (vers in fromVersion..toVersion) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ public static Class<?> forPrimitiveName(String name) {
case "long" -> long.class;
case "float" -> float.class;
case "double" -> double.class;
default -> throw new IllegalArgumentException("Unknown primitive type: " + name);
case "void" -> void.class;
default -> null;
};
}

Expand Down

0 comments on commit 5dfd3a2

Please sign in to comment.