[Defect] About method "isPrimitive" in ClassUtils
- Dominant language
- Java
- Stars
- 41.6k
- Forks
- 26.4k
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 4
Description
The concrete code as below:
```java
public static boolean isPrimitive(Class type) {
return type.isPrimitive()
|| type == String.class
|| type == Character.class
|| type == Boolean.class
|| type == Byte.class
|| type == Short.class
|| type == Integer.class
|| type == Long.class
|| type == Float.class
|| type == Double.class
|| type == Object.class;
}
```
Actually, `String.class` and other classes should not be classified in the "primitive" type, as the "simple" type better, the `javax.management.openmbean.SimpleType` is an example.
Contributor guide
Assessment
This issue has not been assessed yet.