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 2020/11/11 22:55:38 UTC

[GitHub] [beam] palmere-google commented on pull request #12867: Pub/Sub Lite getSplitBacklog implementation

palmere-google commented on pull request #12867:
URL: https://github.com/apache/beam/pull/12867#issuecomment-725706921


   > Please fix the failure which seems to be related.
   I'm having difficulty reproducing these on my machine. They all seem to be related to nullness checks by the checker framework, but for some reason they don't happen for me
   
   I'm running
   
   ./gradlew -Dorg.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home :sdks:java:io:google-cloud-platform:compileJava
   
   > 
   > sdks:java:io:google-cloud-platform:compileJava FAILED |  
   >   | /home/jenkins/jenkins-slave/workspace/beam_PreCommit_Java_Commit/src/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsublite/TopicBacklogReaderSettings.java:67: error: [argument.type.incompatible] incompatible argument for parameter t of toCanonical. |  
   >   | throw ExtractStatus.toCanonical(e.getCause()); |  
   >   | ^ |  
   >   | found : @initialized @nullable Throwable |  
   >   | required: @initialized @nonnull Throwable |  
   ExtractsStatus.toCanonical accepts a null throwable here, but I'm not sure how to convince the checker framework of this, so I suppressed the warning.
   
   >   | /home/jenkins/jenkins-slave/workspace/beam_PreCommit_Java_Commit/src/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsublite/TopicBacklogReaderSettings.java:82: error: [dereference.of.nullable] dereference of possibly-null reference stub() |  
   >   | builder.setStub(stub().get()); |  
   >   | ^ |  
   Here I think assigning the result of stub() to a temporary should help the checker understand that we are making a null check.
   
   >   | /home/jenkins/jenkins-slave/workspace/beam_PreCommit_Java_Commit/src/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsublite/TopicBacklogReaderImpl.java:69: error: [dereference.of.nullable] dereference of possibly-null reference response |  
   >   | messageBytes += response.getMessageBytes(); |  
   >   | ^ |  
   >   | Note: Some input files use or override a deprecated API. |  
   >   | Note: Recompile with -Xlint:deprecation for details. |  
   >   | Note: Some input files use unchecked or unsafe operations. |  
   >   | Note: Recompile with -Xlint:unchecked for details. |  
   >   | 3 errors
   I'm pretty confident that our rpc stubs can never return a null response, so I suppressed this rather than performing a null check. 
   


----------------------------------------------------------------
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.

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