mbeckerle commented on code in PR #1176:
URL: https://github.com/apache/daffodil/pull/1176#discussion_r1520111269


##########
daffodil-io/src/main/scala/org/apache/daffodil/io/DirectOrBufferedDataOutputStream.scala:
##########
@@ -90,53 +92,53 @@ private[io] class ByteArrayOrFileOutputStream(
             throw new FileIOException(
               "Unable to create temporary file in %s: %s".format(
                 tempDirPath.getPath,
-                e.getMessage(),
+                e.getMessage,
               ),
             )
         }
       val newStream: java.io.OutputStream = new 
java.io.FileOutputStream(maybeFile.get)
-      stream.flush
+      stream.flush()

Review Comment:
   One other wrinkle here is IDEs. My IntelliJ IDEA recommends scala style of 
including the () on a call if the method returns Unit (or void for Java), and 
not including the () on the call if the method returns a value. 
   
   So toString is recommended to call without the parens because it returns a 
value. 
   Ditto for getters of any kind. 
   
   Of course for methods that both have side-effects, AND return a value, and 
have no args. In that case IntelliJ IDEA will recommend removing them, despite 
the method having side effects (because it really doesn't know about the 
side-effects, and I disagree. 



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