suztomo edited a comment on pull request #15835:
URL: https://github.com/apache/beam/pull/15835#issuecomment-954348212


   ` ./gradlew -p sdks/java/io/google-cloud-platform test 
--tests=GcpApiSurfaceTest` fails:
   
   ```
   java.lang.AssertionError: 
   Expected: API surface to include only:
        Classes in package "com.google.api.core"
        Classes in package "com.google.api.client.googleapis"
        Classes in package "com.google.api.client.http"
   ...
   but: The following disallowed classes appeared on the API surface:
        interface com.google.common.base.ParametricNullness exposed via:
                interface com.google.common.base.ParametricNullness
                interface com.google.common.base.Function
                class com.google.common.base.Optional
                class com.google.cloud.bigtable.config.CallOptionsConfig
                class com.google.cloud.bigtable.config.BigtableOptions
                class org.apache.beam.sdk.io.gcp.bigtable.BigtableIO$Write
                class org.apache.beam.sdk.io.gcp.bigtable.BigtableIO
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
        at 
org.apache.beam.sdk.io.gcp.GcpApiSurfaceTest.testGcpApiSurface(GcpApiSurfaceTest.java:128)
   ```
   
   https://ci-beam.apache.org/job/beam_PreCommit_Java_Commit/19434/testReport/
   
   The ParametricNullness is a new annotation in Guava 
https://github.com/google/guava/commit/40faa2cb6a7e4aa9535b1a2a21265d533aca3eae.
 This annotation tells language tools (Kotlin platform, especially) about the 
nullable attribute of the parameter. Example usage of the annotation:
   
   ```
     @ParametricNullness
     T get();
   ```
   
   This means that the method `get()` is nullable if type parameter `T` is 
nullable. It's non-null if `T` is non-null.
   
   This ParametricNullness annotation is not intend to be used other than Guava 
because it's not public. It's only visible to com.google.common.base package. 
ApiSurfaceTest should not detect this as exposed APIs.
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to