You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/11/03 17:07:36 UTC

[GitHub] [beam] kennknowles commented on a change in pull request #15835: [BEAM-11205] Google Libraries BOM 24.0.0 and associated deps

kennknowles commented on a change in pull request #15835:
URL: https://github.com/apache/beam/pull/15835#discussion_r742158390



##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/util/ApiSurface.java
##########
@@ -712,11 +712,18 @@ private void addExposedTypes(Class<?> clazz, Class<?> cause) {
   private void addExposedTypes(Invokable<?, ?> invokable, Class<?> cause) {
     addExposedTypes(invokable.getReturnType(), cause);
     for (Annotation annotation : invokable.getAnnotations()) {
+      Class<? extends Annotation> annotationClass = annotation.annotationType();
+      if (!Modifier.isPublic(annotationClass.getModifiers())) {
+        // Non-public annotations are invisible to Beam users. Example: Guava's
+        // ParametricNullness is package-private and exists to support Kotlin platform

Review comment:
       Interesting! Definitely relevant beyond Kotlin (for example https://checkerframework.org/releases/0.9.7/doc/checkers/nullness/quals/PolyNull.html) but your change is more general and obviously correct.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org