You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/08/12 11:54:33 UTC
(commons-vfs) branch master updated (67003efc -> f0e0ac12)
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git
from 67003efc Javadoc
new d841d6ee org.apache.commons.vfs2.provider.http.HttpFileObject.doListChildren() now throws UnsupportedOperationException instead of Exception
new f0e0ac12 Javadoc
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../commons/vfs2/provider/http/HttpFileObject.java | 45 +++++++++++++++++++---
.../commons/vfs2/provider/tar/TarFileSystem.java | 18 ++++++++-
src/changes/changes.xml | 3 ++
3 files changed, 59 insertions(+), 7 deletions(-)
(commons-vfs) 02/02: Javadoc
Posted by gg...@apache.org.
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 f0e0ac12a787c98a672dd6f100c06d0403dcc718
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Aug 12 07:54:27 2024 -0400
Javadoc
---
.../commons/vfs2/provider/tar/TarFileSystem.java | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
index d62e56bc..c4bf65e2 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
@@ -102,6 +102,13 @@ public class TarFileSystem extends AbstractFileSystem {
return new TarFileObject(name, null, this, false);
}
+ /**
+ * Creates a new TarArchiveInputStream.
+ *
+ * @param file the file.
+ * @return a new TarArchiveInputStream.
+ * @throws FileSystemException if a file system error occurs.
+ */
protected TarArchiveInputStream createTarFile(final File file) throws FileSystemException {
try {
if ("tgz".equalsIgnoreCase(getRootName().getScheme())) {
@@ -117,8 +124,15 @@ public class TarFileSystem extends AbstractFileSystem {
}
}
- protected TarFileObject createTarFileObject(final AbstractFileName name, final TarArchiveEntry entry) {
- return new TarFileObject(name, entry, this, true);
+ /**
+ * Creates a new TarFileObject.
+ *
+ * @param fileName the file name.
+ * @param entry the archive entry.
+ * @return a new TarFileObject.
+ */
+ protected TarFileObject createTarFileObject(final AbstractFileName fileName, final TarArchiveEntry entry) {
+ return new TarFileObject(fileName, entry, this, true);
}
@Override
(commons-vfs) 01/02: org.apache.commons.vfs2.provider.http.HttpFileObject.doListChildren() now throws UnsupportedOperationException instead of Exception
Posted by gg...@apache.org.
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 d841d6ee530519491e3d94e4cc1259fe3b930820
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Aug 12 07:52:18 2024 -0400
org.apache.commons.vfs2.provider.http.HttpFileObject.doListChildren()
now throws UnsupportedOperationException instead of Exception
---
.../commons/vfs2/provider/http/HttpFileObject.java | 45 +++++++++++++++++++---
src/changes/changes.xml | 3 ++
2 files changed, 43 insertions(+), 5 deletions(-)
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java
index f4c192bd..de1060c7 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java
@@ -198,28 +198,53 @@ public class HttpFileObject<FS extends HttpFileSystem> extends AbstractFileObjec
}
/**
- * Lists the children of this file.
+ * Throws UnsupportedOperationException.
+ *
+ * @throws UnsupportedOperationException always thrown.
*/
@Override
protected String[] doListChildren() throws Exception {
- throw new Exception("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented.");
}
- protected String encodePath(final String decodedPath) throws URIException {
- return URIUtil.encodePath(decodedPath);
+ /**
+ * Encodes the given path.
+ *
+ * @param unescaped An unescaped path.
+ * @return the encoded path.
+ * @throws URIException if the default protocol charset is not supported
+ */
+ protected String encodePath(final String unescaped) throws URIException {
+ return URIUtil.encodePath(unescaped);
}
+ /**
+ * Gets a new FileContentInfoFactory.
+ *
+ * @return a new FileContentInfoFactory.
+ */
@Override
protected FileContentInfoFactory getFileContentInfoFactory() {
return new HttpFileContentInfoFactory();
}
+ /**
+ * Gets whether to follow redirects.
+ *
+ * @return whether to follow redirects.
+ */
protected boolean getFollowRedirect() {
return followRedirect;
}
+ /**
+ * Gets a new HeadMethod.
+ *
+ * @return a new HeadMethod.
+ * @throws IOException if an IO error occurs.
+ */
HeadMethod getHeadMethod() throws IOException {
- // need to synchronize on the filesystem as the detach method will clear out "method"
+ // need to synchronize on the file system as the detach method will clear out "method"
synchronized (getFileSystem()) {
if (method != null) {
return method;
@@ -236,10 +261,20 @@ public class HttpFileObject<FS extends HttpFileSystem> extends AbstractFileObjec
}
}
+ /**
+ * Gets the URL charset name.
+ *
+ * @return the URL charset name.
+ */
protected String getUrlCharset() {
return urlCharset;
}
+ /**
+ * Gets the user agent.
+ *
+ * @return the user agent.
+ */
protected String getUserAgent() {
return userAgent;
}
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 7ec1e0f9..855b4c9d 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -203,6 +203,9 @@ The <action> type attribute can be add,update,fix,remove.
<action type="fix" dev="ggregory" due-to="Gary Gregory">
ZipFileSystemConfigBuilder.getCharset(FileSystemOptions) returns UTF-8 instead of null when absent.
</action>
+ <action type="fix" dev="ggregory" due-to="Gary Gregory">
+ org.apache.commons.vfs2.provider.http.HttpFileObject.doListChildren() now throws UnsupportedOperationException instead of Exception.
+ </action>
<!-- ADD -->
<action type="add" issue="VFS-848" dev="ggregory" due-to="beise, Gary Gregory">
Config option for trailing slash in webdav URI #425.