tilgalas commented on code in PR #32081:
URL: https://github.com/apache/beam/pull/32081#discussion_r1819066036


##########
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/FieldValueGetter.java:
##########
@@ -29,7 +30,7 @@
  * <p>Implementations of this interface are generated at runtime to map object 
fields to Row fields.
  */
 @Internal
-public interface FieldValueGetter<ObjectT, ValueT> extends Serializable {
+public interface FieldValueGetter<ObjectT extends @NonNull Object, ValueT> 
extends Serializable {

Review Comment:
   yeah, at least not when we're talking type parameters, for example:
   ```
     public interface I<T> {
         T getT();
     }
   
     public static <T> void f(I<T> i) {
       System.out.println(i.getT().getClass());
     }
     ```
     gives me 
     ```
   error: [dereference.of.nullable] dereference of possibly-null reference 
i.getT()
       System.out.println(i.getT().getClass());
                                ^
     ```



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