Skip to content

Commit 06f534f

Browse files
committed
Update Settings.loadPrimitiveOrRegularClass to use positive condition
It doen't change behaviour. Signed-off-by: Manoel Campos <[email protected]>
1 parent e5f5404 commit 06f534f

File tree

1 file changed

+1
-3
lines changed
  • typescript-generator-core/src/main/java/cz/habarta/typescript/generator

1 file changed

+1
-3
lines changed

typescript-generator-core/src/main/java/cz/habarta/typescript/generator/Settings.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -850,9 +850,7 @@ static Class<?> loadPrimitiveOrRegularClass(final ClassLoader classLoader, final
850850
// Stripe generic types: remove them from the class name, since the class can only be loaded using its raw name
851851
final var rawClassName = className.replaceAll("<.*>", "");
852852
final Class<?> primitiveType = Utils.getPrimitiveType(className);
853-
return primitiveType != null
854-
? primitiveType
855-
: classLoader.loadClass(rawClassName);
853+
return primitiveType == null ? classLoader.loadClass(rawClassName) : primitiveType;
856854
}
857855

858856
private static <T> List<T> loadInstances(ClassLoader classLoader, List<String> classNames, Class<T> requiredType) {

0 commit comments

Comments
 (0)