File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
spring-oxm/src/main/java/org/springframework/oxm/jaxb Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -583,15 +583,16 @@ public boolean supports(Type genericType) {
583
583
if (JAXBElement .class == parameterizedType .getRawType () &&
584
584
parameterizedType .getActualTypeArguments ().length == 1 ) {
585
585
boolean isJdk6 = (org .springframework .core .JdkVersion .getMajorJavaVersion () <= org .springframework .core .JdkVersion .JAVA_16 );
586
+ boolean isJdk7 = (org .springframework .core .JdkVersion .getMajorJavaVersion () >= org .springframework .core .JdkVersion .JAVA_17 );
586
587
Type typeArgument = parameterizedType .getActualTypeArguments ()[0 ];
587
588
if (typeArgument instanceof Class ) {
588
589
Class <?> classArgument = (Class <?>) typeArgument ;
589
- if (isJdk6 && classArgument .isArray ()) {
590
- return (isPrimitiveWrapper (classArgument ) || isStandardClass (classArgument ) ||
591
- supportsInternal (classArgument , false ));
590
+ if (isJdk7 && classArgument .isArray ()) {
591
+ return (classArgument .getComponentType () == Byte .TYPE );
592
592
}
593
593
else {
594
- return (classArgument .getComponentType () == Byte .TYPE );
594
+ return (isPrimitiveWrapper (classArgument ) || isStandardClass (classArgument ) ||
595
+ supportsInternal (classArgument , false ));
595
596
}
596
597
}
597
598
else if (isJdk6 && typeArgument instanceof GenericArrayType ) {
You can’t perform that action at this time.
0 commit comments