Skip to content

Commit

Permalink
Workaround for #770 Figure out whether io.quarkus.awt.runtime.graal.A…
Browse files Browse the repository at this point in the history
…wtFeature and DarwinAwtFeature can be transformed to RuntimeInitializedPackageBuildItem
  • Loading branch information
ppalaga committed Mar 23, 2023
1 parent 6eb8b74 commit c0b8e8b
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject.Produces;
Expand Down Expand Up @@ -63,6 +64,7 @@
import io.quarkus.gizmo.MethodCreator;
import io.quarkus.gizmo.MethodDescriptor;
import io.quarkus.gizmo.ResultHandle;
import io.quarkus.runtime.util.JavaVersionUtil;

/**
* Find WebService implementations and deploy them.
Expand All @@ -89,6 +91,19 @@ void collectClients(
.map(RuntimeInitializedPackageBuildItem::getPackageName)
.collect(Collectors.toSet());

/* Workaround for https://github.com/quarkiverse/quarkus-cxf/issues/770 */
Stream.of(
"com.sun.imageio",
"java.awt",
"javax.imageio",
"sun.awt",
"sun.font",
"sun.java2d")
.forEach(rtInitPackages::add);
if (JavaVersionUtil.isJava17OrHigher()) {
rtInitPackages.add("sun.lwawt.macosx");
}

final AtomicBoolean hasRuntimeInitializedProxy = new AtomicBoolean(false);
final Map<String, ClientFixedConfig> clientSEIsInUse = findClientSEIsInUse(index, config);
CxfDeploymentUtils.webServiceAnnotations(index)
Expand Down

0 comments on commit c0b8e8b

Please sign in to comment.