This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-vfs.git
commit 5a5a1158f8e16582a1158e6aab1c30e49fa961e3 Author: Gary Gregory <[email protected]> AuthorDate: Wed Mar 3 10:09:08 2021 -0500 Stub out a log call as a TODO (handle PMD issues) --- .../commons/vfs2/provider/webdav/WebdavFileObject.java | 14 ++++++++++---- .../commons/vfs2/provider/webdav4/Webdav4FileObject.java | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/commons-vfs2-jackrabbit1/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileObject.java b/commons-vfs2-jackrabbit1/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileObject.java index c371a4c..0505c69 100644 --- a/commons-vfs2-jackrabbit1/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileObject.java +++ b/commons-vfs2-jackrabbit1/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileObject.java @@ -146,7 +146,7 @@ public class WebdavFileObject extends HttpFileObject<WebdavFileSystem> { execute(checkout); isCheckedIn = false; } catch (final FileSystemException ex) { - // Ignore the exception checking out. + log(ex); } } @@ -164,7 +164,8 @@ public class WebdavFileObject extends HttpFileObject<WebdavFileSystem> { execute(method); isCheckedIn = true; } catch (final Exception e) { - // Ignore the exception. Going to throw original. + // Going to throw original. + log(e); } throw ex; } @@ -175,7 +176,7 @@ public class WebdavFileObject extends HttpFileObject<WebdavFileSystem> { final DavPropertySet props = getPropertyNames(fileName); isCheckedIn = !props.contains(VersionControlledResource.CHECKED_OUT); } catch (final FileNotFoundException fnfe) { - // Ignore the error + log(fnfe); } } if (!isCheckedIn) { @@ -191,7 +192,8 @@ public class WebdavFileObject extends HttpFileObject<WebdavFileSystem> { try { setUserName(fileName, urlStr); } catch (final IOException e) { - // Ignore the exception if unable to set the user name. + // Unable to set the user name. + log(e); } } ((DefaultFileContent) this.file.getContent()).resetAttributes(); @@ -228,6 +230,10 @@ public class WebdavFileObject extends HttpFileObject<WebdavFileSystem> { builder = (WebdavFileSystemConfigBuilder) WebdavFileSystemConfigBuilder.getInstance(); } + void log(Exception ex) { + // TODO Consider logging. + } + protected void configureMethod(final HttpMethodBase httpMethod) { httpMethod.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, WebdavMethodRetryHandler.getInstance()); } diff --git a/commons-vfs2-jackrabbit2/src/main/java/org/apache/commons/vfs2/provider/webdav4/Webdav4FileObject.java b/commons-vfs2-jackrabbit2/src/main/java/org/apache/commons/vfs2/provider/webdav4/Webdav4FileObject.java index 366790a..d0db899 100644 --- a/commons-vfs2-jackrabbit2/src/main/java/org/apache/commons/vfs2/provider/webdav4/Webdav4FileObject.java +++ b/commons-vfs2-jackrabbit2/src/main/java/org/apache/commons/vfs2/provider/webdav4/Webdav4FileObject.java @@ -164,7 +164,7 @@ public class Webdav4FileObject extends Http4FileObject<Webdav4FileSystem> { isCheckedIn = true; } catch (final Exception e) { // Going to throw original. - log(ex); + log(e); } throw ex; }
