[
https://issues.apache.org/jira/browse/BEAM-2231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16293571#comment-16293571
]
ASF GitHub Bot commented on BEAM-2231:
--------------------------------------
jkff closed pull request #3548: [BEAM-2231] Added pruning of the namespace
URL: https://github.com/apache/beam/pull/3548
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/sdks/java/core/src/main/java/org/apache/beam/sdk/util/ApiSurface.java
b/sdks/java/core/src/main/java/org/apache/beam/sdk/util/ApiSurface.java
index 735190b4131..9bb6542b252 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/util/ApiSurface.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/util/ApiSurface.java
@@ -563,7 +563,8 @@ private boolean pruned(Type type) {
private boolean pruned(Class<?> clazz) {
return clazz.isPrimitive()
|| clazz.isArray()
- || getPrunedPattern().matcher(clazz.getName()).matches();
+ || getPrunedPattern().matcher(clazz.getName()).matches()
+ || getPrunedPattern().matcher(clazz.getPackage().getName()).matches();
}
/** Whether a type has already beens sufficiently processed. */
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> ApiSurface should be lazy
> -------------------------
>
> Key: BEAM-2231
> URL: https://issues.apache.org/jira/browse/BEAM-2231
> Project: Beam
> Issue Type: Bug
> Components: sdk-java-core
> Reporter: Kenneth Knowles
> Assignee: Innocent
>
> Currently, the ApiSurface loads classes recursively, when they should be
> pruned before loading by the pruning pattern. This has caused crashes because
> some classes that are never referenced in our code.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)