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 2021/03/18 12:49:33 UTC
[commons-vfs] branch master updated (9c02685 -> 6de3acb)
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 9c02685 Broaden GitHub build matrix to include both Windows and Linux.
new d2171aa Remove trailing whitepace.
new 6de3acb Clean up imports. Add @Deprecated. Use final.
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/sftp/SftpFileSystemConfigBuilder.java | 2 ++
.../java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java | 1 -
.../test/java/org/apache/commons/vfs2/ProviderDeleteTests.java | 2 +-
.../src/test/java/org/apache/commons/vfs2/ProviderTestSuite.java | 2 +-
.../org/apache/commons/vfs2/provider/DefaultFileContentTest.java | 8 ++++----
.../apache/commons/vfs2/provider/http/HttpProviderTestCase.java | 2 +-
.../apache/commons/vfs2/provider/http4/Http4ProviderTestCase.java | 2 +-
.../apache/commons/vfs2/provider/http5/Http5ProviderTestCase.java | 2 +-
.../apache/commons/vfs2/provider/url/UrlProviderHttpTestCase.java | 2 +-
.../test/java/org/apache/commons/vfs2/util/NHttpFileServer.java | 5 ++---
10 files changed, 14 insertions(+), 14 deletions(-)
[commons-vfs] 01/02: Remove trailing whitepace.
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 d2171aaafdf29159d3a34f8c5e3cac575d942080
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Mar 18 08:43:51 2021 -0400
Remove trailing whitepace.
---
.../src/test/java/org/apache/commons/vfs2/ProviderDeleteTests.java | 2 +-
.../src/test/java/org/apache/commons/vfs2/ProviderTestSuite.java | 2 +-
.../org/apache/commons/vfs2/provider/http/HttpProviderTestCase.java | 2 +-
.../org/apache/commons/vfs2/provider/http4/Http4ProviderTestCase.java | 2 +-
.../org/apache/commons/vfs2/provider/http5/Http5ProviderTestCase.java | 2 +-
.../org/apache/commons/vfs2/provider/url/UrlProviderHttpTestCase.java | 2 +-
.../src/test/java/org/apache/commons/vfs2/util/NHttpFileServer.java | 4 ++--
7 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/ProviderDeleteTests.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/ProviderDeleteTests.java
index 5def6b9..13876f0 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/ProviderDeleteTests.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/ProviderDeleteTests.java
@@ -115,7 +115,7 @@ public class ProviderDeleteTests extends AbstractProviderTestCase {
final int deleteCount = scratchFolder.delete(new FileTypeSelector(FileType.FILE));
if (deleteCount < 2) {
- // Slow deletion in an embedded server perhaps (FTPS for example).
+ // Slow deletion in an embedded server perhaps (FTPS for example).
Thread.sleep(500);
}
assertEquals(2, deleteCount);
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/ProviderTestSuite.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/ProviderTestSuite.java
index a142197..0a148b8 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/ProviderTestSuite.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/ProviderTestSuite.java
@@ -63,5 +63,5 @@ public class ProviderTestSuite extends AbstractTestSuite {
addTests(UrlStructureTests.class);
addTests(VfsClassLoaderTests.class);
}
-
+
}
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http/HttpProviderTestCase.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http/HttpProviderTestCase.java
index 5192e41..0289360 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http/HttpProviderTestCase.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http/HttpProviderTestCase.java
@@ -102,7 +102,7 @@ public class HttpProviderTestCase extends AbstractProviderTestConfig {
/**
* Stops the embedded Apache HTTP Server.
- * @throws InterruptedException
+ * @throws InterruptedException
*/
private static void tearDownClass() throws InterruptedException {
if (Server != null) {
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http4/Http4ProviderTestCase.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http4/Http4ProviderTestCase.java
index 84cbc25..7417569 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http4/Http4ProviderTestCase.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http4/Http4ProviderTestCase.java
@@ -101,7 +101,7 @@ public class Http4ProviderTestCase extends AbstractProviderTestConfig {
/**
* Stops the embedded Apache HTTP Server.
- * @throws InterruptedException
+ * @throws InterruptedException
*/
private static void tearDownClass() throws InterruptedException {
if (Server != null) {
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http5/Http5ProviderTestCase.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http5/Http5ProviderTestCase.java
index 4b8d8f0..b694f2c 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http5/Http5ProviderTestCase.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/http5/Http5ProviderTestCase.java
@@ -101,7 +101,7 @@ public class Http5ProviderTestCase extends AbstractProviderTestConfig {
/**
* Stops the embedded Apache HTTP Server.
- * @throws InterruptedException
+ * @throws InterruptedException
*/
private static void tearDownClass() throws InterruptedException {
if (Server != null) {
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/url/UrlProviderHttpTestCase.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/url/UrlProviderHttpTestCase.java
index 98996b1..062b5e2 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/url/UrlProviderHttpTestCase.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/url/UrlProviderHttpTestCase.java
@@ -80,7 +80,7 @@ public class UrlProviderHttpTestCase extends AbstractProviderTestConfig {
/**
* Stops the embedded Apache HTTP Server ().
- * @throws InterruptedException
+ * @throws InterruptedException
*/
public static void tearDownClass() throws InterruptedException {
if (Server != null) {
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/util/NHttpFileServer.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/util/NHttpFileServer.java
index 984d2af..138537e 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/util/NHttpFileServer.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/util/NHttpFileServer.java
@@ -131,7 +131,7 @@ public class NHttpFileServer {
final String filename = file.getName().toLowerCase(Locale.ROOT);
// The following causes a failure on Linux and Macos in HttpProviderTestCase:
// org.apache.commons.vfs2.FileSystemException: GET method failed for "http://localhost:37637/read-tests/file1.txt" range "10" with HTTP status 200.
-// at org.apache.commons.vfs2.provider.http.HttpRandomAccessContent.getDataInputStream(HttpRandomAccessContent.java:80)
+// at org.apache.commons.vfs2.provider.http.HttpRandomAccessContent.getDataInputStream(HttpRandomAccessContent.java:80)
// if (filename.endsWith(".txt")) {
// contentType = ContentType.TEXT_PLAIN;
// } else if (filename.endsWith(".html") || filename.endsWith(".htm") || file.isDirectory()) {
@@ -150,7 +150,7 @@ public class NHttpFileServer {
// @formatter:off
responseTrigger.submitResponse(
AsyncResponseBuilder.create(HttpStatus.SC_OK)
- .setEntity(file.isDirectory()
+ .setEntity(file.isDirectory()
? AsyncEntityProducers.create(file.toString(), contentType)
: AsyncEntityProducers.create(file, contentType))
.addHeader(HttpHeaders.LAST_MODIFIED, DateUtils.formatDate(new Date(file.lastModified())))
[commons-vfs] 02/02: Clean up imports. Add @Deprecated. Use final.
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 6de3acb52cd66d2a9e39d3200de039b14f798cc0
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Mar 18 08:48:38 2021 -0400
Clean up imports. Add @Deprecated. Use final.
---
.../commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java | 2 ++
.../java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java | 1 -
.../org/apache/commons/vfs2/provider/DefaultFileContentTest.java | 8 ++++----
.../test/java/org/apache/commons/vfs2/util/NHttpFileServer.java | 1 -
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
index fc23c96..312cbb7 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
@@ -186,6 +186,7 @@ public final class SftpFileSystemConfigBuilder extends FileSystemConfigBuilder {
* @since 2.3
* @deprecated Use {@link #getConnectTimeout(FileSystemOptions)}.
*/
+ @Deprecated
public Integer getConnectTimeoutMillis(final FileSystemOptions options) {
return this.getDurationInteger(options, CONNECT_TIMEOUT, DEFAULT_CONNECT_TIMEOUT);
}
@@ -768,6 +769,7 @@ public final class SftpFileSystemConfigBuilder extends FileSystemConfigBuilder {
* @since 2.3
* @deprecated Use {@link #setSessionTimeout(FileSystemOptions, Duration)}.
*/
+ @Deprecated
public void setSessionTimeoutMillis(final FileSystemOptions options, final Integer timeout) {
this.setSessionTimeout(options, Duration.ofMillis(timeout));
}
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 b0dad91..00dbd54 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
@@ -17,7 +17,6 @@
package org.apache.commons.vfs2.provider.tar;
import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/DefaultFileContentTest.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/DefaultFileContentTest.java
index 23bf03b..c483981 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/DefaultFileContentTest.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/DefaultFileContentTest.java
@@ -180,14 +180,14 @@ public class DefaultFileContentTest {
testStreamClosedInADifferentThread(content -> content.getOutputStream());
}
- private <T extends Closeable> void testStreamClosedInADifferentThread(FailableFunction<FileContent, T, IOException> getStream) throws Exception {
+ private <T extends Closeable> void testStreamClosedInADifferentThread(final FailableFunction<FileContent, T, IOException> getStream) throws Exception {
final File temp = File.createTempFile("temp-file-name", ".tmp");
final FileSystemManager fileSystemManager = VFS.getManager();
try (FileObject file = fileSystemManager.resolveFile(temp.getAbsolutePath())) {
- T stream = getStream.apply(file.getContent());
- AtomicBoolean check = new AtomicBoolean();
- Thread thread = new Thread(() -> {
+ final T stream = getStream.apply(file.getContent());
+ final AtomicBoolean check = new AtomicBoolean();
+ final Thread thread = new Thread(() -> {
try {
stream.close();
} catch (IOException exception) {
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/util/NHttpFileServer.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/util/NHttpFileServer.java
index 138537e..99f26b2 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/util/NHttpFileServer.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/util/NHttpFileServer.java
@@ -32,7 +32,6 @@ import java.net.InetSocketAddress;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
-import java.net.URLDecoder;
import java.security.KeyManagementException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;