Consistently use class literals for primitive types
To improve consistency and avoid confusion regarding primitive types and their wrapper types, this commit ensures that we always use class literals for primitive types. For example, instead of using the `Void.TYPE` constant, we now consistently use `void.class`.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -263,7 +263,7 @@ public abstract class AbstractNamedValueMethodArgumentResolver implements Handle
|
||||
@Nullable
|
||||
private Object handleNullValue(String name, @Nullable Object value, Class<?> paramType) {
|
||||
if (value == null) {
|
||||
if (Boolean.TYPE.equals(paramType)) {
|
||||
if (paramType == boolean.class) {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
else if (paramType.isPrimitive()) {
|
||||
|
||||
Reference in New Issue
Block a user