garydgregory commented on code in PR #367:
URL: https://github.com/apache/commons-vfs/pull/367#discussion_r1070090699


##########
commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java:
##########
@@ -97,8 +102,10 @@ public static byte[] getContentAsByteArray(final FileObject 
file) throws IOExcep
      * @since 2.4
      */
     public static String getContentAsString(final FileObject file, final 
Charset charset) throws IOException {
-        try (FileContent content = file.getContent()) {
-            return content.getString(charset);
+        synchronized(file.getFileSystem()) {

Review Comment:
   Fix formatting (see above)
   



##########
commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java:
##########
@@ -112,8 +119,10 @@ public static String getContentAsString(final FileObject 
file, final Charset cha
      * @since 2.4
      */
     public static String getContentAsString(final FileObject file, final 
String charset) throws IOException {
-        try (FileContent content = file.getContent()) {
-            return content.getString(charset);
+        synchronized(file.getFileSystem()) {

Review Comment:
   Fix formatting (see above)



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