You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "Spiritedswordsman (via GitHub)" <gi...@apache.org> on 2025/08/09 14:31:36 UTC

[PR] Used passed in lineSeparator in writeHorizontalLine [gravitino]

Spiritedswordsman opened a new pull request, #7998:
URL: https://github.com/apache/gravitino/pull/7998

   In clients/cli/src/main/java/org/apache/gravitino/cli/outputs/TableFormat.java 
   
   This update ensures that the lineSeparator argument passed to writeHorizontalLine is actually used instead of being ignored.
   Previously, the method always used System.lineSeparator(). Now it directly writes the provided `lineSeparator`.
   
   Closes #7978


-- 
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: commits-unsubscribe@gravitino.apache.org

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


Re: [PR] Used passed in lineSeparator in writeHorizontalLine [gravitino]

Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean commented on code in PR #7998:
URL: https://github.com/apache/gravitino/pull/7998#discussion_r2265547689


##########
clients/cli/src/main/java/org/apache/gravitino/cli/outputs/TableFormat.java:
##########
@@ -351,9 +351,7 @@ private static void writeHorizontalLine(
       osw.write(right);
     }
 
-    if (lineSeparator != null) {
-      osw.write(System.lineSeparator());
-    }
+    osw.write(lineSeparator);

Review Comment:
   I think we still need to use the 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.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

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


Re: [PR] Used passed in lineSeparator in writeHorizontalLine [gravitino]

Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean merged PR #7998:
URL: https://github.com/apache/gravitino/pull/7998


-- 
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: commits-unsubscribe@gravitino.apache.org

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


Re: [PR] Used passed in lineSeparator in writeHorizontalLine [gravitino]

Posted by "Spiritedswordsman (via GitHub)" <gi...@apache.org>.
Spiritedswordsman commented on PR #7998:
URL: https://github.com/apache/gravitino/pull/7998#issuecomment-3173278363

   Heyy, Im done with this task, let me know if you want any other changes :v: 
   also I would visit other issues I can work on.


-- 
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: commits-unsubscribe@gravitino.apache.org

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


Re: [PR] Used passed in lineSeparator in writeHorizontalLine [gravitino]

Posted by "Spiritedswordsman (via GitHub)" <gi...@apache.org>.
Spiritedswordsman commented on code in PR #7998:
URL: https://github.com/apache/gravitino/pull/7998#discussion_r2265618680


##########
clients/cli/src/main/java/org/apache/gravitino/cli/outputs/TableFormat.java:
##########
@@ -351,9 +351,7 @@ private static void writeHorizontalLine(
       osw.write(right);
     }
 
-    if (lineSeparator != null) {
-      osw.write(System.lineSeparator());
-    }
+    osw.write(lineSeparator);

Review Comment:
   Yea, no issues



-- 
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: commits-unsubscribe@gravitino.apache.org

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


Re: [PR] Used passed in lineSeparator in writeHorizontalLine [gravitino]

Posted by "Spiritedswordsman (via GitHub)" <gi...@apache.org>.
Spiritedswordsman commented on code in PR #7998:
URL: https://github.com/apache/gravitino/pull/7998#discussion_r2265557940


##########
clients/cli/src/main/java/org/apache/gravitino/cli/outputs/TableFormat.java:
##########
@@ -351,9 +351,7 @@ private static void writeHorizontalLine(
       osw.write(right);
     }
 
-    if (lineSeparator != null) {
-      osw.write(System.lineSeparator());
-    }
+    osw.write(lineSeparator);

Review Comment:
   Sure, 
   But then the function right below "writeRow" Didn't had any null check so I followed the same format.
   
   Soo shall I add a null check for that 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: commits-unsubscribe@gravitino.apache.org

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


Re: [PR] Used passed in lineSeparator in writeHorizontalLine [gravitino]

Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean commented on code in PR #7998:
URL: https://github.com/apache/gravitino/pull/7998#discussion_r2265684150


##########
clients/cli/src/main/java/org/apache/gravitino/cli/outputs/TableFormat.java:
##########
@@ -351,9 +351,7 @@ private static void writeHorizontalLine(
       osw.write(right);
     }
 
-    if (lineSeparator != null) {
-      osw.write(System.lineSeparator());
-    }
+    osw.write(lineSeparator);

Review Comment:
   I would guess that is null, then the intent is that no separator should be, but you could also do that. I don't really have a strong feeling either way.



-- 
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: commits-unsubscribe@gravitino.apache.org

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


Re: [PR] Used passed in lineSeparator in writeHorizontalLine [gravitino]

Posted by "Spiritedswordsman (via GitHub)" <gi...@apache.org>.
Spiritedswordsman commented on code in PR #7998:
URL: https://github.com/apache/gravitino/pull/7998#discussion_r2265655420


##########
clients/cli/src/main/java/org/apache/gravitino/cli/outputs/TableFormat.java:
##########
@@ -351,9 +351,7 @@ private static void writeHorizontalLine(
       osw.write(right);
     }
 
-    if (lineSeparator != null) {
-      osw.write(System.lineSeparator());
-    }
+    osw.write(lineSeparator);

Review Comment:
   Heyy, how about using `System.lineSeparator()` if lineSeparator is null?



-- 
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: commits-unsubscribe@gravitino.apache.org

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


Re: [PR] Used passed in lineSeparator in writeHorizontalLine [gravitino]

Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean commented on code in PR #7998:
URL: https://github.com/apache/gravitino/pull/7998#discussion_r2265593648


##########
clients/cli/src/main/java/org/apache/gravitino/cli/outputs/TableFormat.java:
##########
@@ -351,9 +351,7 @@ private static void writeHorizontalLine(
       osw.write(right);
     }
 
-    if (lineSeparator != null) {
-      osw.write(System.lineSeparator());
-    }
+    osw.write(lineSeparator);

Review Comment:
   It probably wouldn't hurt to have one, so yes add it. Sorry I didn't notice the inconsistency.



-- 
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: commits-unsubscribe@gravitino.apache.org

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