garydgregory commented on code in PR #367:
URL: https://github.com/apache/commons-vfs/pull/367#discussion_r1070090586
##########
commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java:
##########
@@ -82,8 +82,13 @@ public static AbstractFileObject getAbstractFileObject(final
FileObject fileObje
* @since 2.6.0
*/
public static byte[] getContentAsByteArray(final FileObject file) throws
IOException {
- try (FileContent content = file.getContent()) {
- return content.getByteArray();
+ synchronized(file.getFileSystem()) {
+ try (FileContent content = file.getContent()) {
+ return content.getByteArray();
+ } catch (NullPointerException npe) {
+ System.out.println("break here");
Review Comment:
Remove debugging code.
--
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]