Skip to content

Commit

Permalink
Merge pull request #14576 from gastaldi/calendar
Browse files Browse the repository at this point in the history
Ignore XMLGregorianCalendar warning missing in Jandex
  • Loading branch information
gastaldi authored Jan 25, 2021
2 parents e8f6245 + 1807e8c commit 1bf67b3
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBundleBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageSystemPropertyBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyIgnoreWarningBuildItem;
import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem;

Expand Down Expand Up @@ -110,6 +111,9 @@ class JaxbProcessor {

private static final List<DotName> JAXB_ROOT_ANNOTATIONS = Arrays.asList(XML_ROOT_ELEMENT, XML_TYPE, XML_REGISTRY);

private static final List<DotName> IGNORE_TYPES = Collections
.singletonList(DotName.createSimple("javax.xml.datatype.XMLGregorianCalendar"));

@Inject
ApplicationArchivesBuildItem applicationArchivesBuildItem;

Expand Down Expand Up @@ -178,6 +182,13 @@ void processAnnotationsAndIndexFiles(
}
}

@BuildStep
void ignoreWarnings(BuildProducer<ReflectiveHierarchyIgnoreWarningBuildItem> ignoreWarningProducer) {
for (DotName type : IGNORE_TYPES) {
ignoreWarningProducer.produce(new ReflectiveHierarchyIgnoreWarningBuildItem(type));
}
}

@BuildStep
void registerClasses(
BuildProducer<NativeImageSystemPropertyBuildItem> nativeImageProps,
Expand Down

0 comments on commit 1bf67b3

Please sign in to comment.