HonahX commented on code in PR #1104:
URL: https://github.com/apache/polaris/pull/1104#discussion_r2013367201


##########
extension/persistence/eclipselink/src/main/java/org/apache/polaris/extension/persistence/impl/eclipselink/PolarisEclipseLinkStore.java:
##########
@@ -411,6 +413,121 @@ void deletePrincipalSecrets(EntityManager session, String 
clientId) {
     session.remove(modelPrincipalSecrets);
   }
 
+  void writeToPolicyMappingRecords(
+      EntityManager session, PolarisPolicyMappingRecord mappingRecord) {
+    diagnosticServices.check(session != null, "session_is_null");
+    checkInitialized();
+
+    
session.persist(ModelPolicyMappingRecord.fromPolicyMappingRecord(mappingRecord));

Review Comment:
   I think it's fine not checking because the method is only called in 
`writeToPolicyMappingRecords` whose signature specify that the argument should 
be `Nonnull`. We also not check null in other methods like 
   
https://github.com/apache/polaris/blob/e619a0075bcd13eef1e139f608625c22ab5b50de/extension/persistence/eclipselink/src/main/java/org/apache/polaris/extension/persistence/impl/eclipselink/PolarisEclipseLinkStore.java#L123-L128
   
   Probably we can add `@Nonull` annotation to the arguments here too?



-- 
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: issues-unsubscr...@polaris.apache.org

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

Reply via email to