Use Class#componentType() for consistency with arrayType()

Java 12 introduced java.lang.Class#componentType() as a shortcut for
getComponentType().

Since we started using arrayType() in fe5560400c, this commit switches
to componentType() for consistent API usage style.
This commit is contained in:
Sam Brannen
2023-08-07 12:43:40 +03:00
parent 96fd3c10fb
commit 526fc391ee
40 changed files with 88 additions and 88 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 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.
@@ -619,7 +619,7 @@ public class Jaxb2Marshaller implements MimeMarshaller, MimeUnmarshaller, Generi
parameterizedType.getActualTypeArguments().length == 1) {
Type typeArgument = parameterizedType.getActualTypeArguments()[0];
if (typeArgument instanceof Class<?> classArgument) {
return ((classArgument.isArray() && Byte.TYPE == classArgument.getComponentType()) ||
return ((classArgument.isArray() && Byte.TYPE == classArgument.componentType()) ||
isPrimitiveWrapper(classArgument) || isStandardClass(classArgument) ||
supportsInternal(classArgument, false));
}