diff options
author | gjoranv <gv@yahooinc.com> | 2023-05-24 00:41:41 +0200 |
---|---|---|
committer | gjoranv <gv@yahooinc.com> | 2023-05-24 00:41:41 +0200 |
commit | 60339a70a6be71d5bfa1a5848f17fdc4cf903b7d (patch) | |
tree | 079af2e4f3de794496a74774e17157b5e052a79a /bundle-plugin | |
parent | c8815fbb7230e237757ab4c410296d18cd53d20c (diff) |
Do not fail for non-exported publicApi packages.
- There are valid cases, e.g. annotations and client libraries.
Diffstat (limited to 'bundle-plugin')
-rw-r--r-- | bundle-plugin/src/main/java/com/yahoo/container/plugin/classanalysis/PackageInfo.java | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/bundle-plugin/src/main/java/com/yahoo/container/plugin/classanalysis/PackageInfo.java b/bundle-plugin/src/main/java/com/yahoo/container/plugin/classanalysis/PackageInfo.java index 491f6d2a743..c19320b8e98 100644 --- a/bundle-plugin/src/main/java/com/yahoo/container/plugin/classanalysis/PackageInfo.java +++ b/bundle-plugin/src/main/java/com/yahoo/container/plugin/classanalysis/PackageInfo.java @@ -9,12 +9,6 @@ import java.util.Optional; */ record PackageInfo(String name, Optional<ExportPackageAnnotation> exportPackage, boolean isPublicApi) { - PackageInfo { - if (exportPackage.isEmpty() && isPublicApi) { - throw new IllegalArgumentException("Package %s is declared PublicApi, but is not exported.".formatted(name)); - } - } - PackageInfo hasExportPackageOrElse(PackageInfo other) { return exportPackage().isPresent() ? this : other; } |