eolivelli commented on a change in pull request #2803:
URL: https://github.com/apache/bookkeeper/pull/2803#discussion_r722037941



##########
File path: 
bookkeeper-http/http-server/src/main/java/org/apache/bookkeeper/http/service/HeartbeatService.java
##########
@@ -27,7 +27,7 @@
  */
 public class HeartbeatService implements HttpEndpointService {
 
-    public static final String HEARTBEAT = "OK\n";
+    public static final String HEARTBEAT = "OK" + System.lineSeparator();

Review comment:
       This is not good, because here we are in the HTTP API, the result cannot 
depend on the OS that is running the bookie

##########
File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieImpl.java
##########
@@ -563,7 +563,7 @@ public static BookieSocketAddress 
getBookieAddress(ServerConfiguration conf)
             && !conf.getAllowLoopback()) {
             throw new UnknownHostException("Trying to listen on loopback 
address, "
                     + addr + " but this is forbidden by default "
-                    + "(see ServerConfiguration#getAllowLoopback()).\n"
+                    + "(see ServerConfiguration#getAllowLoopback())." + 
System.lineSeparator()

Review comment:
       why?
   This is an Exception message, probably it is better to remove the '\n' 
character

##########
File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Cookie.java
##########
@@ -164,17 +164,17 @@ public String toString() {
             builder.setInstanceId(instanceId);
         }
         StringBuilder b = new StringBuilder();
-        b.append(CURRENT_COOKIE_LAYOUT_VERSION).append("\n");
+        b.append(CURRENT_COOKIE_LAYOUT_VERSION).append(System.lineSeparator());

Review comment:
       This is a breaking change in the Cookie

##########
File path: 
bookkeeper-http/http-server/src/main/java/org/apache/bookkeeper/http/service/NullHttpService.java
##########
@@ -26,7 +26,7 @@
  * HttpEndpointService that return fixed content.
  */
 public class NullHttpService implements HttpEndpointService {
-    public static final String CONTENT = "NullHttpService\n";
+    public static final String CONTENT = "NullHttpService" + 
System.lineSeparator();

Review comment:
       the same here




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