Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export module sun.security.action for DB2 jdbc driver #21886

Merged
merged 1 commit into from
Dec 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.NativeImageEnableAllCharsetsBuildItem;
import io.quarkus.deployment.builditem.SslNativeConfigBuildItem;
import io.quarkus.deployment.builditem.nativeimage.JPMSExportBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageConfigBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem;
import io.quarkus.jdbc.db2.runtime.DB2AgroalConnectionConfigurer;
Expand Down Expand Up @@ -77,4 +78,12 @@ void registerServiceBinding(Capabilities capabilities,
}
dbKind.produce(new DefaultDataSourceDbKindBuildItem(DatabaseKind.DB2));
}

@BuildStep
void addBouncyCastleExportsToNativeImage(BuildProducer<JPMSExportBuildItem> jpmsExports) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was merged a bit too fast, I don't think the method name is what you wanted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, indeed... copy paste... I'll open a new one

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed it, my bad...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// com.ibm.db2:jcc:11.5.6.0 accesses sun.security.action.GetPropertyAction
// which is strongly encapsulated in Java 17 requiring
// --add-exports=java.base/sun.security.action=ALL-UNNAMED
jpmsExports.produce(new JPMSExportBuildItem("java.base", "sun.security.action"));
}
}