adutra commented on code in PR #1353:
URL: https://github.com/apache/polaris/pull/1353#discussion_r2067155086


##########
polaris-core/src/main/java/org/apache/polaris/core/entity/PrincipalRoleEntity.java:
##########
@@ -65,6 +65,13 @@ public Builder(PrincipalRoleEntity original) {
       super(original);
     }
 
+    public Builder setFederated(Boolean isFederated) {
+      if (isFederated != null && isFederated) {

Review Comment:
   I agree with both @dimas-b and @eric-maynard that this looks error-prone. 
   
   Is there a compelling reason to use a "trilean" logic (null/false/true) 
here? If so, maybe something like this would be less error-prone:
   
   ```java
       public Builder setFederated(Boolean isFederated) {
         if (isFederated != null) {
           internalProperties.put(PolarisEntityConstants.FEDERATED_ENTITY, 
isFederated.toString());
         } else {
           internalProperties.remove(PolarisEntityConstants.FEDERATED_ENTITY);
         }
         return this;
       }
   ```



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